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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
29 changes: 29 additions & 0 deletions templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,35 @@ spec:
{{- if or $.Values.server.additionalEnv $serviceValues.additionalEnv }}
{{- toYaml (default $.Values.server.additionalEnv $serviceValues.additionalEnv) | nindent 12 }}
{{- end }}
{{- if or $.Values.server.additionalEnvCM $.Values.server.additionalEnvSecret }}
envFrom:
{{- if $.Values.server.additionalEnvCM }}
{{- range $.Values.server.additionalEnvCM }}
- configMapRef:
name: {{ . }}
{{- end }}
{{- end }}
{{- if $.Values.server.additionalEnvSecret }}
{{- range $.Values.server.additionalEnvSecret }}
- secretRef:
name: {{ . }}
{{- end }}
{{- end }}
{{- else if or $serviceValues.additionalEnvCM $serviceValues.additionalEnvSecret }}
envFrom:
{{- if $serviceValues.additionalEnvCM }}
SmaineTF1 marked this conversation as resolved.
Show resolved Hide resolved
{{- range $serviceValues.additionalEnvCM }}
- configMapRef:
name: {{ . }}
{{- end }}
{{- end }}
{{- if $serviceValues.additionalEnvSecret }}
{{- range $serviceValues.additionalEnvSecret }}
- secretRef:
name: {{ . }}
{{- end }}
{{- end }}
{{- end }}
ports:
- name: rpc
containerPort: {{ include (printf "temporal.%s.grpcPort" $service) $ }}
Expand Down
15 changes: 15 additions & 0 deletions templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ 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 }}
{{- range .Values.web.additionalEnvCM }}
- configMapRef:
name: {{ . }}
{{- end }}
{{- end }}
{{- if .Values.web.additionalEnvSecret }}
{{- range .Values.web.additionalEnvSecret }}
- secretRef:
name: {{ . }}
{{- end }}
{{- end }}
{{- end }}
ports:
- name: http
containerPort: 8080
Expand Down
16 changes: 15 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ server:
additionalVolumes: []
additionalVolumeMounts: []
additionalEnv: []
additionalEnvCM: []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use additionalEnvConfigMap rather than using a contraction.

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 Expand Up @@ -338,9 +350,11 @@ web:
affinity: {}

additionalEnv: []
additionalEnvCM: []
additionalEnvSecret: []

containerSecurityContext: {}

securityContext: {}

schema:
Expand Down