leaderelection

package
v0.37.7-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EventReasonReplicaNotServing marks a control plane pod held out of the Service
	// because its backing store isn't shared with the leader.
	EventReasonReplicaNotServing = "ReplicaNotServing"
)

Variables

This section is empty.

Functions

func IsLeading added in v0.37.7

func IsLeading() bool

IsLeading reports whether this pod currently holds the controller lease.

func StartLeaderElection

func StartLeaderElection(ctx *synccontext.ControllerContext, scheme *runtime.Scheme, run func() error) error

StartLeaderElection blocks until shutdown and runs `run` once this pod holds the lease. On SIGTERM the lease is released so a replacement pod doesn't wait for it to expire.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL