Closed despairblue closed 5 years ago
That happens here. This is iterating over the namespaces making sure they have useTiller
or installTiller
. So I guess I can fix this by adding useTiller
. Let me check.
Nevermind, useTiller
means it's using a tiller in that namespace, but I only want one instance in kube-system.
So that here should not check if useTiller
or installTiller
is true.
thanks @despairblue :)
The reason why it looks only in namespaces with installTiller
or useTiller
is because in a multi-tenant cluster, you don't want to delete other people's releases from their namespaces. So the cleanup looks only for namespaces in your desired state file with a Tiller deployed or used.
In your logs snippet, I see that it is searching in kube-system but not finding anything. You can run helmsman with --verbose
which will give you a helm command you could use to search for untracked releases. Could you please verify what that command result is?
Also, to clarify, the tracking is done by labelling the helm release state (in secrets or configmaps) in the namespace where Tiller is deployed. So if you are using Tiller from kube-system
, these labeled secrets/configmaps will be in kube-system
.
the command is kubectl get configmap -n kube-system -l MANAGED-BY=HELMSMAN
is the release you deleted from your desired state file still showing in that list?
Yes. It's everything starting with staging-template
.
I added some logging and getHelmsmanReleases
actually only returns the release on the last line of the output of kubectl get configmap -n kube-system -l MANAGED-BY=HELMSMAN
Thus the other releases are not checked.
Fixed it. PR incoming.
@sami-alajrami thanks for merging. Do you have an idea when you cut a release again?
@sami-alajrami @luisdavim Sorry for being to impertinent about this, but environments are piling up on our staging cluster because of this :smile:
If the next release if further away I'll just compile a static version for our custom docker image for helmsman. I just wanted to make sure if the next release is just around the corner so I can safe myself the trouble :)
When only using on tiller instance (e.g. in kube-system) it's possible to deploy applications to other namespaces than
kube-system
but they're not removed when they are removed from the DSF. That is because helmsman only check for untracked releases in the namespace where tiller is deployed:Also, awesome work on this, and let me know if I can help with getting this fixed :)