-
Notifications
You must be signed in to change notification settings - Fork 3.4k
clustermesh: add MCS-API ServiceImport controller #34439
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
Conversation
8e823c6
to
a205c8d
Compare
/test |
While this is the last "big step" to make mcs-api a thing in Cilium note that there is still a few things to do, like mainly the following things:
And that's probably all, at least from what I can think of right now :D. Note that if you would like to try this locally you need to install MCS-API crds (https://github.com/kubernetes-sigs/mcs-api/tree/master/config/crd), have this fix #34295, enable |
I don't see any objects with OwnerReferences. Is that intended? Of course, OwnerReferences doesn't work cross-cluster, so ignore this if there are no "dependent" objects in the same cluster. |
install/kubernetes/cilium/templates/cilium-operator/clusterrole.yaml
Outdated
Show resolved
Hide resolved
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.
Sorry, I don't know why a bunch of comments got published earlier... In any case, just a few nits from an initial high level pass, but I still need to fully digest the logic and perform a few tests before providing more in-depth comments.
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.
A few more comments inline, but the overall logic looks good to me 🚀. I'll perform a final test once addressed.
I've labeled this PR as |
1173c4c
to
007c8a6
Compare
/test |
/ci-clustermesh |
Perfect, thanks for the clarification and the updates! |
39403c0
to
53409ff
Compare
/test |
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.
Thanks!
/test |
1 similar comment
/test |
53409ff
to
f99c81b
Compare
(rebasing for the CI; there was no conflict/other changes) |
/test |
Note that you'll need to rebase once more to fix the linting issues from testifylint as #35237 got just merged. Sorry for the inconvenience. |
Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
MCS-API Service{Import,Export} also have statuses that we have to update for MCS-API implementation so this adds the missing permissions. This commit also remove permission to MCS-API resources when only endpointslice sync is enabled as this is not necessary. Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
f99c81b
to
97ecab2
Compare
No worries, thanks for letting me know 🙏! |
/test |
This adds the last needed MCS-API controller to sync ServiceImport from remote clusters in the clustermesh. This controller pulls ServiceExport info from remote clusters and merge those into a ServiceImport that it creates. The conflict resolution algorithm favors the oldest ServiceExport for every properties excepts the service ports. Service ports are the union of every similar ServiceExports from the local cluster and the remote clusters. The Service Import controller also manages ServiceExport status as it contains the conflict messages and we already have all of this info when we run the merge to create the ServiceImport in the corresponding controller. Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
As this Service controller also are for ServiceImport (while it truly isn't about ServiceImport as its just a trick documented in the code) it conflict with the name of the actual ServiceImport controller. This commit rename the controller to make sure it does not. Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
97ecab2
to
a7e3758
Compare
/test |
/ci-integration |
Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXX
line if the commit addresses a particularGitHub issue.
Fixes: <commit-id>
tag, thenplease add the commit author[s] as reviewer[s] to this issue.
This adds the last needed MCS-API controller to sync ServiceImport from remote clusters in the clustermesh. This PR also comes with an example that will be later used in the user documentation, small fixes to the helm deployment so that this controller is able to patch statuses and a small typo fix with the interface that was added for this controller in previous commits.
Fixes: #32712
Related to #27902