Skip to content

Commit 7ac2ed5

Browse files
committed
add st2.packs.volumes definitions to packs-volumes templates
1 parent 51960b2 commit 7ac2ed5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

templates/_helpers.tpl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ Create the name of the stackstorm-ha service account to use
127127
emptyDir: {}
128128
- name: st2-virtualenvs-vol
129129
emptyDir: {}
130+
{{- else if .Values.st2.packs.volumes.enabled }}
131+
- name: st2-packs-vol
132+
{{ toYaml .Values.st2.packs.volumes.packs | indent 2 }}
133+
- name: st2-virtualenvs-vol
134+
{{ toYaml .Values.st2.packs.volumes.virtualenvs | indent 2 }}
130135
{{- end }}
131136
{{- end -}}
132137
{{- define "packs-volume-mounts" -}}
@@ -137,11 +142,16 @@ Create the name of the stackstorm-ha service account to use
137142
- name: st2-virtualenvs-vol
138143
mountPath: /opt/stackstorm/virtualenvs
139144
readOnly: true
145+
{{- else if .Values.st2.packs.volumes.enabled }}
146+
- name: st2-packs-vol
147+
mountPath: /opt/stackstorm/packs
148+
- name: st2-virtualenvs-vol
149+
mountPath: /opt/stackstorm/virtualenvs
140150
{{- end }}
141151
{{- end -}}
142152
# define this here as well to simplify comparison with packs-volume-mounts
143153
{{- define "packs-volume-mounts-for-register-job" -}}
144-
{{- if .Values.st2.packs.images }}
154+
{{- if or .Values.st2.packs.images .Values.st2.packs.volumes.enabled }}
145155
- name: st2-packs-vol
146156
mountPath: /opt/stackstorm/packs
147157
- name: st2-virtualenvs-vol

0 commit comments

Comments
 (0)