Repository navigation
Description
Output of helm version: version.BuildInfo{Version:"v3.13.1", GitCommit:"3547a4b5bf5edb5478ce352e18858d8a552a4110", GitTreeState:"clean", GoVersion:"go1.20.8"}
Output of kubectl version: N/A, reproducible without k8s
Cloud Provider/Platform (AKS, GKE, Minikube etc.): N/A
First off I am very excited to have a fix for #9027 , thank you for working on this!!
I seem to have found a peculiar bug though.
Following closely the reproduction steps from #9027 , I set up an environment using the same tarball:
$ mkdir demo
$ cd demo
$ wget https://github.com/helm/helm/files/5549239/chart.tar.gz
$ tar xf chart.tar.gz
$ cat Chart.yaml
apiVersion: v2
name: demo
version: 0.1.0
dependencies:
- name: subchart
version: 0.1.0
$ file charts/subchart/templates/._values.yaml # ????
charts/subchart/templates/._values.yaml: AppleDouble encoded Macintosh file
$ rm charts/subchart/templates/._values.yaml
Confirm that the original issue is fixed - subchart.hash.key1 and key2 are removed since they are set to null in values.yaml
$ ~/helm-v3.13.1/helm template .
---
# Source: demo/charts/subchart/templates/values.yaml
global:
hash:
key3: 13
key4: 4
key5: 5
key6: 6
hash:
key3: 13
key4: 4
key5: 5
key6: 6
But after hours of banging my head against the wall I eventually found that the strange issue I was seeing is apparently triggered when you use the --values command line option. Even though ./values.yaml is the real source of values being used by the above command, if you specify it with --values values.yaml the behaviour changes!
$ ~/helm-v3.13.1/helm template . --values values.yaml
---
# Source: demo/charts/subchart/templates/values.yaml
global:
hash:
key3: 13
key4: 4
key5: 5
key6: 6
hash:
key1: 1
key2: 2
key3: 13
key4: 4
key5: 5
key6: 6
Same thing if you specify an absolute path to the values.yaml file:
$ ~/helm-v3.13.1/helm template . --values /home/fedora/demo/values.yaml
or copy it somewhere else:
$ cp values.yaml /tmp/whatever.yaml
$ ~/helm-v3.13.1/helm template . --values /tmp/whatever.yaml
I found the same result with 3.13.0.
In v3.12.3 the behaviour is different but if anything more confusing:
$ ~/helm-v3.12.3/helm template .
---
# Source: demo/charts/subchart/templates/values.yaml
global:
hash:
key3: 13
key4: 4
key5: 5
key6: 6
hash:
key1: 1
key2: 2
key3: 13
key4: 4
key5: 5
key6: 6
$ ~/helm-v3.12.3/helm template . --values values.yaml
---
# Source: demo/charts/subchart/templates/values.yaml
global:
hash:
key1: 1
key2: 2
key3: 13
key4: 4
key5: 5
key6: 6
hash:
key3: 13
key4: 4
key5: 5
key6: 6
Anyway surely the location of the values file and the fact that I have specified it with --values should not make any difference - only the content of that file should affect the outcome of the templating. I thought values (and values files) specified on the command line should still be the highest priority?
Activity
gjenkins8 commentedon Oct 13, 2023
3.13.1 had a fix: #12480
Could you please retry with 3.13.1. Thanks!
rptaylor commentedon Oct 13, 2023
@gjenkins8 My "Output of helm version" and reproduction steps shown here indicate that this is with helm 3.13.1. I also tried 3.13.0 with the same result. I mentioned v3.13.0 in the title since that is when the change occurred.
aabouzaid commentedon Oct 14, 2023
As mentioned in #12490, I confirm that the issue happens with Helm 3.13.0/3.13.1.
gjenkins8 commentedon Oct 15, 2023
Thanks. The issue title says v3.13.0, so I wanted to clarify. Lets focus on v3.13.1, given #12480
[-]change in values handling with v3.13.0 when --values flag is used[/-][+]change in values handling with v3.13.0, v3.13.1 when --values flag is used[/+]rptaylor commentedon Oct 17, 2023
@gjenkins8 can this be labelled as a bug rather than question/support?
Our workflow requires specifying a values file so we can not benefit from the fixes in v3.13.0 yet. Also when you install a chart from a remote repository I think you would generally always rely on using a custom values file.
[-]change in values handling with v3.13.0, v3.13.1 when --values flag is used[/-][+]subchart keys can not be removed by parent chart in v3.13.0, v3.13.1 when --values (-f) flag is used[/+]rptaylor commentedon Oct 30, 2023
@gjenkins8 Could you please have another look at the labels on this issue if you have a moment?
There have been several duplicate issues opened for this bug. It still prevents the removal of subchart keys in v3.13 from working since the
--valuesflag is (at least I think) typically used in most situations.ReneWerner87 commentedon Nov 7, 2023
@gjenkins8 can confirm, problem also exists in the latest version (with Helm 3.13.0/3.13.1)
[-]subchart keys can not be removed by parent chart in v3.13.0, v3.13.1 when --values (-f) flag is used[/-][+]subchart keys can not be removed by parent chart in v3.13.* when --values (-f) flag is used[/+]rptaylor commentedon Nov 21, 2023
@mattfarina Could you please take a look at this? Thanks!
messiahUA commentedon Jan 10, 2024
I experience this on helm v3.13.3 and hope this will be addressed sooner than later.
gavin-jeong commentedon Jan 19, 2024
Same with v3.14.0
5 remaining items
github-actions commentedon Jul 20, 2024
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
rptaylor commentedon Jul 22, 2024
Looks like this still has not been fixed.
akiyashkin-ronasit commentedon Aug 20, 2024
This is such a painful issue for us because of a widespread use of nodeSelector in some of the charts. Please, would anyone fix this?
crumdev commentedon Sep 13, 2024
Still happening
version.BuildInfo{Version:"v3.15.1", GitCommit:"e211f2aa62992bd72586b395de50979e31231829", GitTreeState:"clean", GoVersion:"go1.22.3"}Have a simple dependency chart let's say mysubchart with a default array of objects:
then in parent values.dev.yaml passing in
but when running
helm template mychart -f values.dev.yaml .It is not being overwritten.Comment on solution for grafana UID/GID workaround
Comment on solution for grafana UID/GID workaround
Comment on solution for grafana UID/GID workaround
Comment on solution for grafana UID/GID workaround
Comment on solution for grafana UID/GID workaround
alimoezzi commentedon Dec 7, 2024
Still relevant.
alice-sawatzky commentedon Mar 20, 2025
if there's a pull request to fix this issue, and the pull request is not merged, why is the issue marked as fixed?
scottrigby commentedon Apr 18, 2025
Hi @alice-sawatzky, #12879, which fixed the issue in
main, and a backport PR for v3 were both merged. This fix was released in Helm v13.7.1. See #12879 (comment)