feat(common)!: Migrate library chart

This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2022-08-07 11:45:41 +02:00
parent 49ebc2bb2f
commit a1a80f5ff5
No known key found for this signature in database
GPG key ID: BC5E2BD907F9A8EC
59 changed files with 499 additions and 885 deletions

View file

@ -36,29 +36,7 @@
{{- with .Values.env }}
env:
{{- range $k, $v := . }}
{{- $name := $k }}
{{- $value := $v }}
{{- if kindIs "int" $name }}
{{- $name = required "environment variables as a list of maps require a name field" $value.name }}
{{- end }}
- name: {{ quote $name }}
{{- if kindIs "map" $value -}}
{{- if hasKey $value "value" }}
{{- $value = $value.value -}}
{{- else if hasKey $value "valueFrom" }}
{{- dict "valueFrom" $value.valueFrom | toYaml | nindent 6 }}
{{- else }}
{{- dict "valueFrom" $value | toYaml | nindent 6 }}
{{- end }}
{{- end }}
{{- if not (kindIs "map" $value) }}
{{- if kindIs "string" $value }}
{{- $value = tpl $value $ }}
{{- end }}
value: {{ quote $value }}
{{- end }}
{{- end }}
{{- get (fromYaml (include "common.controller.env_vars" $)) "env" | toYaml | nindent 4 -}}
{{- end }}
{{- if or .Values.envFrom .Values.secret }}
envFrom: