-
Notifications
You must be signed in to change notification settings - Fork 228
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
Use leader election defaulting to set up controllers HA #1652
Conversation
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
Hi @astefanutti. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM
Thank you!
@@ -50,32 +44,27 @@ const defaultRequeueDuration = 15 * time.Second | |||
// the leader election lease, in case the previously leading replica failed to renew it. | |||
func WithLeadingManager(mgr ctrl.Manager, reconciler reconcile.Reconciler, obj client.Object, cfg *config.Configuration) reconcile.Reconciler { | |||
// Do not decorate the reconciler if leader election is disabled | |||
if cfg.LeaderElection == nil || !ptr.Deref(cfg.LeaderElection.LeaderElect, false) { | |||
if !ptr.Deref(cfg.LeaderElection.LeaderElect, false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if !ptr.Deref(cfg.LeaderElection.LeaderElect, false) { | |
if cfg.LeaderElection == nil || !ptr.Deref(cfg.LeaderElection.LeaderElect, false) { |
I still think that the WithLeadingManager
should have this verification since this function is exported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've added it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@astefanutti Thanks again :)
/lgtm
/approve
LGTM label has been added. Git tree hash: 2a3613ff009701ac60baf73e91f20f5854346afd
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: astefanutti, tenzen-y The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test pull-kueue-test-e2e-main-1-29 |
/retest |
Oops, what a timing :) |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
A quick follow-up on #1554 to incorporate #1598 as discussed here: #1554 (comment).
This avoids the duplication of the default leader election lease duration.
Does this PR introduce a user-facing change?