Skip to content

Commit 0ea6e13

Browse files
chore: Change mng configMapFromFile (#143)
* Change mng configMapFromFile * fix * upd gitignore * fix readme * fix
1 parent 5396e78 commit 0ea6e13

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77

88
DELETEME*
99
.idea
10+
**/tests/v8-java-helm-basic-test-pagopa-dev*

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ the default file path is `/mnt/file-config/<file name>`
256256
- `ENV VARIABLE NAME`: how the variable must be named inside pod, very usefull for example for spring that have some problems with variables that have hippen in the name
257257
- `key inside config maps`: which key to load inside the env variable name
258258

259+
**NOTE** External config file template use [range flow control](https://helm.sh/docs/chart_template_guide/control_structures/)
260+
259261
```yaml
260262
261263
externalConfigMapValues:

charts/microservice-chart/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# microservice-chart
22

3-
![Version: 7.6.0](https://img.shields.io/badge/Version-7.6.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square)
3+
![Version: 8.0.0](https://img.shields.io/badge/Version-8.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square)
44

55
A Helm chart for PagoPA microservice
66

charts/microservice-chart/templates/configmap.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ data:
1313
{{- toYaml (mergeOverwrite .Values.envConfig .Values.canaryDelivery.envConfig) | nindent 2 }}
1414
{{- end }}
1515
{{- if .Values.configMapFromFile -}}
16-
{{- toYaml .Values.configMapFromFile | nindent 2 }}
16+
{{- range $key, $value := .Values.configMapFromFile }}
17+
{{ $key }}: {{ $value | quote }}
18+
{{- end }}
1719
{{- end }}
1820
{{- else }}
1921
{{- if .Values.envConfig -}}
2022
{{- toYaml .Values.envConfig | nindent 2 }}
2123
{{- end }}
2224
{{- if .Values.configMapFromFile -}}
23-
{{- toYaml .Values.configMapFromFile | nindent 2 }}
25+
{{- range $key, $value := .Values.configMapFromFile }}
26+
{{ $key }}: {{ $value | quote }}
27+
{{- end }}
2428
{{- end }}
2529
{{- end }}
2630
{{- end }}

0 commit comments

Comments
 (0)