-
Notifications
You must be signed in to change notification settings - Fork 57
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
Certificate renewal requires a restart of the gmsa pods #135
Comments
Management and Rotation of the certs is out of scope but the webhook should be able to load new ones if updated. The tls configuration is mounted as a secret, so any change to the secrert should be reflected in the pod: windows-gmsa/admission-webhook/deploy/gmsa-webhook.yml.tpl Lines 105 to 113 in b1f80fc
but we don't listen for changes, we load it once and start the webhook: windows-gmsa/admission-webhook/webhook.go Lines 77 to 82 in b1f80fc
This could be updated to watch the file and re-loaded it via TLSConfig.GetCertificate https://pkg.go.dev/net/http#Server.ListenAndServeTLS |
The strategy of doing a rolling upgrade is probably just as simple |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The current webhook does not watch for cert renewal changes. When the cert is renewed, the pod must be restarted to reload the new cert. This commit watches the cert files and reloads the cert when a change is detected. See: kubernetes-sigs#135
/remove-lifecycle stale |
The current webhook does not watch for cert renewal changes. When the cert is renewed, the pod must be restarted to reload the new cert. This commit watches the cert files and reloads the cert when a change is detected. See: kubernetes-sigs#135
I'm not sure if this is a feature or known issue, but when the gmsa certificate is renewed, the gmsa pods need a restart.
Background
I am using the helm chart (v0.7.2) with cert-manager v1.11.0 (but various others tried) to deploy the gmsa webhook.
How to replicate
Set a short lifetime on the certificate and see what happens when it expires. Errors appear in the logs of the gmsa pods. Any other pods trying to start report invalid certificate when calling the gmsa webhook. The solution is to restart the gmsa pod.
Workaround 1
Set a really long certificate lifetime
Workaround 2 (preferred)
Use stakater reloader to automatically restart the pod when the cert is replaced
Has anyone else had to deal with this? I just thought its worth logging before someone else runs into it and spends a bit of time trying to figure it out.
The text was updated successfully, but these errors were encountered: