Skip to content

Commit 7be8ebc

Browse files
committed
explain using volumes with st2packs images in README
1 parent 1bf2ae9 commit 7be8ebc

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,10 @@ There are two ways to install st2 packs in the k8s cluster.
187187

188188
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.
189189

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+
190192
### 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}`.
192194
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.
193195
Helm chart will take it from there, sharing `/opt/stackstorm/{packs,virtualenvs}` via a sidecar container in pods which require access to the packs
194196
(the sidecar is the only place where the volumes are writable).
@@ -213,6 +215,8 @@ For example:
213215
```
214216
Don't forget running Helm upgrade to apply new changes.
215217

218+
NOTE: `st2.packs.configs` will be ignored if you use `st2packs` images with `volumes.configs` (optional part of Method 2, described below).
219+
216220
#### Pull st2packs from a private Docker registry
217221
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.
218222
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
225229
### Method 2: Shared Volumes
226230
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`.
227231

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+
228235
#### Configure the storage volumes
229236
Enable the `st2.packs.voluems` section of Helm values and add volume definitions for both `packs` and `virtualenvs`.
230237
Each of the volume definitions should be customized for your cluster and storage solution.
231238

232-
NOTE: Make sure that `st2.packs.images` is empty. This method does not use or work with the `st2packs` images.
233-
234239
For example, to use persistentVolumeClaims:
235240
```
236241
volumes:
@@ -262,8 +267,9 @@ Please consult the documentation for your cluster's storage solution to see how
262267
#### How to provide custom pack configs
263268
You may either use the `st2.packs.configs` section of Helm values (like Method 1, see above),
264269
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.
267273

268274
For example, to use persistentVolumeClaims:
269275
```

0 commit comments

Comments
 (0)