Skip to content

Drop null overrides of chart defaults in MergeValues - #151

Open
ArnobKumarSaha wants to merge 1 commit into
masterfrom
arnob-null-values
Open

ArnobKumarSaha wants to merge 1 commit into
masterfrom
arnob-null-values

Conversation

@ArnobKumarSaha

Copy link
Copy Markdown
Contributor

MergeValues merges the chart's values.yaml with user values itself, and install/upgrade/template then set chrt.Values = {} before calling Helm. Helm only deletes a key=null override when the key exists in chart.Values (chartutil/coalesce.go), so the null survives and fails JSON schema validation:

argocd-agent-principal:
- at '/podSecurityContext/runAsUser': got null, want integer

This deletes null overrides of keys present in the chart defaults, matching the helm CLI. Nulls for keys absent from the defaults are kept, as Helm does. The ReplaceValues and ValuesPatch paths are unchanged.

MergeValues merges chart defaults with user values itself and callers
blank chart.Values, so Helm's coalesce never removes keys set to null.
The nulls then reach JSON schema validation (e.g. 'got null, want
integer'). Delete null overrides of chart defaults, as the helm CLI does.

Signed-off-by: Arnob kumar saha <arnob@appscode.com>
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

Successfully merging this pull request may close these issues.

1 participant