mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 18:27:49 +00:00
apiserver: sync with https server shutdown to flush existing connections
This commit is contained in:
@@ -214,7 +214,8 @@ func Run(cc schedulerserverconfig.CompletedConfig, stopCh <-chan struct{}) error
|
||||
}
|
||||
if cc.SecureServing != nil {
|
||||
handler := buildHandlerChain(newHealthzHandler(&cc.ComponentConfig, false, checks...), cc.Authentication.Authenticator, cc.Authorization.Authorizer)
|
||||
if err := cc.SecureServing.Serve(handler, 0, stopCh); err != nil {
|
||||
// TODO: handle stoppedCh returned by c.SecureServing.Serve
|
||||
if _, err := cc.SecureServing.Serve(handler, 0, stopCh); err != nil {
|
||||
// fail early for secure handlers, removing the old error loop from above
|
||||
return fmt.Errorf("failed to start healthz server: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user