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

Add option for disabling leader election #2423

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ChenYi015
Copy link
Contributor

Purpose of this PR

Close #2384

Proposed changes:

  • Add option controller.leaderElection.enable and webhook.leaderElection.enable for disabling controller/webhook leader election
  • When leader election was disabled, the related RBAC rules against leases will be removed.

Change Category

  • Bugfix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that could affect existing functionality)
  • Documentation update

Rationale

Checklist

  • I have conducted a self-review of my own code.
  • I have updated documentation accordingly.
  • I have added tests that prove my changes are effective or that my feature works.
  • Existing unit tests pass locally with my changes.

Additional Notes

Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from chenyi015. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ChenYi015
Copy link
Contributor Author

/assign @jacobsalway

Copy link
Member

@jacobsalway jacobsalway left a comment

Choose a reason for hiding this comment

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

Does it make sense to have leader election on the webhook at all? It's a mostly stateless service that can have multiple replicas. The only part that might be relevant to have leader election on is the TLS certificate generation/setting the secret, but this only needs to be done once and exponentially retries on conflict or error anyway so I think it's fine if multiple replicas attempt to do this.

The core of this PR looks good to me though. Happy to tick and add a separate PR for removing leader election.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to disable leader election in the controller
2 participants