Skip to content

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

@databus23

Description

@databus23

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions