-
Notifications
You must be signed in to change notification settings - Fork 388
feat: add flags for changing leader election lease duration, renew deadline, retry period #2647
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
base: main
Are you sure you want to change the base?
feat: add flags for changing leader election lease duration, renew deadline, retry period #2647
Conversation
|
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: olyazavr 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 |
|
Welcome @olyazavr! |
|
Hi @olyazavr. Thanks for your PR. I'm waiting for a github.com 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-sigs/prow repository. |
ae863a0 to
0d2d637
Compare
0d2d637 to
2936362
Compare
Pull Request Test Coverage Report for Build 19541428786Details
💛 - Coveralls |
|
@olyazavr: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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-sigs/prow repository. |
Description
We've been seeing slow lease updates in our very loaded clusters that lead to a ton of container restarts. We've made changes to relax the lease settings on other kube components, but I found no such settings available for karpenter.
This adds 3 configurable flags/env vars to control leader election:
leader-election-lease-duration,LEADER_ELECTION_LEASE_DURATION, default 15sleader-election-renew-deadline,LEADER_ELECTION_RENEW_DEADLINE, default 10sleader-election-retry-period,LEADER_ELECTION_RETRY_PERIOD, default 2sDefaults are taken from the controller defaults, so no change to existing behavior. Descriptions are copied from other kube components with these settings.
How was this change tested?
I deployed this patch into our own cluster with extra logging to ensure the (higher than default) values were taken and verified that the slow lease updates and sporadic container restarts went away
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.