From cf6c7b93575939c19913c8e664fc0a98ccda1b1b Mon Sep 17 00:00:00 2001 From: Leo Petrazickis Date: Wed, 7 Feb 2024 12:01:20 -0500 Subject: [PATCH] Add extra sidecar containers config for Keda operator Signed-off-by: Leo Petrazickis --- keda/README.md | 2 ++ keda/templates/manager/deployment.yaml | 7 +++++++ keda/values.yaml | 6 +++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/keda/README.md b/keda/README.md index b9137bfa..28295c4d 100644 --- a/keda/README.md +++ b/keda/README.md @@ -130,6 +130,8 @@ their default values. | `logging.operator.timeEncoding` | string | `"rfc3339"` | Logging time encoding for KEDA Operator. allowed values are `epoch`, `millis`, `nano`, `iso8601`, `rfc3339` or `rfc3339nano` | | `operator.affinity` | object | `{}` | [Affinity] for pod scheduling for KEDA operator. Takes precedence over the `affinity` field | | `operator.disableCompression` | bool | `true` | Disable response compression for k8s restAPI in client-go. Disabling compression simply means that turns off the process of making data smaller for K8s restAPI in client-go for faster transmission. | +| `operator.extraContainers` | list | `[]` | Additional containers to run as part of the operator deployment | +| `operator.extraInitContainers` | list | `[]` | Additional init containers to run as part of the operator deployment | | `operator.livenessProbe` | object | `{"failureThreshold":3,"initialDelaySeconds":25,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1}` | Liveness probes for operator ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)) | | `operator.name` | string | `"keda-operator"` | Name of the KEDA operator | | `operator.readinessProbe` | object | `{"failureThreshold":3,"initialDelaySeconds":20,"periodSeconds":3,"successThreshold":1,"timeoutSeconds":1}` | Readiness probes for operator ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes)) | diff --git a/keda/templates/manager/deployment.yaml b/keda/templates/manager/deployment.yaml index c70d7546..b2d46da0 100644 --- a/keda/templates/manager/deployment.yaml +++ b/keda/templates/manager/deployment.yaml @@ -187,6 +187,13 @@ spec: {{- else }} {{- toYaml .Values.resources | nindent 12 }} {{- end }} + {{- if .Values.operator.extraContainers }} + {{- toYaml .Values.operator.extraContainers | nindent 8 }} + {{- end }} + {{- if .Values.operator.extraInitContainers }} + initContainers: + {{- toYaml .Values.operator.extraInitContainers | nindent 6 }} + {{- end }} volumes: - name: certificates secret: diff --git a/keda/values.yaml b/keda/values.yaml index 6bedab51..fb7bfe5a 100644 --- a/keda/values.yaml +++ b/keda/values.yaml @@ -83,6 +83,10 @@ operator: # values: # - keda-operator # topologyKey: "kubernetes.io/hostname" + # -- Additional containers to run as part of the operator deployment + extraContainers: [] + # -- Additional init containers to run as part of the operator deployment + extraInitContainers: [] # -- Liveness probes for operator ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)) livenessProbe: initialDelaySeconds: 25 @@ -756,7 +760,7 @@ certificates: # my-secret-annotation-2: "bar" # labels: # my-secret-label: foo - # -- Reference to custom Issuer. + # -- Reference to custom Issuer. If issuer.generate is false, then issuer.group, issuer.kind and issuer.name are required issuer: # -- Generates an Issuer resource with Cert-manager generate: true