leadership

package
v1.0.112 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNewLock

func GetNewLock(client coordinationv1.CoordinationV1Interface, lockName, podname, namespace string) *resourcelock.LeaseLock

func RunLeaderElection

func RunLeaderElection(lock *resourcelock.LeaseLock, ctx context.Context, cancel context.CancelFunc, id string, controllers []*controller.Controller)

runLeaderElection runs leadership election. If an instance of the controller is the leader and stops leading it will shutdown.

func SetupLivenessEndpoint added in v1.0.6

func SetupLivenessEndpoint()

Healthz sets up the liveness probe endpoint. If leadership election is enabled and a replica stops leading the liveness probe will fail and the kubelet will restart the container.

Types

This section is empty.

Jump to

Keyboard shortcuts

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