Merge pull request #110129 from wojtek-t/fix_notify_signal

Fix stop signal to drained signal in genericapiserver config
This commit is contained in:
Kubernetes Prow Robot
2022-05-19 09:21:32 -07:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -528,9 +528,9 @@ func completeOpenAPI(config *openapicommon.Config, version *version.Info) {
}
}
// StopNotify returns a lifecycle signal of genericapiserver shutting down.
func (c *Config) StopNotify() <-chan struct{} {
return c.lifecycleSignals.ShutdownInitiated.Signaled()
// DrainedNotify returns a lifecycle signal of genericapiserver already drained while shutting down.
func (c *Config) DrainedNotify() <-chan struct{} {
return c.lifecycleSignals.InFlightRequestsDrained.Signaled()
}
// Complete fills in any fields not set that are required to have valid data and can be derived

View File

@@ -226,7 +226,7 @@ func (s *EtcdOptions) ApplyWithStorageFactoryTo(factory serverstorage.StorageFac
}
func (s *EtcdOptions) addEtcdHealthEndpoint(c *server.Config) error {
healthCheck, err := storagefactory.CreateHealthCheck(s.StorageConfig, c.StopNotify())
healthCheck, err := storagefactory.CreateHealthCheck(s.StorageConfig, c.DrainedNotify())
if err != nil {
return err
}