Fix Kubernetes locker discovery with EndpointSlices - #980
Open
pood1e wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
The tested discovery implementation is at Local discovery tests, race tests and Pod-replacement checks passed. Lease lifecycle changes are reviewed separately in #983. |
Contributor
Author
|
Additional peer-discovery checks passed with #983: Pod replacement and recovery worked using EndpointSlice permissions without core/v1 Endpoints permissions. This combined-change check supplements the discovery regressions in this PR. |
Contributor
Author
|
Final combined deployment validation is now complete for this EndpointSlice change together with #983:
The PR is mergeable and all GitHub checks are green. Requesting maintainer review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kubernetes locker discovery uses the deprecated core/v1 Endpoints API. This changes direct lookup and peer watching to discovery.k8s.io/v1 EndpointSlices selected by Service name.
The client-go informer maintains the slice set across watch reconnects and expired resource versions. Discovery publishes deterministic, deduplicated snapshots, including empty results after deletion; it filters endpoint conditions and formats IPv6 addresses correctly. The guide documents the Service contract and namespaced RBAC. Lease acquisition, renewal and election logic are unchanged.
Local validation of implementation
92a5d658fa2cdb4b418e5e2ab0bdbaf7e67bdd0b:./tests/run_tests.shgo test -race ./pkg/lockers/k8s_locker ./pkg/appgo vet ./pkg/lockers/k8s_lockerRegression tests cover slice aggregation, Service/namespace selection, endpoint conditions, deduplication, add/update/delete, empty discovery, watch closure, resource-version expiry and cancellation. The documentation-only follow-up at
9ea52f6610a5083c3dbd485fd80b0c848f3c90c6has parsed YAML examples. GitHub Actions requiring maintainer approval remain pending.Fixes #962.