-
Notifications
You must be signed in to change notification settings - Fork 784
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
Cleanup webhooks using pod termination #424
Comments
PreStop By default, all deletes are graceful within 30 seconds. This 30 seconds time is all time that methods PreStop hook, TERM and KILL have to complete by. If the user explicitly sets graceful period to 0 and force, then the API server does not wait for confirmation before removing the resource from API. https://pracucci.com/graceful-shutdown-of-kubernetes-pods.html provides some explanation for the graceful shutdown of pods.
In kyverno we use a channel to be notified when signals are passed, and this channel is used to start cleanUp, and another notification channel to wait till cleanUp is complete(i.e. webhookconfigurations are deleted). Comments:
So the graceful shutdown time for each step is 30 seconds making the worst-case time to 90 seconds. With the pod only having 30 seconds to complete, it won't finish. Cleanup up parallelly would benefit theoretically. @JimBugwadia @realshuting |
by default http.Server waits indefinitely for connections to return to idle and then shuts down. Then we clean up the webhookconfigurations. Proposal:
|
https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
The text was updated successfully, but these errors were encountered: