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 diff (v3) does not work when crd resources are generated #158

Closed
databus23 opened this issue Oct 25, 2019 · 6 comments
Closed

helm diff (v3) does not work when crd resources are generated #158

databus23 opened this issue Oct 25, 2019 · 6 comments
Assignees

Comments

@databus23
Copy link
Owner

databus23 commented Oct 25, 2019

It turns out that helm template (which we call out when doing helm diff upgrade with helm version 3 ), refuses to render resources in client-only mode that use anything but the default api versions:
This PR tries to address this in helm helm/helm#6729 disabling the version check.

Using --validate as suggested here helm/helm#6680 is not an option because it will cause helm template to fail if the rendered resource already exists in the cluster: helm/helm#6663

So at the moment the only option to diff a chart that renders crd resources is to explicitly pass the --api-versions flag to helm template.

My hope is that helm/helm#6729 is merged fixing this. Its quite tedious that the user of helm diff needs to know (and specify) which apiversions are used in the chart (or any dependency) otherwise.

I created a workaround for now that hopefully can be removed eventually cd5743f. So by manually specifying HELM_TEMPLATE_API_VERSIONS the api version check of helm template can be satisfied.

@mumoshu
Copy link
Collaborator

mumoshu commented Oct 28, 2019

@databus23 Thanks. I've commented on the upstream issue: helm/helm#6729 (comment)

Broadly speaking, I think it's a kind of an upstream regression and the PR has some value to be merged before 3.0.0 goes GA 🤔

@thomastaylor312
Copy link

@mumoshu Thanks for bringing this up in the Helm issue. @databus23 I'm talking to the other maintainers because you aren't the only ones who have ran into this. We'll update that PR if people are all in agreement with bringing it in to 3.0.0

@mumoshu
Copy link
Collaborator

mumoshu commented Oct 29, 2019

@thomastaylor312 Thanks as always for your support 👍

@databus23 We still have on-going discussions in helm/helm#6729 but anyway - helm/helm#6729 won't be merged as-is.

A possible alternative that may work, from the helm-diff pov, is to change --helm template --validate=false to actually disable api versions check and helm-diff uses that. Does it sound good to you?

@mumoshu
Copy link
Collaborator

mumoshu commented Oct 29, 2019

to change --helm template --validate=false to actually disable api versions check and helm-diff uses that

Sorry I'm confused. I think that's what helm/helm#6729 is intended for in the first place :)

@thomastaylor312
Copy link

@databus23 We should have fixed this with the latest master. We had some code that was left over in a sorting method that was validating API versions. Now helm template will not try to validate your APIs unless you have passed the --validate flag

@databus23
Copy link
Owner Author

Indeed the problem seems to be fixed with 3.0.0-rc.1. Hurray!

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

No branches or pull requests

3 participants