K8SPG-866 use discovery.k8s.io/v1 EndpointSlice #1307
Draft
+622
−181
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.
DESCRIPTION
Problem:
v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSliceSolution:
Before this PR, the operator created only the
-primaryEndpointsresource. All otherEndpointsresources are created by patroni. Patroni currently does not support creatingEndpointSlicesin place of the deprecatedEndpoints.This PR replaces the
-primaryEndpointsresource with anEndpointSliceonce version2.9.0is reached. As part of the migration, the deprecatedEndpointsresource and the mirroredEndpointSlicecreated byendpointslicemirroring-controller.k8s.iofrom the deprecatedEndpointsresource are deleted.This PR also addresses the fact that
EndpointSlicesare not supported on GKE out of the box. The default DNS provider on GKE iskube-dns, which does not supportEndpointSlices. To useEndpointSlices, users must manually deployCoreDNSor useCloud DNS. To fix tests, every test deploysCoreDNSin thekube-systemnamespace if it is not already present.Please note that
Endpointsresources are mirrored toEndpointSlicesbyendpointslicemirroring-controller.k8s.io, which is why theupgrade-consistencytest includes assertions forEndpointSlices.CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability