Skip to content

Commit 98df6b4

Browse files
committed
Update template for extras configMap environment
1 parent 7b84709 commit 98df6b4

File tree

23 files changed

+112
-39
lines changed

23 files changed

+112
-39
lines changed

template/lab/api/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
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: "1.2.0-rc"
18+
version: "1.3.0-rc"
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

template/lab/api/templates/deployment.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ spec:
3939
env:
4040
{{- toYaml .Values.application.env | nindent 12 }}
4141
{{- end }}
42+
{{- if .Values.envFrom.enabled }}
43+
envFrom:
44+
{{- toYaml .Values.envFrom.envFrom | nindent 12 }}
45+
{{- end }}
4246
{{- if .Values.container }}
4347
ports:
4448
{{- with .Values.container.ports }}
@@ -50,7 +54,7 @@ spec:
5054
{{- if or .Values.configMap.enabled .Values.secret.enabled }}
5155
volumeMounts:
5256
{{- if and .Values.configMap .Values.configMap.enabled }}
53-
- name: {{ include "api.fullname" . }}
57+
- name: {{ .Values.configMap.name }}
5458
mountPath: {{ .Values.configMap.mountPath }}
5559
readOnly: {{ .Values.configMap.readOnly }}
5660
{{- end }}
@@ -61,6 +65,11 @@ spec:
6165
readOnly: {{ .Values.secret.readOnly }}
6266
{{- end }}
6367
{{- end }}
68+
{{- if and .Values.volumes .Values.volumes.enabled }}
69+
volumeMounts:
70+
- name: {{ .Values.volumes.name }}
71+
mountPath: {{ .Values.volumes.mountPath }}
72+
{{- end }}
6473
{{- if .Values.nodeSelector.enabled -}}
6574
{{- with .Values.nodeSelector.select }}
6675
nodeSelector:
@@ -78,9 +87,9 @@ spec:
7887
{{- if or .Values.configMap.enabled .Values.secret.enabled }}
7988
volumes:
8089
{{- if and .Values.configMap .Values.configMap.enabled }}
81-
- name: {{ include "api.fullname" . }}
90+
- name: {{ .Values.configMap.name }}
8291
configMap:
83-
name: {{ include "api.fullname" . }}
92+
name: {{ .Values.configMap.name }}
8493
{{- end }}
8594
{{- if and .Values.secret .Values.secret.enabled }}
8695
- name: {{ .Values.secret.name }}

template/lab/backend/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
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: "1.2.0-rc"
18+
version: "1.3.0-rc"
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

template/lab/backend/templates/deployment.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ spec:
99
{{- if not .Values.autoscaling.enabled }}
1010
replicas: {{ .Values.replicaCount }}
1111
{{- end }}
12+
revisionHistoryLimit: 10
1213
selector:
1314
matchLabels:
1415
{{- include "backend.selectorLabels" . | nindent 6 }}
@@ -38,6 +39,10 @@ spec:
3839
env:
3940
{{- toYaml .Values.application.env | nindent 12 }}
4041
{{- end }}
42+
{{- if .Values.envFrom.enabled }}
43+
envFrom:
44+
{{- toYaml .Values.envFrom.envFrom | nindent 12 }}
45+
{{- end }}
4146
{{- if .Values.container }}
4247
ports:
4348
{{- with .Values.container.ports }}
@@ -49,7 +54,7 @@ spec:
4954
{{- if or .Values.configMap.enabled .Values.secret.enabled }}
5055
volumeMounts:
5156
{{- if and .Values.configMap .Values.configMap.enabled }}
52-
- name: {{ include "backend.fullname" . }}
57+
- name: {{ .Values.configMap.name }}
5358
mountPath: {{ .Values.configMap.mountPath }}
5459
readOnly: {{ .Values.configMap.readOnly }}
5560
{{- end }}
@@ -60,6 +65,11 @@ spec:
6065
readOnly: {{ .Values.secret.readOnly }}
6166
{{- end }}
6267
{{- end }}
68+
{{- if and .Values.volumes .Values.volumes.enabled }}
69+
volumeMounts:
70+
- name: {{ .Values.volumes.name }}
71+
mountPath: {{ .Values.volumes.mountPath }}
72+
{{- end }}
6373
{{- if .Values.nodeSelector.enabled -}}
6474
{{- with .Values.nodeSelector.select }}
6575
nodeSelector:
@@ -77,9 +87,9 @@ spec:
7787
{{- if or .Values.configMap.enabled .Values.secret.enabled }}
7888
volumes:
7989
{{- if and .Values.configMap .Values.configMap.enabled }}
80-
- name: {{ include "backend.fullname" . }}
90+
- name: {{ .Values.configMap.name }}
8191
configMap:
82-
name: {{ include "backend.fullname" . }}
92+
name: {{ .Values.configMap.name }}
8393
{{- end }}
8494
{{- if and .Values.secret .Values.secret.enabled }}
8595
- name: {{ .Values.secret.name }}

template/lab/configmap/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
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: "1.2.0-rc"
18+
version: "1.3.0-rc"
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

template/lab/frontend/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
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: "1.2.0-rc"
18+
version: "1.3.0-rc"
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

template/lab/frontend/templates/deployment.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ spec:
3838
env:
3939
{{- toYaml .Values.application.env | nindent 12 }}
4040
{{- end }}
41+
{{- if .Values.envFrom.enabled }}
42+
envFrom:
43+
{{- toYaml .Values.envFrom.envFrom | nindent 12 }}
44+
{{- end }}
4145
{{- if .Values.container }}
4246
ports:
4347
{{- with .Values.container.ports }}
@@ -57,7 +61,7 @@ spec:
5761
{{- if or .Values.configMap.enabled .Values.secret.enabled }}
5862
volumeMounts:
5963
{{- if and .Values.configMap .Values.configMap.enabled }}
60-
- name: {{ include "frontend.fullname" . }}
64+
- name: {{ .Values.configMap.name }}
6165
mountPath: {{ .Values.configMap.mountPath }}
6266
readOnly: {{ .Values.configMap.readOnly }}
6367
{{- end }}
@@ -68,6 +72,11 @@ spec:
6872
readOnly: {{ .Values.secret.readOnly }}
6973
{{- end }}
7074
{{- end }}
75+
{{- if and .Values.volumes .Values.volumes.enabled }}
76+
volumeMounts:
77+
- name: {{ .Values.volumes.name }}
78+
mountPath: {{ .Values.volumes.mountPath }}
79+
{{- end }}
7180
{{- if .Values.nodeSelector.enabled -}}
7281
{{- with .Values.nodeSelector.select }}
7382
nodeSelector:
@@ -85,9 +94,9 @@ spec:
8594
{{- if or .Values.configMap.enabled .Values.secret.enabled }}
8695
volumes:
8796
{{- if and .Values.configMap .Values.configMap.enabled }}
88-
- name: {{ include "frontend.fullname" . }}
97+
- name: {{ .Values.configMap.name }}
8998
configMap:
90-
name: {{ include "frontend.fullname" . }}
99+
name: {{ .Values.configMap.name }}
91100
{{- end }}
92101
{{- if and .Values.secret .Values.secret.enabled }}
93102
- name: {{ .Values.secret.name }}

template/lab/helm-pack-lab.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55
TITLE="HELM PACKAGE SCRIPT" # script name
66
VER="2.2" # script version
77

8-
HELM_VERSION="1.2.0-rc"
8+
HELM_VERSION="1.3.0-rc"
99
HELM_TEMPLATE="api \
1010
backend \
1111
configmap \

template/lab/helm-push-lab.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55
TITLE="HELM PACKAGE SCRIPT" # script name
66
VER="2.2" # script version
77

8-
HELM_VERSION="1.2.0-rc"
8+
HELM_VERSION="1.3.0-rc"
99
HELM_TEMPLATE="api \
1010
backend \
1111
configmap \

template/lab/secretref/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
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: "1.2.0-rc"
18+
version: "1.3.0-rc"
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

0 commit comments

Comments
 (0)