Skip to content

Commit 4887361

Browse files
committed
allow using st2.packs.volumes with st2.packs.images
1 parent b80a058 commit 4887361

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

templates/deployments.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
{{- fail "Value st2.packs.image was renamed to st2.packs.images and is now a list of images" }}
44
{{- end }}
55
{{- if .Values.st2.packs.volumes.enabled }}
6-
{{- if .Values.st2.packs.images }}
7-
{{- fail "st2.packs.images is not compatible with st2.packs.volumes.enabled. Please use only one method for setting up packs directories." }}
8-
{{- end }}
96
{{- if not (and .Values.st2.packs.volumes.packs .Values.st2.packs.volumes.virtualenvs) }}
107
{{- fail "Volume definition(s) missing! When st2.packs.volumes.enabled, you must define volumes for both packs and virtualenvs." }}
118
{{- end }}
@@ -186,7 +183,7 @@ spec:
186183
initContainers:
187184
{{- include "init-containers-wait-for-db" . | nindent 6 }}
188185
{{- include "init-containers-wait-for-mq" . | nindent 6 }}
189-
{{- if .Values.st2.packs.images }}
186+
{{- if and .Values.st2.packs.images (not .Values.st2.packs.volumes.enabled) }}
190187
{{- include "packs-initContainers" . | nindent 6 }}
191188
{{- end }}
192189
containers:
@@ -1039,7 +1036,7 @@ spec:
10391036
initContainers:
10401037
{{- include "init-containers-wait-for-db" $ | nindent 6 }}
10411038
{{- include "init-containers-wait-for-mq" $ | nindent 6 }}
1042-
{{- if $.Values.st2.packs.images }}
1039+
{{- if and $.Values.st2.packs.images (not $.Values.st2.packs.volumes.enabled) }}
10431040
{{- include "packs-initContainers" $ | nindent 6 }}
10441041
{{- end }}
10451042
containers:
@@ -1177,7 +1174,7 @@ spec:
11771174
initContainers:
11781175
{{- include "init-containers-wait-for-db" . | nindent 6 }}
11791176
{{- include "init-containers-wait-for-mq" . | nindent 6 }}
1180-
{{- if .Values.st2.packs.images }}
1177+
{{- if and .Values.st2.packs.images (not .Values.st2.packs.volumes.enabled) }}
11811178
{{- include "packs-initContainers" . | nindent 6 }}
11821179
{{- end }}
11831180
containers:
@@ -1399,7 +1396,7 @@ spec:
13991396
- name: {{ .Values.image.pullSecret }}
14001397
{{- end }}
14011398
initContainers:
1402-
{{- if .Values.st2.packs.images }}
1399+
{{- if and .Values.st2.packs.images (not .Values.st2.packs.volumes.enabled) }}
14031400
{{- include "packs-initContainers" . | nindent 6 }}
14041401
{{- end }}
14051402
# Sidecar container for generating st2client config with st2 username & password pair and sharing produced file with the main container

values.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ st2:
9292
# For each given st2packs container you can define repository, name, tag and pullPolicy for this image below.
9393
# Multiple pack images can help when dealing with frequent updates by only rebuilding smaller images for desired packs
9494
# E.g. having all desired StackStorm-Exchange packs in one image and several custom packs in additional images
95-
#
96-
# This must be empty if st2.packs.volumes is enabled.
9795
images: []
9896
#- repository: index.docker.io/stackstorm
9997
# name: st2packs
@@ -104,15 +102,14 @@ st2:
104102

105103
# Custom packs volumes definitions.
106104
#
107-
# Use this instead of st2.packs.images to have StackStorm use persistent/shared/writable storage configured
108-
# previously in your cluster. The choice of storage solution is cluster-dependent (it changes besed on where the
109-
# cluster is hosted and which storage solutions are available in your cluster).
105+
# Use this to have StackStorm use persistent/shared/writable storage configured previously in your cluster.
106+
# The choice of storage solution is cluster-dependent (it changes besed on where the cluster is hosted
107+
# and which storage solutions are available in your cluster).
110108
#
111109
# To use this, set enabled to true, and add cluster-specific volume definitions for at least packs and virtualenvs below.
112110
# Please consult the documentation for your cluster's storage solution.
113111
# Some generic examples are listed under st2.packs.volumes.packs below.
114112
volumes:
115-
# to enable st2.packs.volumes, st2.packs.images must not be empty
116113
enabled: false
117114

118115
packs: {}

0 commit comments

Comments
 (0)