Skip to content

Commit

Permalink
fix: make existing secrets an array of secret refs (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Kolstad authored Feb 23, 2024
1 parent 81ee2e4 commit 9b430c2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/unleash/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ sources:
- https://github.com/Unleash/unleash
- https://github.com/Unleash/helm-charts
type: application
version: 3.1.4
version: 4.0.0
6 changes: 6 additions & 0 deletions charts/unleash/examples/existingSecrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
existingSecrets:
- name: GOOGLE_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: secretname
key: secretkey
10 changes: 8 additions & 2 deletions charts/unleash/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,14 @@ spec:
key: {{ $key }}
{{- end }}
{{- end }}
{{- with .Values.existingSecrets }}
{{- tpl . $ | nindent 12 }}
{{ if .Values.existingSecrets}}
{{- range .Values.existingSecrets }}
- name: {{ .name }}
valueFrom:
secretKeyRef:
name: {{ .valueFrom.secretKeyRef.name }}
key: {{ .valueFrom.secretKeyRef.key }}
{{- end }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand Down
3 changes: 1 addition & 2 deletions charts/unleash/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ env: []
# value: https://unleash.example.com/api/auth/callback

# adds environmentvars for existing secrets to the container via tpl function
existingSecrets:
""
existingSecrets: []
# - name: GOOGLE_CLIENT_SECRET
# valueFrom:
# secretKeyRef:
Expand Down

0 comments on commit 9b430c2

Please sign in to comment.