diff --git a/staging/src/k8s.io/apiserver/pkg/server/config.go b/staging/src/k8s.io/apiserver/pkg/server/config.go index be27cdfd551..39c47a1c4b0 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/config.go +++ b/staging/src/k8s.io/apiserver/pkg/server/config.go @@ -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 diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/etcd.go b/staging/src/k8s.io/apiserver/pkg/server/options/etcd.go index 951a699aa3f..ed108badf5e 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/etcd.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/etcd.go @@ -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 }