You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inquiry about operator gracefulshutdown function #2476
The current gracefulshutdown support method is as follows.
publicvoidstop(DurationgracefulShutdownTimeout) throwsOperatorException {
if (!started) {
return;
}
log.info(
"Operator SDK {} is shutting down...", configurationService.getVersion().getSdkVersion());
controllerManager.stop();
configurationService.getExecutorServiceManager().stop(gracefulShutdownTimeout);
leaderElectionManager.stop();
if (configurationService.closeClientOnStop()) {
getKubernetesClient().close();
}
started = false;
}
Receiving timeoutseconds as a method parameter has several disadvantages.
1. Difficult to utilize directly in spring boot
Difficult to pass parameters to bean destroy configuration
2. Sometimes graceful shutdown is not performed unintentionally
There are quite a few places that call the stop method, and I don't know if it was intentional, but in most cases, the terminateseconds setting is ignored.
Activity
csviri commentedon Aug 4, 2024
Hi @10000-ki, Thanks. Yes, this makes sense. We should definitely consider this for v5. @metacosm, what do you think?
@10000-ki would it be possible to create a PR for this (targeting
nextbranch) ?10000-ki commentedon Aug 4, 2024
@csviri
Sure I can work on it.
I will work on it, create a PR, and request a review.