Repository navigation
Fix subchart value deletion - #6080
Merged
thomastaylor312 merged 1 commit intoAug 14, 2019
Merged
Conversation
…nt chart's values Signed-off-by: Stefan Deitmer <[email protected]>
Author
|
The unit test that fails in circleci is green on my machine :( |
Member
|
Circle has been having some performance degradation issues as of late. Rebooting the job should let the tests pass. I've rebooted the job. |
thomastaylor312
approved these changes
Aug 14, 2019
thomastaylor312
left a comment
Contributor
There was a problem hiding this comment.
LGTM. I did some manual validation as well to make sure the normal value deletion still worked as well for non-subchart values
1 of 3 tasks
Member
|
Removing the v3 port label. This was fixed in Helm 3 during a larger refactor via #5781. |
|
Dear, According to my comment #5184 (comment), it still does not work with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR does / why we need it:
Overwriting a subchart's default value with nil in the parent chart's values.yaml should delete the value (see https://github.com/helm/helm/blob/master/docs/chart_template_guide/values_files.md#deleting-a-default-key).
closes #3804
Special notes for your reviewer:
This is my first PR for the helm project, so please let me know if it is missing anything.
The problem seemed to be that when called with a non-nil chart.Config argument, the chartutil.CoalesceValues function called coalesceDeps twice (once via coalesce and once directly).
The first call removed the subchart's value as expected, but the second call then re-introduced the value, because the nil value from the parent's values is gone.
Roughly like this:
coalesceDeps(values: {subchart.value=nil}, subchart values: {value=foo}) => result: {}
coalesceDeps(values: {}, subchart values: {value=foo}) => result: {subchart.value=foo})
I added a very minimalistic unit test and re-used the moby chart and one of its subcharts for this. Not sure if this should be expanded to include more use-cases.
If applicable: