File tree Expand file tree Collapse file tree 3 files changed +16
-11
lines changed
Expand file tree Collapse file tree 3 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,17 @@ Create the name of the stackstorm-ha service account to use
120120 {{- end }}
121121{{- end -}}
122122
123+ # consolidate pack-configs-volumes definitions
124+ {{- define " pack-configs-volume" -}}
125+ - name: st2-pack-configs-vol
126+ configMap:
127+ name: {{ .Release.Name }}-st2-pack-configs
128+ {{- end -}}
129+ {{- define " pack-configs-volume-mount" -}}
130+ - name: st2-pack-configs-vol
131+ mountPath: /opt/stackstorm/configs/
132+ {{- end -}}
133+
123134# For custom st2packs-Container reduce duplicity by defining it here once
124135{{- define " packs-volumes" -}}
125136 {{- if .Values.st2.packs.images }}
Original file line number Diff line number Diff line change @@ -1433,8 +1433,6 @@ spec:
14331433 - name : st2-rbac-mappings-vol
14341434 mountPath : /opt/stackstorm/rbac/mappings/
14351435 {{- end }}
1436- - name : st2-pack-configs-vol
1437- mountPath : /opt/stackstorm/configs/
14381436 - name : st2client-config-vol
14391437 mountPath : /root/.st2/
14401438 - name : st2-ssh-key-vol
@@ -1445,6 +1443,7 @@ spec:
14451443 readOnly : true
14461444 {{- end }}
14471445 {{- include "packs-volume-mounts" . | nindent 8 }}
1446+ {{- include "pack-configs-volume-mount" . | nindent 8 }}
14481447 - name : st2-post-start-script-vol
14491448 mountPath : /post-start.sh
14501449 subPath : post-start.sh
@@ -1481,9 +1480,6 @@ spec:
14811480 configMap :
14821481 name : {{ .Release.Name }}-st2-rbac-mappings
14831482 {{- end }}
1484- - name : st2-pack-configs-vol
1485- configMap :
1486- name : {{ .Release.Name }}-st2-pack-configs
14871483 - name : st2client-config-vol
14881484 emptyDir :
14891485 medium : Memory
@@ -1496,6 +1492,7 @@ spec:
14961492 # 0400 file permission
14971493 mode : 256
14981494 {{- include "packs-volumes" . | nindent 8 }}
1495+ {{- include "pack-configs-volume" . | nindent 8 }}
14991496 - name : st2-post-start-script-vol
15001497 configMap :
15011498 name : {{ .Release.Name }}-st2client-post-start-script
Original file line number Diff line number Diff line change @@ -406,17 +406,14 @@ spec:
406406 - --register-fail-on-failure
407407 volumeMounts :
408408 {{- include "st2-config-volume-mounts" . | nindent 8 }}
409- - name : st2-pack-configs-vol
410- mountPath : /opt/stackstorm/configs/
411409 {{- include "packs-volume-mounts-for-register-job" . | nindent 8 }}
410+ {{- include "pack-configs-volume-mount" . | nindent 8 }}
412411 # TODO: Find out default resource limits for this specific service (#5)
413412 # resources:
414413 volumes :
415414 {{- include "st2-config-volume" . | nindent 8 }}
416- - name : st2-pack-configs-vol
417- configMap :
418- name : {{ .Release.Name }}-st2-pack-configs
419- {{- include "packs-volumes" $ | nindent 8 }}
415+ {{- include "packs-volumes" . | nindent 8 }}
416+ {{- include "pack-configs-volume" . | nindent 8 }}
420417 restartPolicy : OnFailure
421418 {{- if .Values.dnsPolicy }}
422419 dnsPolicy : {{ .Values.dnsPolicy }}
You can’t perform that action at this time.
0 commit comments