diff --git a/templates/server-deployment.yaml b/templates/server-deployment.yaml index fccea7c8..23adf649 100644 --- a/templates/server-deployment.yaml +++ b/templates/server-deployment.yaml @@ -121,15 +121,33 @@ spec: {{- if or $.Values.server.additionalEnv $serviceValues.additionalEnv }} {{- toYaml (default $.Values.server.additionalEnv $serviceValues.additionalEnv) | nindent 12 }} {{- end }} - {{- if or $serviceValues.additionalEnvCM $serviceValues.additionalEnvSecret }} + {{- 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 }} + {{- range $serviceValues.additionalEnvCM }} - configMapRef: - name: {{ $serviceValues.additionalEnvCM }} + name: {{ . }} + {{- end }} {{- end }} {{- if $serviceValues.additionalEnvSecret }} + {{- range $serviceValues.additionalEnvSecret }} - secretRef: - name: {{ $serviceValues.additionalEnvSecret }} + name: {{ . }} + {{- end }} {{- end }} {{- end }} ports: diff --git a/templates/web-deployment.yaml b/templates/web-deployment.yaml index 014edc72..29d711e7 100644 --- a/templates/web-deployment.yaml +++ b/templates/web-deployment.yaml @@ -54,12 +54,16 @@ spec: {{- if or .Values.web.additionalEnvCM .Values.web.additionalEnvSecret }} envFrom: {{- if .Values.web.additionalEnvCM }} + {{- range .Values.web.additionalEnvCM }} - configMapRef: - name: {{ .Values.web.additionalEnvCM }} + name: {{ . }} + {{- end }} {{- end }} {{- if .Values.web.additionalEnvSecret }} + {{- range .Values.web.additionalEnvSecret }} - secretRef: - name: {{ .Values.web.additionalEnvSecret }} + name: {{ . }} + {{- end }} {{- end }} {{- end }} ports: diff --git a/values.yaml b/values.yaml index a5481712..a3fddfa2 100644 --- a/values.yaml +++ b/values.yaml @@ -84,8 +84,8 @@ server: additionalVolumes: [] additionalVolumeMounts: [] additionalEnv: [] - additionalEnvCM: "" - additionalEnvSecret: "" + additionalEnvCM: [] + additionalEnvSecret: [] securityContext: fsGroup: 1000 runAsUser: 1000 @@ -185,8 +185,8 @@ server: tolerations: [] affinity: {} additionalEnv: [] - additionalEnvCM: "" - additionalEnvSecret: "" + additionalEnvCM: [] + additionalEnvSecret: [] containerSecurityContext: {} topologySpreadConstraints: {} podDisruptionBudget: {} @@ -209,8 +209,8 @@ server: tolerations: [] affinity: {} additionalEnv: [] - additionalEnvCM: "" - additionalEnvSecret: "" + additionalEnvCM: [] + additionalEnvSecret: [] containerSecurityContext: {} topologySpreadConstraints: {} podDisruptionBudget: {} @@ -233,8 +233,8 @@ server: tolerations: [] affinity: {} additionalEnv: [] - additionalEnvCM: "" - additionalEnvSecret: "" + additionalEnvCM: [] + additionalEnvSecret: [] containerSecurityContext: {} topologySpreadConstraints: {} podDisruptionBudget: {} @@ -257,8 +257,8 @@ server: tolerations: [] affinity: {} additionalEnv: [] - additionalEnvCM: "" - additionalEnvSecret: "" + additionalEnvCM: [] + additionalEnvSecret: [] containerSecurityContext: {} topologySpreadConstraints: {} podDisruptionBudget: {} @@ -280,8 +280,8 @@ admintools: tolerations: [] affinity: {} additionalEnv: [] - additionalEnvCM: "" - additionalEnvSecret: "" + additionalEnvCM: [] + additionalEnvSecret: [] resources: {} containerSecurityContext: {} securityContext: {}