fix(chart): secret data to stringData for cross-type compatibility

This commit is contained in:
Grraahaam
2023-03-14 01:45:00 +01:00
parent 744caf8c79
commit 4899c4de5b
2 changed files with 5 additions and 5 deletions

View File

@@ -73,7 +73,7 @@ metadata:
annotations:
"helm.sh/resource-policy": "keep"
type: Opaque
data:
stringData:
{{- $requiredVars := dict "ENCRYPTION_KEY" (randAlphaNum 32 | lower)
"JWT_SIGNUP_SECRET" (randAlphaNum 32 | lower)
"JWT_REFRESH_SECRET" (randAlphaNum 32 | lower)
@@ -86,7 +86,7 @@ data:
{{- $default := get $requiredVars $key -}}
{{- $current := get $secretData $key | b64dec -}}
{{- $v := $value | default ($current | default $default) -}}
{{ $key }}: {{ $v | quote | b64enc }}
{{ $key }}: {{ $v | quote }}
{{ end -}}
MONGO_URL: {{ include "infisical.mongodb.connectionString" . | quote | b64enc }}
MONGO_URL: {{ include "infisical.mongodb.connectionString" . | quote }}
{{- end }}

View File

@@ -73,7 +73,7 @@ metadata:
annotations:
"helm.sh/resource-policy": "keep"
type: Opaque
data:
stringData:
{{- $requiredVars := dict }}
{{- $secretObj := (lookup "v1" "Secret" .Release.Namespace (include "infisical.frontend.fullname" .)) | default dict }}
{{- $secretData := (get $secretObj "data") | default dict }}
@@ -81,6 +81,6 @@ data:
{{- $default := get $requiredVars $key -}}
{{- $current := get $secretData $key | b64dec -}}
{{- $v := $value | default ($current | default $default) -}}
{{ $key }}: {{ $v | quote | b64enc }}
{{ $key }}: {{ $v | quote }}
{{ end -}}
{{- end }}