From 22f385b8092d59a7dadca643d52bd94e9f7c1614 Mon Sep 17 00:00:00 2001 From: Rahul Bhati Date: Thu, 27 Aug 2020 21:45:46 +0530 Subject: [PATCH] Update values.yaml with mqt keda configuration (#1670) --- charts/fission-all/templates/deployment.yaml | 4 +- charts/fission-all/values.yaml | 52 +++++++++++-------- charts/fission-core/templates/deployment.yaml | 45 ++++++++++++++++ charts/fission-core/values.yaml | 25 ++++++--- 4 files changed, 95 insertions(+), 31 deletions(-) diff --git a/charts/fission-all/templates/deployment.yaml b/charts/fission-all/templates/deployment.yaml index 065953d1..44ff7409 100644 --- a/charts/fission-all/templates/deployment.yaml +++ b/charts/fission-all/templates/deployment.yaml @@ -883,7 +883,9 @@ spec: - name: DEBUG_ENV value: {{ .Values.debugEnv | quote }} - name: KAFKA_IMAGE - value: {{ .Values.mqt_keda.connector_images.kafka }} + value: "{{ .Values.mqt_keda.connector_images.kafka.image }}:{{ .Values.mqt_keda.connector_images.kafka.tag }}" + - name: RABBITMQ_IMAGE + value: "{{ .Values.mqt_keda.connector_images.rabbitmq.image }}:{{ .Values.mqt_keda.connector_images.rabbitmq.tag }}" serviceAccountName: fission-svc {{- if .Values.extraCoreComponentPodConfig }} {{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}} diff --git a/charts/fission-all/values.yaml b/charts/fission-all/values.yaml index 65902b40..dae3fda6 100644 --- a/charts/fission-all/values.yaml +++ b/charts/fission-all/values.yaml @@ -51,7 +51,7 @@ fetcher: image: fission/fetcher ## Fetcher image version imageTag: 1.10.0 - + ## Fetcher is only for to downloading or uploading archive. ## Normally, you don't need to change the value here, unless necessary. resource: @@ -69,7 +69,7 @@ logger: fluentdImageRepository: index.docker.io fluentdImage: fluent/fluent-bit fluentdImageTag: 1.5.1 - + ## Fluent-bit writes/reads it’s own sqlite database to record a history of tracked ## files and a state of offsets, this is very useful to resume a state if the ser- ## vice is restarted. For Kubernetes environment with constraints like OpenShift, @@ -81,7 +81,7 @@ logger: ## Only required in some clusters and when enableSecurityContext is true podSecurityPolicy: enabled: false - + ## Configure additional capabilities additionalCapabilities: # example values for linkerd @@ -96,21 +96,21 @@ router: deployAsDaemonSet: false svcAddressMaxRetries: 5 svcAddressUpdateTimeout: 30s - + ## Display endpoint access logs ## To be aware of enabling logging endpoint access log, it increases ## router resource utilization when under heavy workloads. displayAccessLog: false - + ## Add annotations for router # svcAnnotations: # cloud.google.com/load-balancer-type: Internal - + ## For router to match encoded path. ## If true, "/foo%2Fbar" will match the path "/{var}"; ## Otherwise, it will match the path "/foo/bar". useEncodedPath: false - + roundTrip: ## If true, router will disable the HTTP keep-alive which result in performance degradation. ## But it ensures that router can redirect new coming requests to new function pods. @@ -151,7 +151,7 @@ nats: # Address of NATS server (domain:port) # change from default for external NATS - hostaddress: 'nats-streaming:4222' + hostaddress: "nats-streaming:4222" # Authorization token to use with NATS authToken: "defaultFissionAuthToken" @@ -159,34 +159,35 @@ nats: # NATS streaming clusterID clusterID: "fissionMQTrigger" - # Client name registered with NATS streaming + # Client name registered with NATS streaming clientID: "fission" - # Queue group registered with NATS streaming + # Queue group registered with NATS streaming queueGroup: "fission-messageQueueNatsTrigger" # The image to use for NATS streaming server streamingserver: image: nats-streaming - + ## Azure-storage-queue: enable and configure the details azureStorageQueue: enabled: false key: "" accountName: "" - + ## Kafka: enable and configure the details kafka: enabled: false - # note: below link is only for reference. - # Please use the brokers link for your kafka here. - brokers: 'broker.kafka:9092' # or your-bootstrap-server.kafka:9092/9093 + # note: below link is only for reference. + # Please use the brokers link for your kafka here. + brokers: "broker.kafka:9092" # or your-bootstrap-server.kafka:9092/9093 authentication: tls: enabled: false - caCert: '' # path to certificate containing public key of CA authority - userCert: '' # path to certificate containing public key of the user signed by CA authority - userKey: '' # path to private key of the user + caCert: "" # path to certificate containing public key of CA authority + userCert: "" # path to certificate containing public key of the user signed by CA authority + userKey: "" # path to private key of the user + # brokers: 'my-broker.kafka:9092' # or my-bootstrap-server.kafka:9092/9093 # Sample config for authentication @@ -241,7 +242,7 @@ persistence: accessMode: ReadWriteOnce size: 8Gi -## Extend the container specs for the core fission pods. +## Extend the container specs for the core fission pods. ## Can be used to add things like affinty/tolerations/nodeSelectors/etc. ## For example: ## extraCoreComponentPodConfig: @@ -270,7 +271,7 @@ analyticsNonHelmInstall: false heapster: false ## Enable InfluxDB -influxdb: +influxdb: enabled: true image: influxdb:1.7 @@ -293,7 +294,7 @@ debugEnv: false prometheus: ## set this flag to true if prometheus needs to be deployed along with fission enabled: true - + ## If enabled is false, please assign the prometheus service URL ## that is accessible by components. serviceEndpoint: "" @@ -308,6 +309,11 @@ canaryDeployment: ## Message Queue Trigger Kind, KEDA: enable and configuration mqt_keda: - enabled: true + enabled: false connector_images: - kafka: fission/keda-kafka + kafka: + image: fission/keda-kafka-http-connector + tag: 1 + rabbitmq: + image: fission/keda-rabbitmq-http-connector + tag: 1 diff --git a/charts/fission-core/templates/deployment.yaml b/charts/fission-core/templates/deployment.yaml index ff0d7e3b..0ae8449b 100644 --- a/charts/fission-core/templates/deployment.yaml +++ b/charts/fission-core/templates/deployment.yaml @@ -446,3 +446,48 @@ spec: {{- if .Values.extraCoreComponentPodConfig }} {{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}} {{- end }} + +{{- if .Values.mqt_keda.enabled }} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mqtrigger-keda + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + svc: mqtrigger-keda + messagequeue: keda +spec: + replicas: 1 + selector: + matchLabels: + svc: mqtrigger-keda + messagequeue: keda + template: + metadata: + labels: + svc: mqtrigger-keda + messagequeue: keda + spec: + containers: + - name: mqtrigger-keda + image: {{ include "fission-bundleImage" . | quote }} + imagePullPolicy: {{ .Values.pullPolicy }} + command: ["/fission-bundle"] + args: ["--mqt_keda", "--routerUrl", "http://router.{{ .Release.Namespace }}"] + env: + - name: TRACE_JAEGER_COLLECTOR_ENDPOINT + value: "{{ .Values.traceCollectorEndpoint }}" + - name: TRACING_SAMPLING_RATE + value: {{ .Values.traceSamplingRate | default "0.5" | quote }} + - name: DEBUG_ENV + value: {{ .Values.debugEnv | quote }} + - name: KAFKA_IMAGE + value: "{{ .Values.mqt_keda.connector_images.kafka.image }}:{{ .Values.mqt_keda.connector_images.kafka.tag }}" + - name: RABBITMQ_IMAGE + value: "{{ .Values.mqt_keda.connector_images.rabbitmq.image }}:{{ .Values.mqt_keda.connector_images.rabbitmq.tag }}" + serviceAccountName: fission-svc +{{- if .Values.extraCoreComponentPodConfig }} +{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/fission-core/values.yaml b/charts/fission-core/values.yaml index 40089a05..62c1ce33 100644 --- a/charts/fission-core/values.yaml +++ b/charts/fission-core/values.yaml @@ -44,7 +44,7 @@ fetcher: image: fission/fetcher ## Fetcher image version imageTag: 1.10.0 - + ## Fetcher is only for to downloading or uploading archive. ## Normally, you don't need to change the value here, unless necessary. resource: @@ -64,21 +64,21 @@ router: deployAsDaemonSet: false svcAddressMaxRetries: 5 svcAddressUpdateTimeout: 30s - + ## Display endpoint access logs ## To be aware of enabling logging endpoint access log, it increases ## router resource utilization when under heavy workloads. displayAccessLog: false - + ## Add annotations for router # svcAnnotations: # cloud.google.com/load-balancer-type: Internal - + ## For router to match encoded path. ## If true, "/foo%2Fbar" will match the path "/{var}"; ## Otherwise, it will match the path "/foo/bar". useEncodedPath: false - + roundTrip: ## If true, router will disable the HTTP keep-alive which result in performance degradation. ## But it ensures that router can redirect new coming requests to new function pods. @@ -144,7 +144,7 @@ persistence: accessMode: ReadWriteOnce size: 8Gi -## Extend the container specs for the core fission pods. +## Extend the container specs for the core fission pods. ## Can be used to add things like affinty/tolerations/nodeSelectors/etc. ## For example: ## extraCoreComponentPodConfig: @@ -185,7 +185,7 @@ debugEnv: false prometheus: ## set this flag to true if prometheus needs to be deployed along with fission enabled: false - + ## If enabled is false, please assign the prometheus service URL ## that is accessible by components. serviceEndpoint: "" @@ -197,3 +197,14 @@ canaryDeployment: # Use these flags to enable opentracing, the variable is endpoint of Jaeger collector in the format shown below #traceCollectorEndpoint: "http://jaeger-collector.jaeger.svc:14268/api/traces?format=jaeger.thrift" #traceSamplingRate: 0.75 + +## Message Queue Trigger Kind, KEDA: enable and configuration +mqt_keda: + enabled: false + connector_images: + kafka: + image: fission/keda-kafka-http-connector + tag: 1 + rabbitmq: + image: fission/keda-rabbitmq-http-connector + tag: 1