-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Init containers not updated on upgrade #2702
Comments
This was posted in #helm-users and I made the comment that I have run into my initContainer details not updating before. I changed my templating to update the initspec and the annotations and it works after that.
sort of idea, so if you want to update the image, since you have a later version.. change the latest in all 3 places to what you need. Then it works, I did note you saying you knew about this and it is still not working. I dunno. |
I use a variable
I will try to replicate the init container on both annotations and the spec to see what happens... |
Just to clarify what I tried so far:
I have yet to try:
|
I managed to replicate the issue on a new chart:
Running this will output
If I run the upgrade on |
Same here. Init containers are not changed on |
This is probably related to kubernetes/kubernetes#47264 |
Same here when using Example:
|
Same problem here. So when I do update ".Values.ImageVersion" with a new version and do a help upgrade on the chart, the container 1 does use a new version but not the init-container!! That's a real problem, but seems to be a problem with Kubernetes more than Helm |
Having the init container definition in double with the beta annotation is a work around that works for me to wait Kubernetes 1.8: |
Yes, this is what worked for me too. I have the same init container as a beta annotation and as initContainer on the spec and it works. As stated it's a workaround but I don't feel this will get fixed so quickly |
Sounds like this is an upstream issue which we have no control over, unfortunately. I'd suggest following up at kubernetes/kubernetes if there are further issues with updating init containers. Sorry we can't help you with this! |
As a newer comment on the thread, it looks like explicitly setting the annotations to |
Hi there!
I am using
spec.initContainers
on a deployment and during the first upgrade to add the initContainers, everything worked fine.Second upgrade, I only changed things on the initContainers and the deployment didn't even get upgraded.
I tested changing something else and the deployment got updated but upon inspection, there were two annotations:
pod.alpha.kubernetes.io/init-containers
andpod.beta.kubernetes.io/init-containers
, nospec.initContainers
and the values on the annotations were still the ones from the first upgrade.After that I attempted to use the annotations directly instead of the new spec field, and got the same results: the annotations never got updated
After several tests I've come to the conclusion that something is excluding initContainers from the upgrade diffs.
Am I doing something wrong here or is this a bug?
I have used initContainers on annotations before and they worked, but this was a few versions ago.
My helm is:
And Kubernetes:
The text was updated successfully, but these errors were encountered: