Skip to content

Commit

Permalink
allow to use encondedData, plain data and string data on secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelm41 committed Oct 13, 2023
1 parent 04fb254 commit 9fa659c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions application/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 9fa659c

Please sign in to comment.