-
Notifications
You must be signed in to change notification settings - Fork 164
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
Allow overriding ctrl manager graceful shutdown timeout #570
Conversation
Overriding the default GracefulShutdownTimeout option given to the controller manager with a default of 0 (no timeout) since the helm operations are sensitive to interruption and can lead to leaving the HelmRelease in a bad state. This will also allow users to override the option via a cli flag `-graceful-shutdown-timeout` how much time to wait before forcibly exiting. Related to #569 Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
I've added a commit to remove the |
Sorry for the late reply, was floored by COVID the past couple of days. I am concerned about the readiness probe being removed for scenarios in which someone has configured multiple replicas, as this would report the non-elected Pod as being Ready while it is not actually handling reconciliation requests. Which does touch the runtime lifecycle context without it exposing a Service endpoint. |
I don't think we should remove readiness in this PR. If we decided to do this, it should be done across all controllers which don't have ClusterIP services like KC, IRC, IAC. |
No worries, I'm sorry to hear that, hope you're feeling better now! Thanks for the feedback. I agree with both of your assessments. I think ideally this problem should be addressed somehow at the level of the controller-runtime, having the behavior changed so the probes are not shut down during graceful termination. Going to remove the second commit. |
20176bb
to
e242bb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @relu
PS. Please add the new flag to the controller options documentation here: https://github.com/fluxcd/website/blob/main/content/en/flux/components/helm/options.md
This is the correct default value as intended in #570. xref: https://github.com/kubernetes-sigs/controller-runtime/blob/92234b3c49a315a1aed54dc0655c3570d02faa38/pkg/manager/manager.go#L292-L293 Signed-off-by: Hidde Beydals <hello@hidde.co>
This is the correct default value as intended in #570. xref: https://github.com/kubernetes-sigs/controller-runtime/blob/92234b3c49a315a1aed54dc0655c3570d02faa38/pkg/manager/manager.go#L292-L293 Signed-off-by: Hidde Beydals <hello@hidde.co>
Overriding the default GracefulShutdownTimeout option given to the controller manager with a default of 0 (no timeout) since the helm operations are sensitive to interruption and can lead to leaving the HelmRelease in a bad state.
This will also allow users to override the option via a CLI flag
-graceful-shutdown-timeout
how much time to wait before forcibly exiting.