Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helm template command fails #355

Closed
cardoe opened this issue Jan 26, 2024 · 2 comments · Fixed by #364
Closed

helm template command fails #355

cardoe opened this issue Jan 26, 2024 · 2 comments · Fixed by #364

Comments

@cardoe
Copy link
Contributor

cardoe commented Jan 26, 2024

When using helm template locally or via ArgoCD it fails due to the comments posted on #249.

error: Error: execution error at (nautobot/templates/secret.yaml:17:4): Existing Nautobot DB secret 'my-existing-secret' not found!

But I can confirm the secret is there.

cardoe added a commit to cardoe/helm-charts that referenced this issue Jan 27, 2024
Utilize the DB password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Jan 27, 2024
Utilize the DB password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Jan 27, 2024
Utilize the DB password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Jan 29, 2024
Utilize the DB password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Feb 4, 2024
Utilize the Redis password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Feb 16, 2024
Utilize the DB password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Feb 16, 2024
Utilize the Redis password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Feb 20, 2024
Utilize the DB password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Feb 20, 2024
Utilize the Redis password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Feb 20, 2024
Utilize the DB password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Feb 20, 2024
Utilize the Redis password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Feb 21, 2024
Utilize the DB password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Feb 21, 2024
Utilize the Redis password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
cardoe added a commit to cardoe/helm-charts that referenced this issue Feb 26, 2024
Utilize the Redis password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing nautobot#355 and allows references, fixing nautobot#283.
ubajze pushed a commit that referenced this issue Feb 26, 2024
* allow providing DB password via secret ref

Utilize the DB password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing #355 and allows references, fixing #283.

* allow providing Redis password via secret ref

Utilize the Redis password supplied from the k8s secret reference instead
of copying it into a Nautobot specific secret. This fixes issues with
"helm template", fixing #355 and allows references, fixing #283.
@m4rg4sh
Copy link
Contributor

m4rg4sh commented Feb 28, 2024

Hi @cardoe,

Thank you so much for your work, we've hit the same issue pretty much on the day you opened your issues.
I've tried your contributed code yesterday and I have found two issues with it:

a) Your reference for .Values.postgresql.auth.secretsKeys.adminPasswordKey has a typo which conflicts with the postgresql subchart (secretsKeys vs secretKeys) and also references the admin password where instead it should use the user password.

b) Your solution conflicts with the documented usage of preexisting secrets. If used as documented in the top half (without specifying nautobot.db.existingSecret) it will actually overwrite any existing password in the referenced secret with empty string.

I've written a fix for both issues and will open a PR for it in a moment.
I've tested it with the postgresql but I think it should just as well work with mariadb or postgresqlha.

Again thank you so much for you work, you saved me a lot of headaches 👍

@cardoe
Copy link
Contributor Author

cardoe commented Feb 28, 2024

Apologies for the mistakes and thank you for creating a PR as a follow up.

@cardoe cardoe closed this as completed Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants