Allow diff to include crds #762
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
This PR allows usage of
helm templateflag--include-crdsduring ahelm diff upgrade.Before
When using
helmfilewithhelm diff upgradecommand you have to use post-renderer to get the fully rendered manifest and allow rendering of all resources including CRDs that are deployed via a sub-chart i.e. kyverno.Use Case
In order to be able to move a way from post-renderer and use
kustomizationbuiltin support ofhelmfilewithout breaking the manifest that you can get viahelm get manifest -n namespace releaseit is needed to allow rendering the included crds if the chart decided to render these via a dependency.It also makes
three-way-mergemore usefull as you now also get the diff for included crd changes.After
Merging this PR into an upcoming release would allow anyone to be able to catch changes to included crd changes during a
helm diff upgrade.Breaking Changes?
None to be expected, the default is set to
falsewhich reflects the current behavior. You have to pass--include-crdsexcplitictly to also render included crds when calling template before diff when using three-way-mergeWe used helm diff upgrade command in conjunction with helmfile with kustomize postrenderer.
Follow up
helmfilemaintainers could add this flag tohelmfile diffcommand in future versions. Using just the patched version would need you to add- "--include-crds"tohelmDefaults.diffArgsarray.(at)Others who read this - please upvote if you find this PR useful.