Merge pull request #72970 from sttts/sttts-wait-for-http-server-finished-shutdown

apiserver: sync with http server shutdown to flush existing connections
This commit is contained in:
Kubernetes Prow Robot
2019-01-18 03:06:36 -08:00
committed by GitHub
7 changed files with 34 additions and 19 deletions

View File

@@ -145,7 +145,8 @@ func Run(c *cloudcontrollerconfig.CompletedConfig, stopCh <-chan struct{}) error
if c.SecureServing != nil {
unsecuredMux := genericcontrollermanager.NewBaseHandler(&c.ComponentConfig.Generic.Debugging, checks...)
handler := genericcontrollermanager.BuildHandlerChain(unsecuredMux, &c.Authorization, &c.Authentication)
if err := c.SecureServing.Serve(handler, 0, stopCh); err != nil {
// TODO: handle stoppedCh returned by c.SecureServing.Serve
if _, err := c.SecureServing.Serve(handler, 0, stopCh); err != nil {
return err
}
}