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

connectivity: add endpointslice clustermesh sync test #2267

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

MrFreezeex
Copy link
Member

This adds endpointslice synchronization testing inside a clustermesh. It does that by checking that we can get a DNS answer with a global headless service with endpointslice synchronization enabled across two clusters.

Testing it via DNS ensures that the created EndpointSlice are correctly linked to the headless service.

Related to cilium/cilium#28440 e2e testing

@MrFreezeex
Copy link
Member Author

MrFreezeex commented Jan 28, 2024

I am converting this to draft as I guess we would need to merge cilium/cilium#28440 first? Unsure of the exact timing here 😅 and not sure if I added the correct pre-requirements to launch this test, checking 1.16.0 + that we have clustermesh seems logical to me but maybe there would be more check before launching this?

I tested that locally and it seems to work fine but not sure how to trigger this in the CI as well as this test an ongoing PR...

[=] Test [endpointslice-mesh] [66/66]
..

✅ All 1 tests (2 actions) successful, 65 tests skipped, 0 scenarios skipped.

Copy link
Member

@giorio94 giorio94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I've left a couple of comments and suggestions inline, but the overall approach looks sensible to me. CI failures appear legitimate (at least a few), as the newly introduce headless service should be skipped in a few more places.

connectivity/check/wait.go Outdated Show resolved Hide resolved
connectivity/tests/endpointslice-clustermesh-sync.go Outdated Show resolved Hide resolved
connectivity/tests/endpointslice-clustermesh-sync.go Outdated Show resolved Hide resolved
connectivity/tests/endpointslice-clustermesh-sync.go Outdated Show resolved Hide resolved
connectivity/builder/endpointslice-clustermesh-sync.go Outdated Show resolved Hide resolved
connectivity/tests/endpointslice-clustermesh-sync.go Outdated Show resolved Hide resolved
Comment on lines +145 to +172
if service.Service.Spec.ClusterIP == corev1.ClusterIPNone {
// If the cluster is headless there is nothing to wait for here
return nil
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could make sense to have a wait mechanism for headless services as well (e.g., checking the epslices correctness), but it doesn't seem a likely source of flakiness (given that synchronization requires way less than all the other steps). I'm personally fine with leaving that out for the moment, and adding it later on if we discover we really need it.

@MrFreezeex
Copy link
Member Author

as the newly introduce headless service should be skipped in a few more places.

Ah yes now I need to ignore this from some tests and not only from the "deployment" phase, will look into it

@MrFreezeex MrFreezeex force-pushed the add-endpointslice-sync-test branch from b06b740 to 6e2ae67 Compare March 21, 2024 11:45
@MrFreezeex MrFreezeex force-pushed the add-endpointslice-sync-test branch from 6e2ae67 to a9262bb Compare March 21, 2024 11:49
@MrFreezeex MrFreezeex requested a review from giorio94 March 21, 2024 12:36
@MrFreezeex MrFreezeex marked this pull request as ready for review March 21, 2024 14:00
@MrFreezeex MrFreezeex requested review from a team as code owners March 21, 2024 14:00
@MrFreezeex MrFreezeex requested review from bimmlerd and asauber March 21, 2024 14:01
Copy link
Member

@bimmlerd bimmlerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CODEOWNERS lgtm

Copy link
Member

@giorio94 giorio94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of final comments inline, then I'll open the PR to test it on cilium/cilium.

connectivity/tests/endpointslice-clustermesh-sync.go Outdated Show resolved Hide resolved
connectivity/check/deployment.go Outdated Show resolved Hide resolved
connectivity/tests/endpointslice-clustermesh-sync.go Outdated Show resolved Hide resolved
Copy link
Member

@giorio94 giorio94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Additionally tested in cilium/cilium#31551 as well.

This adds endpointslice synchronization testing inside a clustermesh.
It does that by checking that we can get a DNS answer with a global
headless service with endpointslice synchronization enabled across two clusters.

Testing it via DNS ensures that the created EndpointSlice are correctly
linked to the headless service.

Signed-off-by: Arthur Outhenin-Chalandre <[email protected]>
@MrFreezeex
Copy link
Member Author

MrFreezeex commented Apr 11, 2024

This should be ready 🎉 (I didn't change any code since the reviews, just rebasing for most of the gh actions to pass), the Multicluster action failing seems to be an unrelated flake that could be retried I believe

@giorio94
Copy link
Member

the Multicluster action failing seems to be an unrelated flake that could be retried I believe

Yep, I've triggered a retry

@giorio94 giorio94 added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Apr 15, 2024
@aditighag aditighag merged commit d7fa6d4 into cilium:main Apr 17, 2024
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants