cert-controller icon indicating copy to clipboard operation
cert-controller copied to clipboard

Implement LeaderElectionRunnable interface for CertRotator

Open VirrageS opened this issue 3 years ago • 0 comments

This MR implements LeaderElectionRunnable for CertRotator. This is needed for case when the CertRotator is used in manager that implements leader election. In such case we might want to run CertRotator in all replicas (now this will be default) instead of running only on the leader (currently the default). The reason why we need to run CertRotator on all replicas is to unblock the registering the webhooks (which wait for the CertRotator to finish setup) on all replicas (webhooks by default run on all replicas even in leader election mode).

This change has no impact on workflows that don't use leader election like gatekeeper.

See https://github.com/kubernetes-sigs/controller-runtime/pull/424 and https://github.com/kubernetes-sigs/controller-runtime/pull/441 for more context.

VirrageS avatar Aug 20 '22 17:08 VirrageS