-
Notifications
You must be signed in to change notification settings - Fork 280
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
diff is breaking for specific checks performed by bitnami/common #460
Comments
Can this problem be solved? |
@gldkru Is this a request to the maintainers to fix this or a question if it is technically possible to solve this? |
@morremeyer I want to solve this problem for myself and I found only this issue |
I'm experiencing the same issue in bitnami/charts#17717. Our workaround has been to stop using We'd like to be able to use helm-diff for these charts, though. If anyone knows of a fix in helm-diff or can help the bitnami folks make their charts compatible with helm-diff, we'd definitely prefer to use |
We are encountering the same issue here. This is preventing us from using this plugin since we use quite a few Bitnami charts. |
What happens, if you pre-define the password on values and let them not generate through helm chart? There are various additional issues, since The only way that I can see there is not using helm to generate a password. |
@jkroepke I'm not generating the password values with the chart, I'm specifying them in a secret and referencing that. As you noted, it looks like the lookup in that secret is breaking. Do I understand your comment correctly that If that's the case, I assume we can reproduce it independently from helm diff. |
Yes. ArgoCD has the same issue, because ArgoCD depends on helm template, too. But a fix seems to be merged 2 days ago on helm directly. helm/helm#9426 If a new helm version released and helm diff includes the new helm version, it cloud resolve the issue here, too. |
ArgoCD having the same issue is interesting, I know of a case where the issue went away when migrating from helmfile to ArgoCD. However, it's amazing news that there is a fix in helm itself for this. I'll check if this is still an issue with the next helm release, will update here once I find out. |
ArgoCD ref: argoproj/argo-cd#5202 |
We're having the same problem with the bitnami postgres helm chart: helmfile diff fails, helmfile sync works fine. Is there a fix for this? |
Still breaking with latest helm-diff and Helm 3.14. Correction: still breaking for tools that do not use dry-run=server. |
We're also running into this issue with Helmfile and the Bitnami Charts. Sorry for tagging you, @yxxhero, but you're currently appearing as the most active maintainer here. Do you think you could take a look at this issue? |
@philmtd ok. I will work on this. could you give me an example on github. so I can debug it. |
Thanks for having a look at it! ValuesGiven my_values.yaml:
Create Secret
Install - Success ✅
Upgrade - Success ✅
Diff - Fails ❌
Error Message:
|
Thank you for looking into it, @yxxhero! I just tested it with the latest version of Bitnami's MongoDB chart, and my configuration looks like this: create secret
create values.yamlarchitecture: "replicaset"
auth:
enabled: true
existingSecret: mongodb-credentials-test
username: test
database: test
replicaCount: 3
arbiter:
enabled: false install mongodb
Works ✅ upgrade mongodb
Works ✅ diff mongodb
Does not work ⛔ |
update yuur values.yaml
take a try. |
Sure, that would work, but it should not be necessary. The idea of having the password in a secret is that we do not want to put it in the values. And a |
ok. I got you. let me see what happened. |
HELM_DIFF_USE_UPGRADE_DRY_RUN=true, try to set the env and see the result. please. @philmtd |
That still leads to the same error, unfortunately. Also when passing dry-run as an argument ( |
--dry-run=server add this option. then please feedback. @philmtd |
and set |
I just tried this and saw that I needed to update helm-diff. Now with the latest version installed |
Only set dryrun=server |
I am the mantainer of helmfile. Will see any need to updates. |
I did that. Tried this and the env var separately and both worked.
I know :) Great! Thanks. |
could show the logs? |
Without dry run:
With
With the env:
Using Using |
see: helmfile/helmfile#1050 |
Thanks! Just to be sure: I understand you will include the dry-run flag in helmfile to circumvent this issue. But isn't there a bug in helm-diff which causes this problem? I'd imagine it would be nicer to have a bugfix in helm diff rather than having to use an extra dry-run flag every time helmfile is used. |
@philmtd not bug. helmfile requires to support dry-run logic. |
The plugin fails for a specific configuration (maybe a specific template function?) that is used in the bitnami/common chart.
It specifically leads to these bitnami charts displaying an error message on diff that certain credentials (e.g. for bitnami/mysql and bitnami/postgresql) need to be specified when upgrading, although they are set correctly.
This is evidenced by
helm upgrade
working with the same configuration without any issues (same goes for helmfile).This was discovered in bitnami/charts#15073, but also mentioned by me in bitnami/charts#15175.
Specifically, the configuration mentioned in bitnami/charts#15175 (comment) shows the error mentioned there.
Tracing this down to its source, it seems to be happening when the following line is hit: https://github.com/bitnami/charts/blob/d8211ca955bae990f4b1af121419545cb90309eb/bitnami/common/templates/_secrets.tpl#L93 (see bitnami/charts#15175 (comment)).
I deduced this from the error message in line 111 being triggered: https://github.com/bitnami/charts/blob/d8211ca955bae990f4b1af121419545cb90309eb/bitnami/common/templates/_secrets.tpl#L111, which needs the template to fall into the
else
clause in https://github.com/bitnami/charts/blob/d8211ca955bae990f4b1af121419545cb90309eb/bitnami/common/templates/_secrets.tpl#L102.This should not happen since https://github.com/bitnami/charts/blob/d8211ca955bae990f4b1af121419545cb90309eb/bitnami/common/templates/_secrets.tpl#L93 resolves to a secret being set and therefore the
if
in https://github.com/bitnami/charts/blob/d8211ca955bae990f4b1af121419545cb90309eb/bitnami/common/templates/_secrets.tpl#L94 should be entered.I'm aware that this is a very unspecific report, please let me know if I should provide an easier reproduction scenario or similar.
The text was updated successfully, but these errors were encountered: