Skip to content

Commit c7f50cd

Browse files
committed
add pack-configs-volume to more pods when st2.packs.volumes.enabled
1 parent 0e603ad commit c7f50cd

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

templates/_helpers.tpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,14 @@ Create the name of the stackstorm-ha service account to use
122122

123123
# consolidate pack-configs-volumes definitions
124124
{{- define "pack-configs-volume" -}}
125+
{{- if and .Values.st2.packs.volumes.enabled .Values.st2.packs.volumes.configs }}
126+
- name: st2-pack-configs-vol
127+
{{ toYaml .Values.st2.packs.volumes.configs | indent 2 }}
128+
{{- else }}
125129
- name: st2-pack-configs-vol
126130
configMap:
127131
name: {{ .Release.Name }}-st2-pack-configs
132+
{{- end }}
128133
{{- end -}}
129134
{{- define "pack-configs-volume-mount" -}}
130135
- name: st2-pack-configs-vol

templates/deployments.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ spec:
201201
readOnly: true
202202
{{- end }}
203203
{{- include "packs-volume-mounts" . | nindent 8 }}
204+
{{- if .Values.st2.packs.volumes.enabled }}
205+
{{- include "pack-configs-volume-mount" . | nindent 8 }}
206+
{{- end }}
204207
{{- if .Values.st2api.postStartScript }}
205208
- name: st2-post-start-script-vol
206209
mountPath: /post-start.sh
@@ -226,6 +229,9 @@ spec:
226229
{{- end }}
227230
{{- include "st2-config-volume" . | nindent 8 }}
228231
{{- include "packs-volumes" . | nindent 8 }}
232+
{{- if .Values.st2.packs.volumes.enabled }}
233+
{{- include "pack-configs-volume" . | nindent 8 }}
234+
{{- end }}
229235
{{- if .Values.st2api.postStartScript }}
230236
- name: st2-post-start-script-vol
231237
configMap:
@@ -1186,6 +1192,9 @@ spec:
11861192
readOnly: true
11871193
{{- end }}
11881194
{{- include "packs-volume-mounts" . | nindent 8 }}
1195+
{{- if .Values.st2.packs.volumes.enabled }}
1196+
{{- include "pack-configs-volume-mount" . | nindent 8 }}
1197+
{{- end }}
11891198
- name: st2-post-start-script-vol
11901199
mountPath: /post-start.sh
11911200
subPath: post-start.sh
@@ -1217,6 +1226,9 @@ spec:
12171226
# 0400 file permission
12181227
mode: 256
12191228
{{- include "packs-volumes" . | nindent 8 }}
1229+
{{- if .Values.st2.packs.volumes.enabled }}
1230+
{{- include "pack-configs-volume" . | nindent 8 }}
1231+
{{- end }}
12201232
- name: st2-post-start-script-vol
12211233
configMap:
12221234
name: {{ .Release.Name }}-st2actionrunner-post-start-script

values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ st2:
8181
packs:
8282
# Custom StackStorm pack configs. Each record creates a file in '/opt/stackstorm/configs/'
8383
# https://docs.stackstorm.com/reference/pack_configs.html#configuration-file
84+
# NOTE: This is ignored if st2.packs.volumes.configs is defined and st2.packs.volumes is enabled
8485
configs:
8586
core.yaml: |
8687
---

0 commit comments

Comments
 (0)