Repository navigation
Description
#2648 allows for deletion of keys by setting null values in a values.yaml file. However it doesn't work for nested values, e.g.:
web:
livenessProbe:
httpGet: null
exec:
command:
- curl
- -f
- http://localhost:8080/api/v1/infoWill not remove web.livenessProbe.httpGet from the original values, rather it just overrides the value with null and prints the warning:
2019/01/18 11:30:07 Warning: Merging destination map for chart 'concourse'. Cannot overwrite table item 'httpGet', with non table value: map[path:/api/v1/info port:atc]
Ironically, above is a small variant on the example given in the docs, which I'm pretty sure does not actually do what it claims to: https://docs.helm.sh/chart_template_guide/#deleting-a-default-key
I suspect that since the template rendering doesn't seem to differentiate much between a null value and a value not being specified, that this warnings are being ignored and not having much effect.
Output of helm version:
Client: &version.Version{SemVer:"v2.12.1", GitCommit:"02a47c7249b1fc6d8fd3b94e6b4babf9d818144e", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.12.1", GitCommit:"02a47c7249b1fc6d8fd3b94e6b4babf9d818144e", GitTreeState:"clean"}
Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.1", GitCommit:"eec55b9ba98609a46fee712359c7b5b365bdd920", GitTreeState:"clean", BuildDate:"2018-12-13T10:39:04Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.5-eks-6bad6d", GitCommit:"6bad6d9c768dc0864dab48a11653aa53b5a47043", GitTreeState:"clean", BuildDate:"2018-12-06T23:13:14Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Cloud Provider/Platform (AKS, GKE, Minikube etc.):
EKS
Activity
bacongobbler commentedon Jan 21, 2019
@scottrigby, do you by any chance want to take a gander at this one?
bacongobbler commentedon Jan 21, 2019
Marking as question/support until it's been confirmed that this is indeed a bug according to the original author.
cprivitere commentedon Jan 23, 2019
I'm seeing this as well on 2.12.3. I'm seeing while trying to set the value to null via both -f and --set. Either way it just sets it to "null" as a string (without the quotes) rather than removing the default value.
My situation:
Use case is to reset these values to use the defaults from the template instead of the defaults now stuck in helm.
cdenneen commentedon Mar 26, 2019
stable/filebeat
With
nullornilI'm seeing the same thing... the key isn't removed... it's overwritten asnull/nilbut not removed and when you are replacing it with different key it causes problem:or
or
pod errors as:
PosicubeBeege commentedon Apr 2, 2019
I'm also encountering this exact issue with the filebeat chart.
@cdenneen You can get around file output specifically with
config.output.file.enabled=false.I'm encountering an issue where I want to use the new
inputskey for filebeat but cannot remove theprospectorskey.Existing values:
My override:
--set config.filebeat.prospectors=nullResult: (config is used to set a Secret value)
pjanuario commentedon Apr 20, 2019
I also encountered this problem with
stable/kibanaandstable/filebeatthe keys will default to the chart values even when!!nullis specified.cdenneen commentedon Apr 20, 2019
@aeijdenberg believe your PR just requires labels updated to be reviewed
scottrigby commentedon Apr 22, 2019
Hey @bacongobbler sorry I missed your question in #5184 (comment). I can verify it is a bug. In #2648 I really should have added a test that matched the documented example. I had meant to get back to this but #5185 looks promising! 👏 will respond over there
wxdao commentedon Jun 21, 2019
Hi @scottrigby . May I know which release will include #5185's fix? I just encountered this problem when trying to remove resources definitions on istio chart.
cc-stjm commentedon Jul 26, 2019
This is supposed to be in 2.14.2 - but I can't get it to work.
I'm following a very similar example to that at the top of the issue - the only difference I can see is that I'm trying to delete a value set in a subchart (in my case, logstash).
I have tried:
null,~and{}in the main chart's values.yaml, or on the command line. In both cases, "helm template" shows that the original value is still there (i.e. I'm still getting httpGet set) - and this is consistent with what I see for "helm install"Have I misunderstood and this didn't make it into 2.14.2 - or is there still an issue?
(Chart demonstrating this: demo.zip)
bacongobbler commentedon Jul 26, 2019
The patch was cherry-picked into 2.14.2 according to the release notes so it should be available.
30 remaining items
BohdanKalytka commentedon Dec 11, 2020
The issue is still present in 3.4.2, but only in certain situations.
I have a chart with multiple sub-charts.
When putting default into sub chart values
nulloverride does not work. If you move the same values into parent chart values it works as expected.This is reproducible only with sub-charts. When you put it in a single (flat) chart everything works fine.
alexrashed commentedon Dec 16, 2020
I am experiencing the same problem with 3.4.2 when using subcharts (as described by @BohdanKalytka above).
In my case I want to overwrite the securityContext when using the ElasticSearch helm chart in an OpenShift cluster.
Is this issue going to be reopened, or should we create a new one?
elliotkennedy commentedon Dec 17, 2020
Raised #9136
MatteoInfi commentedon Jul 13, 2021
still bugged in 3.5.4
armandleopold commentedon Sep 28, 2021
Still exist in
Can someone reopen the issue and fix it please ?
kineta-Jiang commentedon Dec 21, 2021
Still exist in
HELM_VERSION="v3.7.1"Can someone reopen the issue and fix it please ?
sebastianblunt commentedon Dec 21, 2021
The reopened issue is #9136
scalalang2 commentedon Feb 21, 2022
Still exist in v3.7.2
hosswald commentedon Aug 4, 2022
Still exists in v3.9.2
kopylash commentedon Feb 17, 2023
Still exists in 3.11.1
Reproducible only with subcharts
korniltsev commentedon Sep 12, 2023
still exists in 3.12.3
korniltsev commentedon Sep 12, 2023
repro:
pyroscope-folder.zip
fsGroup and runAsUser null values are not removed
ccmcbeck commentedon Oct 25, 2023
While I was unable to override a default subcharted value with
foo: nil, I was able to override withfoo: "".jobo-prod commentedon Nov 27, 2023
Still having this issue in Helm v3.13.2. Unfortunately I cannot use @ccmcbeck's workaround, because the particular value is not fenced with an
ifin the template and the value must be of type integer.Overwriting the default value with
null/nil(which does not work atm) is the only option I see here.rodrigoechaide commentedon Dec 13, 2023
I have created a new issue because this problem persists in the latest version of Kubernetes.