You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,8 +187,10 @@ There are two ways to install st2 packs in the k8s cluster.
187
187
188
188
2. The other method defines shared/writable `volumes`. This method allows `st2 pack install` to work, but requires a persistent storage backend to be available in the cluster. This chart will not configure a storage backend for you.
189
189
190
+
NOTE: In general, we recommend using only one of these methods. See the NOTE under Method 2 below about how both methods can be used together with care.
191
+
190
192
### Method 1: st2packs images (the default)
191
-
The `st2packs` method is the default. `st2 pack install` does not work because this chart uses read-only `emptyDir` volumes for `/opt/stackstorm/{packs,virtualenvs}`.
193
+
The `st2packs` method is the default. `st2 pack install` does not work because this chart (by default) uses read-only `emptyDir` volumes for `/opt/stackstorm/{packs,virtualenvs}`.
192
194
Instead, you need to bake the packs into a custom docker image, push it to a private or public docker registry and reference that image in Helm values.
193
195
Helm chart will take it from there, sharing `/opt/stackstorm/{packs,virtualenvs}` via a sidecar container in pods which require access to the packs
194
196
(the sidecar is the only place where the volumes are writable).
@@ -213,6 +215,8 @@ For example:
213
215
```
214
216
Don't forget running Helm upgrade to apply new changes.
215
217
218
+
NOTE: `st2.packs.configs` will be ignored if you use `st2packs` images with `volumes.configs` (optional part of Method 2, described below).
219
+
216
220
#### Pull st2packs from a private Docker registry
217
221
If you need to pull your custom packs Docker image from a private repository, create a Kubernetes Docker registry secret and pass it to Helm values.
218
222
See [K8s documentation](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) for more info.
@@ -225,12 +229,13 @@ Once secret created, reference its name in helm value: `st2.packs.images[].pullS
225
229
### Method 2: Shared Volumes
226
230
This method requires cluster-specific storage setup and configuration. As the storage volumes are both writable and shared, `st2 pack install` should work like it does for standalone StackStorm installations. The volumes get mounted at `/opt/stackstorm/{packs,virtualenvs}` in the containers that need read or write access to those directories. With this method, `/opt/stackstorm/configs` can also be mounted as a writable volume instead of using `st2.packs.configs`.
227
231
232
+
NOTE: With care, `st2packs` images can be used with `volumes`. Just make sure to keep the `st2packs` images up-to-date with any changes made via `st2 pack install`.
233
+
If a pack is installed via an `st2packs` image and then it gets updated with `st2 pack install`, a subsequent `helm upgrade` will revert back to the version in the `st2packs` image.
234
+
228
235
#### Configure the storage volumes
229
236
Enable the `st2.packs.voluems` section of Helm values and add volume definitions for both `packs` and `virtualenvs`.
230
237
Each of the volume definitions should be customized for your cluster and storage solution.
231
238
232
-
NOTE: Make sure that `st2.packs.images` is empty. This method does not use or work with the `st2packs` images.
233
-
234
239
For example, to use persistentVolumeClaims:
235
240
```
236
241
volumes:
@@ -262,8 +267,9 @@ Please consult the documentation for your cluster's storage solution to see how
262
267
#### How to provide custom pack configs
263
268
You may either use the `st2.packs.configs` section of Helm values (like Method 1, see above),
264
269
or add another shared writable volume similar to `packs` and `virtualenvs`. This volume gets mounted
265
-
to `/opt/stackstorm/configs` instead of the `st2.packs.config` values. NOTE: If you define a configs volume,
266
-
anything in `st2.packs.configs` will NOT be visible to StackStorm.
270
+
to `/opt/stackstorm/configs` instead of the `st2.packs.config` values.
271
+
272
+
NOTE: If you define a configs volume, anything in `st2.packs.configs` will NOT be visible to StackStorm.
0 commit comments