-
Notifications
You must be signed in to change notification settings - Fork 187
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
Flux isn't removing env vars from migrated helm deployments #1169
Comments
Kubernetes does not trigger a rolling upgrade when some secret ref changes, this is by design. You need to use Kustomize secrets generator for that. As for the old vars, Flux will not remove them because Helm doesn't uses |
Do I need to set that on the kustomize controller flags?
And yeah, I'm aware of that, but that's not the issue :) |
Yes, but first you need to find the name that Helm uses for the managed fields. To find it, run |
Ohh, I didn't know that it's not showing the managed fields by default, thanks :D And just in case somebody else stumbles upon this, here's the manager name for helm v3 deployments: |
Hmm I don't think Helm uses that, |
It did seem a bit suspicious... I'm not sure where that manager is coming from then, maybe somebody applied manual changes to the deployment at some point 🤷 |
I suggest removing the flag from kustomize-controller after that deployment gets cleaned up. |
I realized where I messed up. I was looking at the pod's field managers instead of the deployment. On the deployment I see that it's |
We have recently migrated some of our services from Helm to managing them as kustomizations in Flux (not HelmReleases). We used to pass some secrets under
env
in the Deployment, but have now switched to usingenvFrom
and a secret in the kustomization manifests. However, the old env vars are still present on the Deployment, even after setting Flux up to manage the resources.I have found this issue which seems to be related, but that one seems to have been addressed by this PR. I have tried removing these helm annotations and labels:
There is no managedFields metadata on the Deployment and here's what the metadata section looks like now:
Let me know what else I can provide to help :)
The text was updated successfully, but these errors were encountered: