Skip to content
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 #134

Merged
merged 1 commit into from
May 8, 2023

Conversation

programmer04
Copy link
Member

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. In KIC TestCreateManager depends on this package. In that test K8s objects have to be mocked, relying on obsolete CoreV1 Endpoints by kubernetes-telemetry requires to use them in those mocks instead of DiscoveryV1 API.

@programmer04 programmer04 requested a review from a team as a code owner May 7, 2023 19:12
@CLAassistant
Copy link

CLAassistant commented May 7, 2023

CLA assistant check
All committers have signed the CLA.

@czeslavo
Copy link

czeslavo commented May 8, 2023

As for the mesh detection in telemetry, this looks good to me. 👍

I think we still have corev1.Endpoints usage in the reconcilers and parser though:
1) we ingest corev1.Endpoints via the reconciler https://github.com/Kong/kubernetes-ingress-~controller/blob/f42ca154c639dfd5ca4d34950cbc8b3b96113a82/internal/controllers/configuration/zz_generated_controllers.go#L186, putting this into the store
2) we fetch those from the store in the parser https://github.com/Kong/kubernetes-ingress-controller/blob/de7ba5c2446c2b14d09de38e68d707757f20637e/internal/dataplane/parser/parser.go#L703

We could merge this and tackle the above in a separate PR, WDYT?

czeslavo
czeslavo previously approved these changes May 8, 2023
@czeslavo czeslavo added the area/feature New feature or request label May 8, 2023
@programmer04
Copy link
Member Author

Yes @czeslavo I'm doing this step by step. Locally I have code with those changes mentioned by you. But firstly I want to merge Kong/kubernetes-ingress-controller#3964 and bump kubernetes-telemetry in KIC as separate PR

@programmer04 programmer04 enabled auto-merge (squash) May 8, 2023 09:01
@czeslavo
Copy link

czeslavo commented May 8, 2023

@programmer04 Oh oh, I just missed that this is not a PR to KIC 😅 Nevermind! :)

pmalek
pmalek previously approved these changes May 8, 2023
pkg/internal/meshdetect/detector.go Outdated Show resolved Hide resolved
@programmer04 programmer04 merged commit 23c792f into main May 8, 2023
3 checks passed
@programmer04 programmer04 deleted the switch-to-eps branch May 8, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants