Skip to content

Commit

Permalink
try this
Browse files Browse the repository at this point in the history
  • Loading branch information
hspitzley-czi committed May 20, 2024
1 parent 4c56969 commit bb96e02
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions stack/templates/external_secrets_env.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{{- define "secretsTemplate" -}}
`{{ range $key, $value := . }}{{ range $name, $val := $value | fromJson }}{{$name | upper}}: {{$val}}{{ end }}{{ end }}`
{{-end }}

{{ $global := . }}
{{ range $serviceName, $serviceValues := .Values.services }}
{{- $globalValuesDict := $global.Values.global | toYaml -}}
Expand Down Expand Up @@ -29,14 +33,7 @@ spec:
mergePolicy: Replace
templateFrom:
- target: Data
literal: |
{{
`{{ range $key, $value := . }}
{{ range $name, $val := $value | fromJson }}
{{$name | upper}}: {{$val}}
{{ end }}
{{ end }}` | nindent 7
}}
literal: {{- include "secretsTemplate" -}}
data:
- secretKey: {{ $secretValue.secretName }}
remoteRef:
Expand Down

0 comments on commit bb96e02

Please sign in to comment.