From f2d1b84923bd340c17067aba47f0baa6797f165d Mon Sep 17 00:00:00 2001 From: Arie Date: Thu, 12 Dec 2024 16:42:26 +0100 Subject: [PATCH] feat: allow setting env vars for hydra-maester (#721) --- helm/charts/hydra-maester/README.md | 1 + helm/charts/hydra-maester/templates/deployment.yaml | 4 ++++ helm/charts/hydra-maester/values.yaml | 3 +++ 3 files changed, 8 insertions(+) diff --git a/helm/charts/hydra-maester/README.md b/helm/charts/hydra-maester/README.md index 46d85921e3..200393f4fd 100644 --- a/helm/charts/hydra-maester/README.md +++ b/helm/charts/hydra-maester/README.md @@ -20,6 +20,7 @@ A Helm chart for Kubernetes | deployment.automountServiceAccountToken | bool | `true` | This applications connects to the k8s API and requires the permissions | | deployment.dnsConfig | object | `{}` | Configure pod dnsConfig. | | deployment.extraAnnotations | object | `{}` | Deployment level extra annotations | +| deployment.extraEnv | list | `[]` | Extra environment variables | | deployment.extraLabels | object | `{}` | Deployment level extra labels | | deployment.extraVolumeMounts | list | `[]` | | | deployment.extraVolumes | list | `[]` | If you want to mount external volume | diff --git a/helm/charts/hydra-maester/templates/deployment.yaml b/helm/charts/hydra-maester/templates/deployment.yaml index c313f2e101..290f4a330a 100644 --- a/helm/charts/hydra-maester/templates/deployment.yaml +++ b/helm/charts/hydra-maester/templates/deployment.yaml @@ -80,6 +80,10 @@ spec: {{- if .Values.deployment.extraVolumeMounts }} {{- toYaml .Values.deployment.extraVolumeMounts | nindent 12 }} {{- end }} + {{- if .Values.deployment.extraEnv }} + env: + {{- tpl (toYaml .Values.deployment.extraEnv) . | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.deployment.resources | nindent 12 }} terminationMessagePath: /dev/termination-log diff --git a/helm/charts/hydra-maester/values.yaml b/helm/charts/hydra-maester/values.yaml index e7715bb7c4..d9d152d3dd 100644 --- a/helm/charts/hydra-maester/values.yaml +++ b/helm/charts/hydra-maester/values.yaml @@ -56,6 +56,9 @@ deployment: # cpu: 100m # memory: 20Mi + # -- To set extra env vars for the container. + extraEnv: [] + # -- If you want to mount external volume extraVolumes: [] # - name: my-volume