Skip to content

Commit 42a4a84

Browse files
committed
Automatically stringify st2.datastore_crypto_key and st2chatop.env values if needed.
1 parent 4d19ef9 commit 42a4a84

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
@@ -22,6 +22,7 @@
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)
2424
* Do not template rabbitmq secrets file unless rabbitmq subchart is enabled. (#242) (by @cognifloyd)
25+
* Automatically stringify st2.datastore_crypto_key and st2chatop.env values if needed. (#241) (by @cognifloyd)
2526

2627
## v0.60.0
2728
* 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)