Skip to content

Commit 25aceff

Browse files
committed
add st2.resetPassword to force changing the password on upgrade
1 parent afb265e commit 25aceff

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

templates/secrets_st2auth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ data:
2424
# Username, used to login to StackStorm system (default: st2admin)
2525
username: {{ required "A valid secret 'st2.username' is required for StackStorm auth!" .Values.st2.username | b64enc | quote }}
2626
# Password, used to login to StackStorm system (default: auto-generated)
27-
{{- if .Release.IsUpgrade }}
27+
{{- if and .Release.IsUpgrade (not .Values.st2.resetPassword) }}
2828
password: {{ index (lookup "v1" "Secret" .Release.Namespace $name).data "password" }}
2929
{{ else }}
3030
password: {{ default (randAlphaNum 12) .Values.st2.password | b64enc | quote }}

values.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ serviceAccount:
4343
st2:
4444
# Username, used to login to StackStorm system
4545
username: st2admin
46-
# Password, used to login to StackStorm system
47-
# (auto-generated by default, preserved across upgrades)
46+
# Password, used to login to StackStorm system (auto-generated by default)
47+
# The password (set here or auto-generated) is preserved across upgrades.
4848
#password: Ch@ngeMe
49+
# To force the password to reset (using st2.password, or a newly generated one),
50+
# you can use `helm upgrade --set st2.resetPassword=true`.
51+
resetPassword: false
4952
# ST2 crypto key for the K/V datastore.
5053
# See https://docs.stackstorm.com/datastore.html#securing-secrets-admin-only for more info.
5154
# Warning! Replace with your own generated key!

0 commit comments

Comments
 (0)