-
Notifications
You must be signed in to change notification settings - Fork 1
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
Cert generated by init container is not removed during uninstall #23
Comments
It seems there is in fact negative impact there. Reinstalling to the same namespace, it seems to cause an issue with next deployment using previous cert and communication to webhook server is broken with:
I think this happens because there are two parts here:
And while server cert is reused, webhook monokle-admission-controller/admission-controller/init/src/index.ts Lines 50 to 65 in 52bddcc
|
There are two parts here:
Those are related and can be fixed at once (by single solution), but it depends on the approach. The important part is fixing the issue with reinstalling. |
There is an init container which generates certificate used by webhook server (see here). And since the cert is generated as part of initialization logic and not helm chart / install script itself it is not removed on
helm install
/kubectl delete
.It doesn't do much harm because the cert will be reused (or renewed when expired) when admission controller is again deployed to the same namespace. Still it will be better to have everything cleaned up.EDIT: see #23 (comment) below.For helm we can use helm hooks (like
post-delete
) to fix this. For install manifest (or as more generic approach) we can maybe usecontainer-lifecycle-hooks
(see here too).This is how leftover cert looks like:
The text was updated successfully, but these errors were encountered: