From 9fa659c2a6e9082563d2bee26a240f03c0e74972 Mon Sep 17 00:00:00 2001 From: emmanuelm41 Date: Fri, 13 Oct 2023 08:58:18 -0300 Subject: [PATCH] allow to use encondedData, plain data and string data on secrets --- application/templates/secret.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/application/templates/secret.yaml b/application/templates/secret.yaml index a1c9cb4b..dbc0f726 100644 --- a/application/templates/secret.yaml +++ b/application/templates/secret.yaml @@ -15,20 +15,22 @@ metadata: annotations: {{ toYaml $.Values.secret.annotations | indent 4 }} {{- end }} -{{- if .data }} +{{- if .data or .encodedData }} data: +{{- if .data }} {{- range $key, $value := .data }} {{ $key }}: {{ $value | b64enc }} {{- end }} -{{- else if .stringData }} +{{- else }} +{{- range $key, $value := .encodedData }} + {{ $key }}: {{ $value }} +{{- end }} +{{- end }} +{{- if .stringData }} stringData: {{- range $key, $value := .stringData }} {{ $key }}: {{ $value }} {{- end }} -{{- else if .encodedData }} -data: -{{- range $key, $value := .encodedData }} - {{ $key }}: {{ $value }} {{- end }} {{- end }} {{- end }}