Skip to content

Commit

Permalink
feat: update deployment template to use service.environment (#43)
Browse files Browse the repository at this point in the history
also fixes incorrect service secret in envFrom (`console` should be
`app`)
  • Loading branch information
andytson-inviqa authored Mar 22, 2024
1 parent e3c8085 commit 5789efb
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions helm/app/templates/application/app/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,7 @@ spec:
spec:
containers:
- name: app
env:
{{- range $key, $value := .environment }}
- name: {{ $key | quote }}
{{- if kindIs "string" $value }}
value: {{ tpl $value $ | quote }}
{{- else if kindIs "map" $value }}
{{ tpl ($value | toYaml) $ | nindent 10 }}
{{- else }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .environment_secrets }}
envFrom:
{{- if .environment_secrets }}
- secretRef:
name: {{ $.Release.Name }}-console
{{- end }}
{{- with .envFrom }}
{{- tpl (. | toYaml) $ | nindent 10 }}
{{- end }}
{{- end }}
{{- include "service.environment" (dict "root" $ "serviceName" "app" "service" .) | nindent 8 }}
image: {{ .image }}
imagePullPolicy: Always
ports:
Expand Down

0 comments on commit 5789efb

Please sign in to comment.