Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement LeaderElectionRunnable interface for CertRotator #45

Merged
merged 2 commits into from
Sep 28, 2022

Conversation

VirrageS
Copy link
Contributor

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 kubernetes-sigs/controller-runtime#424 and kubernetes-sigs/controller-runtime#441 for more context.

@VirrageS VirrageS force-pushed the januszm-leader-election branch 2 times, most recently from 0d73a8d to ed8e2a5 Compare August 20, 2022 18:13
Signed-off-by: Janusz Marcinkiewicz <januszm@nvidia.com>
Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the PR!

@sozercan sozercan merged commit fef091a into open-policy-agent:master Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants