From 65b4dc6448f6f17ba2696be5301d62c699f4413f Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Tue, 6 Jun 2023 05:37:54 +1000 Subject: [PATCH] Add secret support for filer environment variables. (#4538) Instead of providing a literal value as a string, you can provide the contents of valueFrom as a map. --- k8s/charts/seaweedfs/templates/filer-statefulset.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml index f6a6d1940..d472569cc 100644 --- a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml @@ -88,7 +88,12 @@ spec: {{- if .Values.filer.extraEnvironmentVars }} {{- range $key, $value := .Values.filer.extraEnvironmentVars }} - name: {{ $key }} + {{- if kindIs "string" $value }} value: {{ $value | quote }} + {{- else }} + valueFrom: + {{ toYaml $value | nindent 16 | trim }} + {{- end -}} {{- end }} {{- end }} {{- if .Values.global.extraEnvironmentVars }}