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
Remove support for EndpointsLeases and ConfigMapsLeases lock from leader election #117558
Conversation
staging/src/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go
Show resolved
Hide resolved
removing this means that anyone still on configmap / endpoints election would have to jump to a 1.27.x level of client-go to use the transitional resource, then jump to 1.28+ is it important enough to drop support for the transitional resource to make consumers do both of those hops? |
This is a good question and there isn't a clear answer to it:
When discussing it with @deads2k back then, we wanted to remove this support after 3 releases. In 1.28 there will be 4. But maybe we want to leave it for a bit more? I just don't think we should support it forever... |
Allowing consumers to continue using endpoints isn't zero cost. Because we cannot determine the intent of using a given API in p&f, there is additional undesired contention that cannot be reliably resolved. Without removing the capability in the library, I'm unsure how to eliminate the contention. |
+1 to David |
that's fair... I guess the joint resource lock functionality has long been supported in client-go, so this would mean a client-go consumer needing to transition would need to roll out a release on a client-go version 0.17.0 - 0.27.0 and use endpointsleases / configmapsleases before updating to 0.28.0+ Update the release note to describe what people using endpoints or configmaps as their lock resource should do (the specific versions of client-go that support the joint lock functionality). |
d55f7fa
to
b5a9a71
Compare
@liggitt - thanks; updated - PTAL if the current wording looks ok to you |
case endpointsResourceLock: | ||
return nil, fmt.Errorf("endpoints lock is removed, migrate to %s", EndpointsLeasesResourceLock) | ||
return nil, fmt.Errorf("endpoints lock is removed, migrate to %s", endpointsLeasesResourceLock) | ||
case configMapsResourceLock: | ||
return nil, fmt.Errorf("configmaps lock is removed, migrate to %s", ConfigMapsLeasesResourceLock) | ||
return nil, fmt.Errorf("configmaps lock is removed, migrate to %s", configMapsLeasesResourceLock) |
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.
these messages now point people at something unsupported by the current client-go version... maybe include the recommended client-go version for this in this message (v0.27.x)?
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.
done - PTAL
b5a9a71
to
2bd4206
Compare
/lgtm |
LGTM label has been added. Git tree hash: 4a22d3f43244c6b24fb38079ec3986cc39dfb149
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, wojtek-t 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 |
/triage accepted |
- ConfigMapsLeasesResourceLock was removed. kubernetes/kubernetes#117558 says "Users of those lock resources should move to `leases` which is safe to do in a single release"
- ConfigMapsLeasesResourceLock was removed. kubernetes/kubernetes#117558 says "Users of those lock resources should move to `leases` which is safe to do in a single release"
- ConfigMapsLeasesResourceLock was removed. kubernetes/kubernetes#117558 says "Users of those lock resources should move to `leases` which is safe to do in a single release"
- ConfigMapsLeasesResourceLock was removed. kubernetes/kubernetes#117558. - Instead of changing value, I found that this is just remnants of old code, and this value is not used anywhere, so it is safe to remove. - Verified with local run WIP
- ConfigMapsLeasesResourceLock was removed. kubernetes/kubernetes#117558. - Instead of changing value, I found that this is just remnants of old code, and this value is not used anywhere, so it is safe to remove. - Verified with local run
Ref #80289
Continuation of: #106852
/kind feature
/sig api-machinery
/priority important-soon
/assign @liggitt @deads2k