Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Being able to set environment variables using 'envFrom' #397

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,17 @@ spec:
{{- if or $.Values.server.additionalEnv $serviceValues.additionalEnv }}
{{- toYaml (default $.Values.server.additionalEnv $serviceValues.additionalEnv) | nindent 12 }}
{{- end }}
{{- if or $serviceValues.additionalEnvCM $serviceValues.additionalEnvSecret }}
envFrom:
{{- if $serviceValues.additionalEnvCM }}
SmaineTF1 marked this conversation as resolved.
Show resolved Hide resolved
- configMapRef:
name: {{ $serviceValues.additionalEnvCM }}
{{- end }}
{{- if $serviceValues.additionalEnvSecret }}
- secretRef:
name: {{ $serviceValues.additionalEnvSecret }}
{{- end }}
{{- end }}
ports:
- name: rpc
containerPort: {{ include (printf "temporal.%s.grpcPort" $service) $ }}
Expand Down
11 changes: 11 additions & 0 deletions templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ spec:
{{- if .Values.web.additionalEnv }}
{{- toYaml .Values.web.additionalEnv | nindent 12 }}
{{- end }}
{{- if or .Values.web.additionalEnvCM .Values.web.additionalEnvSecret }}
envFrom:
{{- if .Values.web.additionalEnvCM }}
- configMapRef:
name: {{ .Values.web.additionalEnvCM }}
{{- end }}
{{- if .Values.web.additionalEnvSecret }}
- secretRef:
name: {{ .Values.web.additionalEnvSecret }}
{{- end }}
{{- end }}
ports:
- name: http
containerPort: 8080
Expand Down
12 changes: 12 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ server:
additionalVolumes: []
additionalVolumeMounts: []
additionalEnv: []
additionalEnvCM: ""
additionalEnvSecret: ""
securityContext:
fsGroup: 1000
runAsUser: 1000
Expand Down Expand Up @@ -183,6 +185,8 @@ server:
tolerations: []
affinity: {}
additionalEnv: []
additionalEnvCM: ""
additionalEnvSecret: ""
containerSecurityContext: {}
topologySpreadConstraints: {}
podDisruptionBudget: {}
Expand All @@ -205,6 +209,8 @@ server:
tolerations: []
affinity: {}
additionalEnv: []
additionalEnvCM: ""
additionalEnvSecret: ""
containerSecurityContext: {}
topologySpreadConstraints: {}
podDisruptionBudget: {}
Expand All @@ -227,6 +233,8 @@ server:
tolerations: []
affinity: {}
additionalEnv: []
additionalEnvCM: ""
additionalEnvSecret: ""
containerSecurityContext: {}
topologySpreadConstraints: {}
podDisruptionBudget: {}
Expand All @@ -249,6 +257,8 @@ server:
tolerations: []
affinity: {}
additionalEnv: []
additionalEnvCM: ""
additionalEnvSecret: ""
containerSecurityContext: {}
topologySpreadConstraints: {}
podDisruptionBudget: {}
Expand All @@ -270,6 +280,8 @@ admintools:
tolerations: []
affinity: {}
additionalEnv: []
additionalEnvCM: ""
additionalEnvSecret: ""
resources: {}
containerSecurityContext: {}
securityContext: {}
Expand Down