Documentation
¶
Overview ¶
ABOUTME: Cache-sync readiness gate for controller-runtime managers. Reports not-ready on ABOUTME: /readyz until the informer cache has synced, so kubelet traffic waits for warm state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gate ¶
type Gate struct {
// contains filtered or unexported fields
}
Gate is a readiness probe that flips to ready once WaitFunc returns true. It implements manager.Runnable so the manager drives the wait in its own goroutine, and its Check method satisfies healthz.Checker for registration with manager.AddReadyzCheck.
The gate opts out of leader election: every replica must answer /readyz truthfully, not just the leader, because caches sync on all replicas and hot standbys are reachable via Service endpoints.
func NewGate ¶
NewGate returns a Gate that becomes ready the first time wait returns true. Typical call site: readiness.NewGate(mgr.GetCache().WaitForCacheSync).
func (*Gate) NeedLeaderElection ¶
NeedLeaderElection returns false so the gate runs on every replica.