Skip to content

Commit

Permalink
UPSTREAM: <carry>: expose HasBeenReady lifecycle signal
Browse files Browse the repository at this point in the history
openshift-rebase(v1.24):source=110aaa7c54c

openshift-rebase(v1.24):source=110aaa7c54c

openshift-rebase(v1.24):source=110aaa7c54c
  • Loading branch information
p0lyn0mial authored and soltysh committed Aug 22, 2022
1 parent 0ca3c45 commit 7d89afa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions staging/src/k8s.io/apiserver/pkg/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,11 @@ func (c *Config) DrainedNotify() <-chan struct{} {
return c.lifecycleSignals.InFlightRequestsDrained.Signaled()
}

// HasBeenReadySignal exposes a server's lifecycle signal which is signaled when the readyz endpoint succeeds for the first time.
func (c *Config) HasBeenReadySignal() <-chan struct{} {
return c.lifecycleSignals.HasBeenReady.Signaled()
}

// Complete fills in any fields not set that are required to have valid data and can be derived
// from other fields. If you're going to `ApplyOptions`, do that first. It's mutating the receiver.
func (c *Config) Complete(informers informers.SharedInformerFactory) CompletedConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func (c completedConfig) NewWithDelegate(delegationTarget genericapiserver.Deleg
(func() ([]byte, []byte))(s.proxyCurrentCertKeyContent),
s.serviceResolver,
c.GenericConfig.EgressSelector,
c.GenericConfig.LifecycleSignals.HasBeenReady.Signaled(),
c.GenericConfig.HasBeenReadySignal(),
)
if err != nil {
return nil, err
Expand Down

0 comments on commit 7d89afa

Please sign in to comment.