Skip to content

Commit

Permalink
Feat: Allow for provising configuration from an exisitng secret (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcollom committed Nov 2, 2023
1 parent 021d5c8 commit 37085e7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deploy/charts/version-checker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ spec:
readinessProbe:
{{- omit .Values.readinessProbe "enabled" | toYaml | nindent 10}}
{{- end }}
{{- if .Values.existingSecret }}
envFrom:
- secretRef:
name: {{.Values.existingSecret}}
{{- end }}
env:
# ACR
{{- if .Values.acr.refreshToken }}
Expand Down
12 changes: 12 additions & 0 deletions deploy/charts/version-checker/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,18 @@ tests:
key: selfhosted.bill.host
name: version-checker

# Set Environment variables from existing secrets
- it: Existing Secret for Credentials
set:
existingSecret: preexistingsecret
asserts:
- contains:
path: spec.template.spec.containers[0].envFrom
count: 1
content:
secretRef:
name: preexistingsecret

- it: SecretEnabled
set:
acr.refreshToken: asgasga
Expand Down

0 comments on commit 37085e7

Please sign in to comment.