Skip to content

Commit

Permalink
fix(hydra): correct format for secrets.system env value (#308)
Browse files Browse the repository at this point in the history
* fix(hydra): correct format for secrets.system env value

* bump circleci image

* implement suggestions
  • Loading branch information
alessiodionisi authored Aug 11, 2021
1 parent d279698 commit 8b10260
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .circleci/values/hydra.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
repository: oryd/hydra
tag: v1.10.2-alpine
tag: v1.10.3-alpine
pullPolicy: IfNotPresent

ingress:
Expand All @@ -23,7 +23,6 @@ hydra:
- "foo bar 123 456 lorem 3"
maester:
enabled: false

# deployment:
# extraVolumes:
# - name: my-volume
Expand All @@ -36,4 +35,4 @@ maester:

# watcher:
# enabled: true
# mountFile: /etc/secrets/my-secret/foo
# mountFile: /etc/secrets/my-secret/foo
10 changes: 7 additions & 3 deletions helm/charts/hydra/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,16 @@ Generate the secrets.system value
{{- define "hydra.secrets.system" -}}
{{- if .Values.hydra.config.secrets.system -}}
{{- if kindIs "slice" .Values.hydra.config.secrets.system -}}
{{- printf "'%s'" ( mustToRawJson .Values.hydra.config.secrets.system ) -}}
{{- if gt (len .Values.hydra.config.secrets.system) 1 -}}
"{{- join "\",\"" .Values.hydra.config.secrets.system -}}"
{{- else -}}
{{- join "" .Values.hydra.config.secrets.system -}}
{{- end -}}
{{- else -}}
{{- fail "Expected .Values.hydra.config.secrets.system to be a list of strings" -}}
{{- fail "Expected hydra.config.secrets.system to be a list of strings" -}}
{{- end -}}
{{- else if .Values.demo -}}
'["a-very-insecure-secret-for-checking-out-the-demo"]'
a-very-insecure-secret-for-checking-out-the-demo
{{- end -}}
{{- end -}}
Expand Down

0 comments on commit 8b10260

Please sign in to comment.