-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Detect unsupported helm functions in charts and show a warning #14944
Comments
I think a reactive approach will be much more reliable than proactive. A proactive approach would probably require regex'ing every YAML file in a Helm repo with something like this: {{[^}]*(lookup|random) [^}]*}} The regex could yield false positives (for example, when a lookup is inside conditional logic) or false negatives (when the lookup is in a dependency chart, or because of a bug in the regex). By contrast, detecting an error message from Helm saying " |
Good point 💯
is helm already doing this? Then the tricky part of this feature is already solved this would just not work with function like random value generation which are supported, but misbehave with ArgoCD / GitOps https://argo-cd.readthedocs.io/en/stable/user-guide/helm/#random-data |
I think it does product a meaningful/detectable error message today. Yeah, random is a bit tricker, since the issue doesn't surface as an error message. |
Summary
ArgoCD is using
helm template
which doesn’t support all features / functions inside templates. The idea (in comparisons to documentation only solution #14943), ArgoCD should detect the usage of unsupported functions in charts.Motivation
Currently it’s hard to debug why a 3rd part chart might not work an expected. e.g. bitnami/charts#18130 which deloys a dependency chart which uses the
random
function for secret generation. As mentioned here https://argo-cd.readthedocs.io/en/stable/user-guide/helm/#random-dataProposal
If possible use Helm to get the raw templates.
ArgoCD should maintain a list of unsupported functions. A warning could be shown if any of these is present. I would need to check what parsing capabilities are present, ideally it would be possible to generate a “mitigation”
e.g. ignoreDiffs.
Alternatively a list of 3rd part charts could be added, where known issues exists. This would require some community effort to add / maintain charts with known issues but overall would make the ArgoCD experience more smooth.
The text was updated successfully, but these errors were encountered: