Skip to content

gotohelm: align values loading with helm - #1804

Open
chrisseto wants to merge 1 commit into
mainfrom
chris/gotohelm-values
Open

gotohelm: align values loading with helm#1804
chrisseto wants to merge 1 commit into
mainfrom
chris/gotohelm-values

Conversation

@chrisseto

Copy link
Copy Markdown
Contributor

Prior to this change a subtle divergence existed between gotohelm's and
helm's values loading.

Helm has a "coalescing" process for merging user values that's more
involved than a simple recursive merge. It walks the chart's default
values and prunes any user provided nulls.

chart defaults:

nested:
    a: "hello"
name: "world"
forDocs: null

user values:

name: null
nested:
    a: null

Coalesced result:

nested: {}
forDocs: null

This commit utilizes helm's internal helpers to better match its
behavior and add regression tests.

As a side effect, the output of LoadValues should no longer be passed to
Dot. The few such call sites have been corrected.


Stack created with GitHub Stacks CLIGive Feedback 💬

@secpanda

secpanda commented Sep 2, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Base automatically changed from chris/gotohelm-updates to main September 2, 2026 21:35
Prior to this change a subtle divergence existed between gotohelm's and
helm's values loading.

Helm has a "coalescing" process for merging user values that's more
involved than a simple recursive merge. It walks the chart's default
values and prunes any user provided `null`s.

chart defaults:

```yaml
nested:
    a: "hello"
name: "world"
forDocs: null
```
user values:

```yaml
name: null
nested:
    a: null
```

Coalesced result:
```
nested: {}
forDocs: null
```

This commit utilizes helm's internal helpers to better match its
behavior and add regression tests.

As a side effect, the output of LoadValues should no longer be passed to
Dot. The few such call sites have been corrected.
@chrisseto
chrisseto force-pushed the chris/gotohelm-values branch from 04c3ba1 to bf7a2cc Compare September 2, 2026 21:35
Comment thread gotohelm/gochart.go
Comment on lines +284 to +287
metadata.Dependencies = slices.Clone(c.metadata.Dependencies)
for i, dep := range metadata.Dependencies {
cloned := *dep
metadata.Dependencies[i] = &cloned

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't fully understand why after cloning the slice range over and temporar variable created. Maybe I'm missing something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants