k8s
k8s copied to clipboard
Hydra's deployment with Helm fails
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [ ] This issue affects my Ory Cloud project.
- [X] I have joined the Ory Community Slack.
- [ ] I am signed up to the Ory Security Patch Newsletter.
Describe the bug
Deploying Hydra using Helm fails with
Error: INSTALLATION FAILED: template: hydra/templates/deployment.yaml:95:15: executing "hydra/templates/deployment.yaml" at <include "hydra.utils.joinListWithComma" .Values.hydra.dangerousAllowInsecureRedirectUrls>: error calling include: template: hydra/templates/_helpers.tpl:147:20: executing "hydra.utils.joinListWithComma" at <.>: range can't iterate over true
Reproducing the bug
Clone the Helm repo
Execute helm install ory-hydra helm/charts/hydra --values .circleci/values/hydra.yaml
Relevant log output
No response
Relevant configuration
No response
Version
Latest
On which operating system are you observing this issue?
macOS
In which environment are you deploying?
Kubernetes with Helm
Additional Context
I can work around this by removing the following sections from helm/charts/hydra/templates/deployment.yaml
{{ include "hydra.utils.joinListWithComma" .Values.hydra.dangerousAllowInsecureRedirectUrls | quote }},
Hi there, sadly I could not reproduce your problem with the installation:
$ make kind-start
$ make postgresql
$ helm install ory-hydra helm/charts/hydra --values .circleci/values/hydra.yaml
NAME: ory-hydra
LAST DEPLOYED: Wed Jul 20 14:39:21 2022
NAMESPACE: default
STATUS: deployed
REVISION: 1
$ helm ls
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
ory-hydra default 1 2022-07-20 14:39:21.914077 +0200 CEST deployed hydra-0.24.1 v1.10.5
postgresql default 1 2022-07-20 14:39:04.023192 +0200 CEST deployed postgresql-11.6.17 14.4.0
Can you post the version of helm used?
I'm using 3.8.1.
I think the reason I can reproduce it is because I've set dangerousAllowInsecureRedirectUrls value like so:
hydra:
autoMigrate: true
dangerousForceHttp: true
dangerousAllowInsecureRedirectUrls: true
The template expects this to be a list: https://github.com/ory/k8s/blob/master/helm/charts/hydra/templates/deployment.yaml#L97
On the other hand, the value file accompanying the charts sets this to false: https://github.com/ory/k8s/blob/master/helm/charts/hydra/values.yaml
This is also the case in the README file.
Hi there, i think i found the source of the confusion here :)
In the cli docs the parameter is expecting a string list of urls, and that is what we expect in the chart ("foo,bar,baz").
The default value of false is there to allow the conditional to be a simple one parameter if, as otherwise the value would need to be parsed like this
hydra:
dangerousAllowInsecureRedirectUrls:
enabled: true
urls: "foo, bar, baz"
Please keep in mind that this will soon be deprecated by the new simplified --dev flag in the new hydra :)