1
0
Fork 0
mirror of synced 2024-08-23 14:01:34 +12:00

Merge pull request #13847 from refucktor/feature/support-extra-env-vars-from-secrets

Feature: Helm Chart support extra env vars using K8s Secrets reference
This commit is contained in:
Sam Rose 2024-06-04 14:24:13 +01:00 committed by GitHub
commit 1acf7ae7d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 43 additions and 1 deletions

View file

@ -202,6 +202,13 @@ spec:
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- range .Values.services.apps.extraEnvFromSecret}}
- name: {{ .name }}
valueFrom:
secretKeyRef:
name: {{ .secretName }}
key: {{ .secretKey | quote }}
{{- end}}
image: budibase/apps:{{ .Values.globals.appVersion | default .Chart.AppVersion }}
imagePullPolicy: Always
{{- if .Values.services.apps.startupProbe }}

View file

@ -201,6 +201,13 @@ spec:
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- range .Values.services.automationWorkers.extraEnvFromSecret}}
- name: {{ .name }}
valueFrom:
secretKeyRef:
name: {{ .secretName }}
key: {{ .secretKey | quote }}
{{- end}}
image: budibase/apps:{{ .Values.globals.appVersion | default .Chart.AppVersion }}
imagePullPolicy: Always
@ -272,4 +279,4 @@ spec:
{{- toYaml .Values.services.automationWorkers.extraVolumes | nindent 8 }}
{{ end }}
status: {}
{{- end }}
{{- end }}

View file

@ -188,6 +188,13 @@ spec:
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- range .Values.services.worker.extraEnvFromSecret}}
- name: {{ .name }}
valueFrom:
secretKeyRef:
name: {{ .secretName }}
key: {{ .secretKey | quote }}
{{- end}}
image: budibase/worker:{{ .Values.globals.appVersion | default .Chart.AppVersion }}
imagePullPolicy: Always
{{- if .Values.services.worker.startupProbe }}

View file

@ -240,6 +240,13 @@ services:
# -- Extra environment variables to set for apps pods. Takes a list of
# name=value pairs.
extraEnv: []
# -- Name of the K8s Secret in the same namespace which contains the extra environment variables.
# This can be used to avoid storing sensitive information in the values.yaml file.
extraEnvFromSecret: []
# - name: MY_SECRET_KEY
# secretName : my-secret
# secretKey: my-secret-key
# -- Startup probe configuration for apps pods. You shouldn't need to
# change this, but if you want to you can find more information here:
# <https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/>
@ -323,6 +330,13 @@ services:
# -- Extra environment variables to set for automation worker pods. Takes a list of
# name=value pairs.
extraEnv: []
# -- Name of the K8s Secret in the same namespace which contains the extra environment variables.
# This can be used to avoid storing sensitive information in the values.yaml file.
extraEnvFromSecret: []
# - name: MY_SECRET_KEY
# secretName : my-secret
# secretKey: my-secret-key
# -- Startup probe configuration for automation worker pods. You shouldn't
# need to change this, but if you want to you can find more information
# here:
@ -408,6 +422,13 @@ services:
# -- Extra environment variables to set for worker pods. Takes a list of
# name=value pairs.
extraEnv: []
# -- Name of the K8s Secret in the same namespace which contains the extra environment variables.
# This can be used to avoid storing sensitive information in the values.yaml file.
extraEnvFromSecret: []
# - name: MY_SECRET_KEY
# secretName : my-secret
# secretKey: my-secret-key
# -- Startup probe configuration for worker pods. You shouldn't need to
# change this, but if you want to you can find more information here:
# <https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/>