Skip to content

Commit 5761d15

Browse files
committed
Automatically stringify st2.datastore_crypto_key and st2chatop.env values if needed.
1 parent 3ba85e6 commit 5761d15

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* Add preRegisterContentCommand in an initContainer for register-content job to run last-minute content customizations (#213) (by @cognifloyd)
2222
* Fix a bug when datastore cryto keys are not able to read by the rules engine. ``datastore_crypto_key`` volume is now mounted on the ``st2rulesengine`` pods (#223) (by @moti1992)
2323
* Minimize required sensor config by using default values from st2sensorcontainer for each sensor in st2.packs.sensors (#221) (by @cognifloyd)
24+
* Automatically stringify st2.datastore_crypto_key and st2chatop.env values if needed. (#???) (by @cognifloyd)
2425

2526
## v0.60.0
2627
* Switch st2 version to `v3.5dev` as a new latest development version (#187)

templates/secrets_datastore_crypto_key.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ metadata:
2020
type: Opaque
2121
data:
2222
# Datastore key used to encrypt/decrypt record for the KV store
23+
{{- if kindIs "string" .Values.st2.datastore_crypto_key }}
2324
datastore_crypto_key: {{ .Values.st2.datastore_crypto_key | b64enc }}
25+
{{- else }}
26+
datastore_crypto_key: {{ .Values.st2.datastore_crypto_key | toJson | b64enc }}
27+
{{- end }}
2428

2529
{{- end }}

templates/secrets_st2chatops.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ metadata:
1616
type: Opaque
1717
data:
1818
{{- range $env, $value := .Values.st2chatops.env }}
19-
{{ $env }}: {{ $value | b64enc | quote }}
19+
{{ $env }}: {{ $value | toString | b64enc | quote }}
2020
{{- end }}
2121
{{- end }}

0 commit comments

Comments
 (0)