8181 - configMapRef :
8282 name : {{ .Release.Name }}-st2-urls
8383 volumeMounts :
84- - name : st2-config-vol
85- mountPath : /etc/st2/st2.docker.conf
86- subPath : st2.docker.conf
87- - name : st2-config-vol
88- mountPath : /etc/st2/st2.user.conf
89- subPath : st2.user.conf
84+ {{- include "st2-config-volume-mounts" . | nindent 8 }}
9085 - name : htpasswd-vol
9186 mountPath : /etc/st2/htpasswd
9287 subPath : htpasswd
9792 serviceAccountName : {{ template "stackstorm-ha.serviceAccountName" . }}
9893 {{- end }}
9994 volumes :
100- - name : st2-config-vol
101- configMap :
102- name : {{ .Release.Name }}-st2-config
95+ {{- include "st2-config-volume" . | nindent 8 }}
10396 - name : htpasswd-vol
10497 emptyDir :
10598 medium : Memory
@@ -181,12 +174,7 @@ spec:
181174 - configMapRef :
182175 name : {{ .Release.Name }}-st2-urls
183176 volumeMounts :
184- - name : st2-config-vol
185- mountPath : /etc/st2/st2.docker.conf
186- subPath : st2.docker.conf
187- - name : st2-config-vol
188- mountPath : /etc/st2/st2.user.conf
189- subPath : st2.user.conf
177+ {{- include "st2-config-volume-mounts" . | nindent 8 }}
190178 {{- if .Values.st2.datastore_crypto_key }}
191179 - name : st2-encryption-key-vol
192180 mountPath : /etc/st2/keys
@@ -214,9 +202,7 @@ spec:
214202 - key : datastore_crypto_key
215203 path : datastore_key.json
216204 {{- end }}
217- - name : st2-config-vol
218- configMap :
219- name : {{ .Release.Name }}-st2-config
205+ {{- include "st2-config-volume" . | nindent 8 }}
220206 {{- if .Values.st2.packs.images }}
221207{{- include "packs-volumes" . | indent 8 }}
222208 {{- end }}
@@ -291,21 +277,14 @@ spec:
291277 - configMapRef :
292278 name : {{ .Release.Name }}-st2-urls
293279 volumeMounts :
294- - name : st2-config-vol
295- mountPath : /etc/st2/st2.docker.conf
296- subPath : st2.docker.conf
297- - name : st2-config-vol
298- mountPath : /etc/st2/st2.user.conf
299- subPath : st2.user.conf
280+ {{- include "st2-config-volume-mounts" . | nindent 8 }}
300281 resources :
301282 {{- toYaml .Values.st2stream.resources | nindent 10 }}
302283 {{- if .Values.st2stream.serviceAccount.attach }}
303284 serviceAccountName : {{ template "stackstorm-ha.serviceAccountName" . }}
304285 {{- end }}
305286 volumes :
306- - name : st2-config-vol
307- configMap :
308- name : {{ .Release.Name }}-st2-config
287+ {{- include "st2-config-volume" . | nindent 8 }}
309288 {{- if .Values.dnsPolicy }}
310289 dnsPolicy : {{ .Values.dnsPolicy }}
311290 {{- end }}
@@ -477,21 +456,14 @@ spec:
477456 - configMapRef :
478457 name : {{ .Release.Name }}-st2-urls
479458 volumeMounts :
480- - name : st2-config-vol
481- mountPath : /etc/st2/st2.docker.conf
482- subPath : st2.docker.conf
483- - name : st2-config-vol
484- mountPath : /etc/st2/st2.user.conf
485- subPath : st2.user.conf
459+ {{- include "st2-config-volume-mounts" . | nindent 8 }}
486460 resources :
487461 {{- toYaml .Values.st2rulesengine.resources | nindent 10 }}
488462 {{- if .Values.st2rulesengine.serviceAccount.attach }}
489463 serviceAccountName : {{ template "stackstorm-ha.serviceAccountName" . }}
490464 {{- end }}
491465 volumes :
492- - name : st2-config-vol
493- configMap :
494- name : {{ .Release.Name }}-st2-config
466+ {{- include "st2-config-volume" . | nindent 8 }}
495467 {{- if .Values.st2.datastore_crypto_key }}
496468 - name : st2-encryption-key-vol
497469 secret :
@@ -570,21 +542,14 @@ spec:
570542 - configMapRef :
571543 name : {{ .Release.Name }}-st2-urls
572544 volumeMounts :
573- - name : st2-config-vol
574- mountPath : /etc/st2/st2.docker.conf
575- subPath : st2.docker.conf
576- - name : st2-config-vol
577- mountPath : /etc/st2/st2.user.conf
578- subPath : st2.user.conf
545+ {{- include "st2-config-volume-mounts" . | nindent 8 }}
579546 resources :
580547 {{- toYaml .Values.st2timersengine.resources | nindent 10 }}
581548 {{- if .Values.st2timersengine.serviceAccount.attach }}
582549 serviceAccountName : {{ template "stackstorm-ha.serviceAccountName" . }}
583550 {{- end }}
584551 volumes :
585- - name : st2-config-vol
586- configMap :
587- name : {{ .Release.Name }}-st2-config
552+ {{- include "st2-config-volume" . | nindent 8 }}
588553 {{- if .Values.dnsPolicy }}
589554 dnsPolicy : {{ .Values.dnsPolicy }}
590555 {{- end }}
@@ -655,12 +620,7 @@ spec:
655620 - configMapRef :
656621 name : {{ .Release.Name }}-st2-urls
657622 volumeMounts :
658- - name : st2-config-vol
659- mountPath : /etc/st2/st2.docker.conf
660- subPath : st2.docker.conf
661- - name : st2-config-vol
662- mountPath : /etc/st2/st2.user.conf
663- subPath : st2.user.conf
623+ {{- include "st2-config-volume-mounts" . | nindent 8 }}
664624 {{- if .Values.st2.datastore_crypto_key }}
665625 - name : st2-encryption-key-vol
666626 mountPath : /etc/st2/keys
@@ -672,9 +632,7 @@ spec:
672632 serviceAccountName : {{ template "stackstorm-ha.serviceAccountName" . }}
673633 {{- end }}
674634 volumes :
675- - name : st2-config-vol
676- configMap :
677- name : {{ .Release.Name }}-st2-config
635+ {{- include "st2-config-volume" . | nindent 8 }}
678636 {{- if .Values.st2.datastore_crypto_key }}
679637 - name : st2-encryption-key-vol
680638 secret :
@@ -752,12 +710,7 @@ spec:
752710 - configMapRef :
753711 name : {{ .Release.Name }}-st2-urls
754712 volumeMounts :
755- - name : st2-config-vol
756- mountPath : /etc/st2/st2.docker.conf
757- subPath : st2.docker.conf
758- - name : st2-config-vol
759- mountPath : /etc/st2/st2.user.conf
760- subPath : st2.user.conf
713+ {{- include "st2-config-volume-mounts" . | nindent 8 }}
761714 {{- if .Values.st2.datastore_crypto_key }}
762715 - name : st2-encryption-key-vol
763716 mountPath : /etc/st2/keys
@@ -777,9 +730,7 @@ spec:
777730 - key : datastore_crypto_key
778731 path : datastore_key.json
779732 {{- end }}
780- - name : st2-config-vol
781- configMap :
782- name : {{ .Release.Name }}-st2-config
733+ {{- include "st2-config-volume" . | nindent 8 }}
783734 {{- if .Values.dnsPolicy }}
784735 dnsPolicy : {{ .Values.dnsPolicy }}
785736 {{- end }}
@@ -849,21 +800,14 @@ spec:
849800 - configMapRef :
850801 name : {{ .Release.Name }}-st2-urls
851802 volumeMounts :
852- - name : st2-config-vol
853- mountPath : /etc/st2/st2.docker.conf
854- subPath : st2.docker.conf
855- - name : st2-config-vol
856- mountPath : /etc/st2/st2.user.conf
857- subPath : st2.user.conf
803+ {{- include "st2-config-volume-mounts" . | nindent 8 }}
858804 resources :
859805 {{- toYaml .Values.st2notifier.resources | nindent 10 }}
860806 {{- if .Values.st2notifier.serviceAccount.attach }}
861807 serviceAccountName : {{ template "stackstorm-ha.serviceAccountName" . }}
862808 {{- end }}
863809 volumes :
864- - name : st2-config-vol
865- configMap :
866- name : {{ .Release.Name }}-st2-config
810+ {{- include "st2-config-volume" . | nindent 8 }}
867811 {{- if .Values.dnsPolicy }}
868812 dnsPolicy : {{ .Values.dnsPolicy }}
869813 {{- end }}
@@ -959,12 +903,7 @@ spec:
959903 - configMapRef :
960904 name : {{ $.Release.Name }}-st2-urls
961905 volumeMounts :
962- - name : st2-config-vol
963- mountPath : /etc/st2/st2.docker.conf
964- subPath : st2.docker.conf
965- - name : st2-config-vol
966- mountPath : /etc/st2/st2.user.conf
967- subPath : st2.user.conf
906+ {{- include "st2-config-volume-mounts" $ | nindent 8 }}
968907 {{- if $.Values.st2.packs.images }}
969908 - name : st2-packs-vol
970909 mountPath : /opt/stackstorm/packs
@@ -992,9 +931,7 @@ spec:
992931 - key : datastore_crypto_key
993932 path : datastore_key.json
994933 {{- end }}
995- - name : st2-config-vol
996- configMap :
997- name : {{ $.Release.Name }}-st2-config
934+ {{- include "st2-config-volume" $ | nindent 8 }}
998935 {{- if $.Values.st2.packs.images }}
999936{{- include "packs-volumes" $ | indent 8 }}
1000937 {{- end }}
@@ -1081,12 +1018,7 @@ spec:
10811018 - configMapRef :
10821019 name : {{ .Release.Name }}-st2-urls
10831020 volumeMounts :
1084- - name : st2-config-vol
1085- mountPath : /etc/st2/st2.docker.conf
1086- subPath : st2.docker.conf
1087- - name : st2-config-vol
1088- mountPath : /etc/st2/st2.user.conf
1089- subPath : st2.user.conf
1021+ {{- include "st2-config-volume-mounts" . | nindent 8 }}
10901022 - name : st2-ssh-key-vol
10911023 mountPath : /home/stanley/.ssh/
10921024 readOnly : true
@@ -1117,9 +1049,7 @@ spec:
11171049 - key : datastore_crypto_key
11181050 path : datastore_key.json
11191051 {{- end }}
1120- - name : st2-config-vol
1121- configMap :
1122- name : {{ .Release.Name }}-st2-config
1052+ {{- include "st2-config-volume" . | nindent 8 }}
11231053 - name : st2-ssh-key-vol
11241054 secret :
11251055 secretName : {{ .Release.Name }}-st2-ssh
@@ -1200,21 +1130,14 @@ spec:
12001130 - configMapRef :
12011131 name : {{ .Release.Name }}-st2-urls
12021132 volumeMounts :
1203- - name : st2-config-vol
1204- mountPath : /etc/st2/st2.docker.conf
1205- subPath : st2.docker.conf
1206- - name : st2-config-vol
1207- mountPath : /etc/st2/st2.user.conf
1208- subPath : st2.user.conf
1133+ {{- include "st2-config-volume-mounts" . | nindent 8 }}
12091134 resources :
12101135 {{- toYaml .Values.st2garbagecollector.resources | nindent 10 }}
12111136 {{- if .Values.st2garbagecollector.serviceAccount.attach }}
12121137 serviceAccountName : {{ template "stackstorm-ha.serviceAccountName" . }}
12131138 {{- end }}
12141139 volumes :
1215- - name : st2-config-vol
1216- configMap :
1217- name : {{ .Release.Name }}-st2-config
1140+ {{- include "st2-config-volume" . | nindent 8 }}
12181141 {{- if .Values.dnsPolicy }}
12191142 dnsPolicy : {{ .Values.dnsPolicy }}
12201143 {{- end }}
@@ -1322,12 +1245,7 @@ spec:
13221245 - configMapRef :
13231246 name : {{ .Release.Name }}-st2-urls
13241247 volumeMounts :
1325- - name : st2-config-vol
1326- mountPath : /etc/st2/st2.docker.conf
1327- subPath : st2.docker.conf
1328- - name : st2-config-vol
1329- mountPath : /etc/st2/st2.user.conf
1330- subPath : st2.user.conf
1248+ {{- include "st2-config-volume-mounts" . | nindent 8 }}
13311249 {{- if .Values.st2.rbac.enabled }}
13321250 - name : st2-rbac-roles-vol
13331251 mountPath : /opt/stackstorm/rbac/roles/
@@ -1373,9 +1291,7 @@ spec:
13731291 - key : datastore_crypto_key
13741292 path : datastore_key.json
13751293 {{- end }}
1376- - name : st2-config-vol
1377- configMap :
1378- name : {{ .Release.Name }}-st2-config
1294+ {{- include "st2-config-volume" . | nindent 8 }}
13791295 {{- if .Values.st2.rbac.enabled }}
13801296 - name : st2-rbac-roles-vol
13811297 configMap :
0 commit comments