When the operator is not running in a cluster, the Manager will return an error on starting since it can’t detect the operator’s namespace in order to create the configmap for leader election
But rather than using ConfigMap as a lock, the current version of the SDK seems to be using Kubernetes leases. I can update the docs to mentioned that, if I'm understanding things correctly.
I looked through the other issues related to Leader Election briefly, and it seemed like they were all about changing behavior or updating the Docs for Leader-for-life.
The docs for building golang operators have a section describing how to configure leader election. Under the default leader-with-lease option, the docs mention:
But rather than using ConfigMap as a lock, the current version of the SDK seems to be using Kubernetes leases. I can update the docs to mentioned that, if I'm understanding things correctly.
I looked through the other issues related to Leader Election briefly, and it seemed like they were all about changing behavior or updating the Docs for Leader-for-life.