Describe the bug
validateValues with google provider fails when serviceAccountKey or serviceAccountSecret does not exist.
Version of Helm and Kubernetes:
Kubernetes 1.13.7-gke.8
Helm v2.14.1
Which chart:
stable/external-dns
What happened:
Installing external-dns in a GKE cluster:
Error: render error in "external-dns/templates/NOTES.txt": template: external-dns/templates/NOTES.txt:7:3: executing "external-dns/templates/NOTES.txt" at <include "external-dns.validateValues" .>: error calling include: template: external-dns/templates/_helpers.tpl:138:51: executing "external-dns.validateValues" at <fail>: error calling fail:
VALUES VALIDATION:
external-dns: google.serviceAccountKey google.serviceAccountSecret
You must provide the service account key when provider="google".
Please set the service account key (--set google.serviceAccountKey="xxxx")
or reuse an existing secret (--set google.serviceAccountSecret="xxxx")
What you expected to happen:
I expect the deployment to start without any secrets mounted and for external-dns to fetch service account from metadata service, like it worked before major version 2 of the chart.
How to reproduce it (as minimally and precisely as possible):
helm upgrade --install --wait -f values.yaml external-dns stable/external-dns --version 2.0.3
values.yaml contents:
provider: google
google:
project: my-project
rbac:
create: true
apiVersion: v1
Anything else we need to know:
Before version 2 of the chart, external-dns works fine in a GKE cluster without any volume mounts. I am not totally sure about the differences in the bitnami image, whether it would behave the same.
Hi @stanislavb
My bad! I can't remember where I found the information but I understood both parameters were mandatory when using Google as provider.
I just rechecked the docs and they're not mandatory. Thanks so much for reporting it! Checking your PR!
This is still broken, as the deployment is trying to mount a secret volume that hasn't been created. https://github.com/helm/charts/blob/d58c7d46a08b040ef8ff87f83dc67911ce98f1bb/stable/external-dns/templates/deployment.yaml#L315
I've brought back the old gating around these secrets in https://github.com/helm/charts/pull/15334
Thank you! Sorry, I should have tested whether my fix actually solved the issue.
Most helpful comment
This is still broken, as the deployment is trying to mount a secret volume that hasn't been created. https://github.com/helm/charts/blob/d58c7d46a08b040ef8ff87f83dc67911ce98f1bb/stable/external-dns/templates/deployment.yaml#L315