-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat(k8s): Switch from CoreV1 Endpoints to DiscoveryV1 EndpointSlice #643
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #643 +/- ##
==========================================
+ Coverage 58.40% 58.53% +0.12%
==========================================
Files 43 43
Lines 3455 3461 +6
==========================================
+ Hits 2018 2026 +8
- Misses 1173 1174 +1
+ Partials 264 261 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
f63c56b
to
95ebe58
Compare
95ebe58
to
fd1ef3d
Compare
fd1ef3d
to
f6f4b12
Compare
820e9c1
to
68f9362
Compare
68f9362
to
2663eec
Compare
2663eec
to
32b9c23
Compare
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.
Ideally we'd work on the tests now - #649 - to ensure the changed functions still work 😅
@programmer04 You'll need to re-push the commits after you've signed them |
32b9c23
to
37a0021
Compare
EndpointSlice API is available as V1 since K8s 1.21. Let's do not rely on old Endpoint API in KTF.
It's been spotted during work on Kong/kubernetes-ingress-controller#3916.
TestValidationWebhook
from KIC usesWaitForConnectionOnServicePort
function from KTF. When KIC dropsEndpoints
in favour ofEndpointSlice
this test doesn't pass, becauseEndpoints
are not created (and KTF expecting them).Mirroring works in other way from
Endpoints
toEndpointSlices
under circumstances described in docs. Thus after this change KTF should be still backward compatible withEndpoints
and does not break someone's tests that rely on oldEndpoints
.I've tested this change with KIC and everything passes
Endpoints
and KTF withEndpointSlice
EndpointSlice
(WIP) and KTF withEndpointSlice
Thus this PR with high certainty (maybe some edge cases exist) shouldn't break someone's setup.
Other improvements - reduce coupling by replacing concrete K8s client as parameter with corresponding interface.