Skip to content

Commit d4801cc

Browse files
committed
Made envVars handle secrets.
1 parent 9604353 commit d4801cc

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

helm-chart/eoapi/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ kubeVersion: ">=1.23.0-0"
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: "0.5.0"
18+
version: "0.5.1"
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

helm-chart/eoapi/templates/services/configmap.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,22 @@ metadata:
77
name: {{ $serviceName }}-envvar-configmap-{{ $.Release.Name }}
88
data:
99
{{- range $envKey, $envValue := index $v "settings" "envVars" }}
10+
{{- if (eq (kindOf $envValue) "map") }}
11+
{{- if (index $envValue "valueFrom") }}
12+
{{- if (index $envValue "valueFrom" "secretKeyRef") }}
13+
{{ upper $envKey }}:
14+
valueFrom:
15+
secretKeyRef:
16+
name: {{ index $envValue "valueFrom" "secretKeyRef" "name" }}
17+
key: {{ index $envValue "valueFrom" "secretKeyRef" "key" }}
18+
{{- else }}
1019
{{ upper $envKey }}: "{{ $envValue }}"
1120
{{- end }}
21+
{{- else }}
22+
{{ upper $envKey }}: "{{ $envValue }}"
23+
{{- end }}
24+
{{- end }}
25+
{{- end }}
1226
---
1327
{{/* END: if index $v "enabled" */}}
1428
{{- end }}

0 commit comments

Comments
 (0)