Leader election#

Leader election guards against two replicas reconciling the same resources at once. It is on in-cluster and off for local runs:

Env varDefaultFlag
LEADER_ELECTfalse (code) / true (generated ConfigMap)--leader-elect

Helm: global.leaderElect. During a rolling update the new pod waits for the old pod’s lease to be released or to expire (about 15s) before it reconciles.