From a1811dca3ff67b933084652e0372eafbe84b8e9d Mon Sep 17 00:00:00 2001 From: Lee Briggs Date: Fri, 19 Jul 2024 06:52:27 -0700 Subject: [PATCH] Add extra environment variables in deployment template (#12858) Fixes #12857 Signed-off-by: Lee Briggs --- cmd/k8s-operator/deploy/chart/templates/deployment.yaml | 3 +++ cmd/k8s-operator/deploy/chart/values.yaml | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/cmd/k8s-operator/deploy/chart/templates/deployment.yaml b/cmd/k8s-operator/deploy/chart/templates/deployment.yaml index cf26f1174d5b1..28fda135df071 100644 --- a/cmd/k8s-operator/deploy/chart/templates/deployment.yaml +++ b/cmd/k8s-operator/deploy/chart/templates/deployment.yaml @@ -79,7 +79,10 @@ spec: value: {{ .Values.proxyConfig.firewallMode }} {{- if .Values.proxyConfig.defaultProxyClass }} - name: PROXY_DEFAULT_CLASS + {{- end }} value: {{ .Values.proxyConfig.defaultProxyClass }} + {{- with .Values.operatorConfig.extraEnv }} + {{- toYaml . | nindent 12 }} {{- end }} volumeMounts: - name: oauth diff --git a/cmd/k8s-operator/deploy/chart/values.yaml b/cmd/k8s-operator/deploy/chart/values.yaml index 26fdced3a027e..bf98a725ba867 100644 --- a/cmd/k8s-operator/deploy/chart/values.yaml +++ b/cmd/k8s-operator/deploy/chart/values.yaml @@ -48,6 +48,13 @@ operatorConfig: securityContext: {} + extraEnv: [] + # - name: EXTRA_VAR1 + # value: "value1" + # - name: EXTRA_VAR2 + # value: "value2" + + # proxyConfig contains configuraton that will be applied to any ingress/egress # proxies created by the operator. # https://tailscale.com/kb/1236/kubernetes-operator/#cluster-ingress