You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
add support Lease-based leader election (rather than ConfigMaps) #1877
@roycaihw:
This request has been marked as needing help from a contributor.
Guidelines
Please ensure that the issue body includes answers to the following questions:
Why are we solving this issue?
To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
Does this issue have zero to low barrier of entry?
How can the assignee reach out to you for help?
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.
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.
Came across this researching providing HA on an operator based solution and wanted to have this Lease-base lock implemented. Got a fork setup through my company and plan to contribute this back to the project. Just need to know the process for contributing this back. Thanks
@Invictus17 Implementation question:
Currently the LeaderElectionRecord saves the string representation of the times and lease_duration. I woiuld prefer to change this to save the raw datetime object and let ConfigMapLock and the new LeaseLock decode as needed since currently ConfigMapLock saves to the annotation in string format and the isoformat is required by the V1Lease object. Reluctant to do this in case anyone is using the LeaderElectioniRecord itself. So question is: Can I change LeaderElectionRecord to store raw objects instead of string representations? Otherwise, if need to keep this record structure in tact, will convert from string to object, then to isoformat for the V1Lease. Thanks.
Opened #2690 for this. It picks up @rvlane's #2314, which the triage robot closed as rotten last November; his commit is credited with a Co-authored-by trailer.
@roycaihw the test you asked for on that PR is included, along with a few fixes that came out of rebasing it onto current master. The one worth mentioning here: the times were being written as local wall clock with a Z appended, so on any host that is not UTC the Lease carried a timestamp off by the host's offset, which would not interoperate with a client-go leader on the same Lease.
@MadJlzz@Invictus17 you both offered to help on this one, so it is up if you have time to look.
Activity
roycaihw commentedon Aug 15, 2022
/help
k8s-ci-robot commentedon Aug 15, 2022
@roycaihw:
This request has been marked as needing help from a contributor.
Guidelines
Please ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the
/remove-helpcommand.Details
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/test-infra repository.
Jagrutiti commentedon Aug 21, 2022
Hi,
I am beginner to Kuberenetes repo. Do you think this is a good issue to pick?
k8s-triage-robot commentedon Feb 8, 2023
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the PR is closedYou can:
/remove-lifecycle stale/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
thesuperzapper commentedon Feb 8, 2023
/remove-lifecycle stale
edas-smith commentedon Jun 17, 2024
+1 for this - Would be great to have this
lwille commentedon Jul 25, 2024
Adding my +1 to prevent this from becoming stale.
rvlane commentedon Oct 9, 2024
Came across this researching providing HA on an operator based solution and wanted to have this Lease-base lock implemented. Got a fork setup through my company and plan to contribute this back to the project. Just need to know the process for contributing this back. Thanks
Invictus17 commentedon Nov 3, 2024
@rvlane you can send a PR similar to https://github.com/kubernetes-client/python/pull/1747/commits. Hope that helps. I can review it.
cc: @roycaihw
rvlane commentedon Dec 16, 2024
@Invictus17 Thanks. Starting work on this now.
rvlane commentedon Dec 17, 2024
@Invictus17 Implementation question:
Currently the LeaderElectionRecord saves the string representation of the times and lease_duration. I woiuld prefer to change this to save the raw datetime object and let ConfigMapLock and the new LeaseLock decode as needed since currently ConfigMapLock saves to the annotation in string format and the isoformat is required by the V1Lease object. Reluctant to do this in case anyone is using the LeaderElectioniRecord itself. So question is: Can I change LeaderElectionRecord to store raw objects instead of string representations? Otherwise, if need to keep this record structure in tact, will convert from string to object, then to isoformat for the V1Lease. Thanks.
cc: @roycaihw
add support Lease-based leader election (rather than ConfigMaps) kube…
rvlane commentedon Dec 17, 2024
@Invictus17 Pull request created: #2314
chala2001 commentedon Aug 28, 2026
Opened #2690 for this. It picks up @rvlane's #2314, which the triage robot closed as rotten last November; his commit is credited with a
Co-authored-bytrailer.@roycaihw the test you asked for on that PR is included, along with a few fixes that came out of rebasing it onto current master. The one worth mentioning here: the times were being written as local wall clock with a
Zappended, so on any host that is not UTC the Lease carried a timestamp off by the host's offset, which would not interoperate with a client-go leader on the same Lease.@MadJlzz @Invictus17 you both offered to help on this one, so it is up if you have time to look.