Skip to content

Commit

Permalink
Merge branch 'master' into prevent_perist
Browse files Browse the repository at this point in the history
  • Loading branch information
guzzijones authored Sep 27, 2023
2 parents ab787f9 + fca3c16 commit e8e8be8
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# We should periodically check to see if another fork has taken over maintenance,
# as the de-facto "best" fork has changed several times over the years.
run: |
helm plugin install https://github.com/quintush/helm-unittest
helm plugin install https://github.com/quintush/helm-unittest --version v0.2.11
- name: Install chart dependencies
run: |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Add `st2canary` job as a Helm Hook that runs before install/upgrade to ensure `st2.packs.volumes` is configured correctly (if `st2.packs.volumes.enabled`). (#323) (by @cognifloyd)
* Enable using existing `st2-auth` secret. This allows users to manage this secret outside of the Helm process. (#359) (by @bmarick)
* Prevent duplicate init containers on helm upgrade (#375) (by @guzzijones12)
* Fix st2 client config issue affecting addon jobs using jobs.extra_hooks (#370) (by @cars)


## v0.110.0
* Switch st2 to `v3.8` as a new default stable version (#347)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ For example, to use persistentVolumeClaims:
enabled: true
packs:
persistentVolumeClaim:
claim-name: pvc-st2-packs
claimName: pvc-st2-packs
virtualenvs:
persistentVolumeClaim:
claim-name: pvc-st2-virtualenvs
claimName: pvc-st2-virtualenvs
```

Or, for example, to use NFS:
Expand Down Expand Up @@ -286,7 +286,7 @@ For example, to use persistentVolumeClaims:
... # define packs and virtualenvs volumes as shown above
configs:
persistentVolumeClaim:
claim-name: pvc-st2-pack-configs
claimName: pvc-st2-pack-configs
```

Or, for example, to use NFS:
Expand Down
8 changes: 8 additions & 0 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ Create the name of the stackstorm-ha st2 auth secret to use
{{- default $name .Values.st2.existingAuthSecret -}}
{{- end -}}

{{/*
Create the name of the stackstorm-ha st2 datastore secret to use
*/}}
{{- define "stackstorm-ha.secrets.st2Datastore" -}}
{{- $name := print .Release.Name "-st2-datastore-crypto-key" -}}
{{- default $name .Values.st2.existingDatastoreSecret -}}
{{- end -}}


{{/*
Generate '-' prefix only when the variable is defined
Expand Down
14 changes: 7 additions & 7 deletions templates/deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ spec:
{{- if ne "disable" (default "" .Values.st2.datastore_crypto_key) }}
- name: st2-encryption-key-vol
secret:
secretName: {{ .Release.Name }}-st2-datastore-crypto-key
secretName: {{ include "stackstorm-ha.secrets.st2Datastore" . }}
items:
- key: datastore_crypto_key
path: datastore_key.json
Expand Down Expand Up @@ -588,7 +588,7 @@ spec:
{{- if ne "disable" (default "" .Values.st2.datastore_crypto_key) }}
- name: st2-encryption-key-vol
secret:
secretName: {{ .Release.Name }}-st2-datastore-crypto-key
secretName: {{ include "stackstorm-ha.secrets.st2Datastore" . }}
items:
- key: datastore_crypto_key
path: datastore_key.json
Expand Down Expand Up @@ -809,7 +809,7 @@ spec:
{{- if ne "disable" (default "" .Values.st2.datastore_crypto_key) }}
- name: st2-encryption-key-vol
secret:
secretName: {{ .Release.Name }}-st2-datastore-crypto-key
secretName: {{ include "stackstorm-ha.secrets.st2Datastore" . }}
items:
- key: datastore_crypto_key
path: datastore_key.json
Expand Down Expand Up @@ -924,7 +924,7 @@ spec:
{{- if ne "disable" (default "" .Values.st2.datastore_crypto_key) }}
- name: st2-encryption-key-vol
secret:
secretName: {{ .Release.Name }}-st2-datastore-crypto-key
secretName: {{ include "stackstorm-ha.secrets.st2Datastore" . }}
items:
- key: datastore_crypto_key
path: datastore_key.json
Expand Down Expand Up @@ -1230,7 +1230,7 @@ spec:
{{- if ne "disable" (default "" $.Values.st2.datastore_crypto_key) }}
- name: st2-encryption-key-vol
secret:
secretName: {{ $.Release.Name }}-st2-datastore-crypto-key
secretName: {{ include "stackstorm-ha.secrets.st2Datastore" $ }}
items:
- key: datastore_crypto_key
path: datastore_key.json
Expand Down Expand Up @@ -1379,7 +1379,7 @@ spec:
{{- if ne "disable" (default "" .Values.st2.datastore_crypto_key) }}
- name: st2-encryption-key-vol
secret:
secretName: {{ .Release.Name }}-st2-datastore-crypto-key
secretName: {{ include "stackstorm-ha.secrets.st2Datastore" . }}
items:
- key: datastore_crypto_key
path: datastore_key.json
Expand Down Expand Up @@ -1658,7 +1658,7 @@ spec:
{{- if ne "disable" (default "" .Values.st2.datastore_crypto_key) }}
- name: st2-encryption-key-vol
secret:
secretName: {{ .Release.Name }}-st2-datastore-crypto-key
secretName: {{ include "stackstorm-ha.secrets.st2Datastore" . }}
items:
- key: datastore_crypto_key
path: datastore_key.json
Expand Down
1 change: 0 additions & 1 deletion templates/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,6 @@ spec:
- '-ec'
- |
cat <<EOT > /root/.st2/config
[credentials]
{{- tpl $.Values.jobs.st2clientConfig $ | nindent 12 }}
EOT
containers:
Expand Down
4 changes: 3 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ st2:
#password: Ch@ngeMe
# Name of existing ST2 Auth secret, disables creation of this secret
# existingAuthSecret: ""
# Name of existing ST2 datastore secret, disables creation of this secret
# existingDatastoreSecret: ""

# ST2 crypto key for the K/V datastore.
# See https://docs.stackstorm.com/datastore.html#securing-secrets-admin-only for more info.
Expand Down Expand Up @@ -172,7 +174,7 @@ st2:

# example using persistentVolumeClaim:
#persistentVolumeClaim:
# claim-name: pvc-st2-packs
# claimName: pvc-st2-packs

# example using NFS:
#nfs:
Expand Down

0 comments on commit e8e8be8

Please sign in to comment.