feat: add environment variables and secrets to statefulset and deployment (#644)
* feat: add environment variables and secrets to statefulset * feat: add env and envFromSecrets to deplyoment container
This commit is contained in:
committed by
GitHub
parent
ec26888487
commit
f67bff59c3
@@ -131,6 +131,19 @@ spec:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if or .Values.deployment.env .Values.deployment.envFromSecrets }}
|
||||
env:
|
||||
{{- if .Values.deployment.env }}
|
||||
{{- toYaml .Values.deployment.env | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- range .Values.deployment.envFromSecrets }}
|
||||
- name: {{ .name }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .secretName }}
|
||||
key: {{ .secretKey }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.http.port }}
|
||||
|
||||
Reference in New Issue
Block a user