Documentation ¶
Index ¶
Constants ¶
View Source
const ( LeaseDurationEnvVarName = "LEASE_DURATION_SECONDS" LeaseDurationDefault = int64(137) )
Variables ¶
This section is empty.
Functions ¶
func CustomizedLeaderElectionConfig ¶
func CustomizedLeaderElectionConfig(lock *resourcelock.LeaseLock, leaseDur int64, isSingleNodeCluster bool) leaderelection.LeaderElectionConfig
More details about values are available here: https://github.com/openshift/library-go/commit/2612981f3019479805ac8448b997266fc07a236a#diff-61dd95c7fd45fa18038e825205fbfab8a803f1970068157608b6b1e9e6c27248R127-R150
Types ¶
type DrainHelper ¶
type DrainHelper struct {
// contains filtered or unexported fields
}
func NewDrainHelper ¶
func (*DrainHelper) Run ¶
Run joins leader election and drains(only if drain is set) the node if becomes a leader.
f is a function that takes a context and returns a bool. It should return true if uncordon should be performed(Only applicable if drain is set to true). If `f` returns false, the uncordon does not take place. This is useful in 2-step scenario like sriov-fec-daemon where reboot must be performed without loosing the leadership and without the uncordon.
Click to show internal directories.
Click to hide internal directories.