Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Become ¶
Become ensures that the current pod is the leader within its namespace. If run outside a cluster, it will skip leader election and return nil. It continuously tries to create a ConfigMap with the provided name and the current pod set as the owner reference. Only one can exist at a time with the same name, so the pod that successfully creates the ConfigMap is the leader. Upon termination of that pod, the garbage collector will delete the ConfigMap, enabling a different pod to become the leader.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.