✨ feat: add support for custom labels on leader election leases ✨#3237
Conversation
|
Welcome @DerekFrank! |
|
Hi @DerekFrank. 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. DetailsInstructions 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. |
|
/ok-to-test |
| // Construct config for leader election | ||
| config = rest.AddUserAgent(config, "leader-election") | ||
|
|
||
| // Timeout set for a client used to contact to Kubernetes should be lower than |
There was a problem hiding this comment.
What does this have to do with the rest of the PR?
There was a problem hiding this comment.
This lets controllers that have RenewDeadline set also use the label functionality, because NewWithKubeConfig() doesn't allow one to set labels. If we don't make this change then users can either use RenewDeadline or LeaderLabels. This change lets them use both. If you'd prefer, I can cut a PR to client-go to create a NewWithKubeConfigAndLabels() function so we can keep both paths, but this change seems cleaner overall
|
LGTM label has been added. DetailsGit tree hash: 390d4b14872d16b6383420dbee0d9dbfc2297627 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, DerekFrank The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold |
|
/hold cancel |
|
Thx! /lgtm |
This PR makes two changes: