Skip to content

Commit c98d120

Browse files
committed
allow loading extra_volumes on st2web pods
1 parent 5e60f15 commit c98d120

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

templates/deployments.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,15 @@ spec:
433433
- configMapRef:
434434
name: {{ .Release.Name }}-st2-urls
435435
optional: true
436-
{{- if or .Values.st2web.config .Values.st2web.postStartScript }}
436+
{{- if or .Values.st2web.config .Values.st2web.extra_volumes .Values.st2web.postStartScript }}
437437
volumeMounts:
438438
{{- else }}
439439
volumeMounts: []
440440
{{- end }}
441+
{{- range .Values.st2web.extra_volumes }}
442+
- name: {{ required "Each volume must have a 'name' in st2web.extra_volumes" .name }}
443+
{{- tpl (required "Each volume must have a 'mount' definition in st2web.extra_volumes" .mount | toYaml) $ | nindent 12 }}
444+
{{- end }}
441445
{{- if .Values.st2web.config }}
442446
- name: st2web-config-vol
443447
mountPath: /opt/stackstorm/static/webui/config.js
@@ -457,11 +461,15 @@ spec:
457461
{{- if .Values.st2web.serviceAccount.attach }}
458462
serviceAccountName: {{ template "stackstorm-ha.serviceAccountName" . }}
459463
{{- end }}
460-
{{- if or .Values.st2web.config .Values.st2web.postStartScript }}
464+
{{- if or .Values.st2web.config .Values.st2web.extra_volumes .Values.st2web.postStartScript }}
461465
volumes:
462466
{{- else }}
463467
volumes: []
464468
{{- end }}
469+
{{- range .Values.st2web.extra_volumes }}
470+
- name: {{ required "Each volume must have a 'name' in st2web.extra_volumes" .name }}
471+
{{- tpl (required "Each volume must have a 'volume' definition in st2web.extra_volumes" .volume | toYaml) $ | nindent 10 }}
472+
{{- end }}
465473
{{- if .Values.st2web.config }}
466474
- name: st2web-config-vol
467475
configMap:

values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ st2web:
299299
attach: false
300300
# Have st2web pod and service use HTTPS on port 443 when true. default: false (use HTTP on port 80)
301301
use_https: false
302+
# mount extra volumes on the st2web pod(s) (primarily useful for k8s-provisioned secrets)
303+
## Note that Helm templating is supported in 'mount' and 'volume'
304+
extra_volumes: []
305+
# see examples under st2workflowengine.extra_volumes
302306
# User-defined st2web config with custom settings to replace default config.js
303307
# See https://github.com/StackStorm/st2web#connecting-to-st2-server for more info
304308
# config: |

0 commit comments

Comments
 (0)