[CFP-39876]: Add namespace filtering to service sync and MCS API service exports#43385
Conversation
|
Commit 6a96074 does not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commit 6a96074 does not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
433c605 to
b0d5524
Compare
b0d5524 to
ec7ea5b
Compare
|
Commit ec7ea5b does not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
ec7ea5b to
f7228b6
Compare
f7228b6 to
78a01e0
Compare
|
Commit d569d22 does not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
d569d22 to
cc6941f
Compare
MrFreezeex
left a comment
There was a problem hiding this comment.
Hi 👋, thanks for the PR, could you cleanup your git history so that it only includes the relevant commit, thanks!
anubhabMajumdar
left a comment
There was a problem hiding this comment.
Left comments for service_sync.go. Lot of the comments apply for serviceexportsync.go too.
Also, can you add new tests under testdata to cover the new scenarios?
Thanks!
cc6941f to
c507889
Compare
c507889 to
f5155fc
Compare
|
/ci-kpr |
giorio94
left a comment
There was a problem hiding this comment.
Please apply the patch from the inline comment to fix the unreliable test. Looks good to me otherwise.
3f2c807 to
e8c5d43
Compare
|
/test |
|
@jimassa It looks like this PR picked a conflict, and will need to be rebased. |
Filter services synced to the kvstore based on namespace annotations. By default all namespaces are global; set clustermesh-default-global-namespace=false to require explicit clustermesh.cilium.io/global="true" annotation. Signed-off-by: Jacques Massa <jac.massa0908@gmail.com>
Extend namespace filtering to MCS-API ServiceExport sync, using the same global namespace logic as service sync. ServiceExports in non-global namespaces are not synced to the kvstore. Signed-off-by: Jacques Massa <jac.massa0908@gmail.com>
e8c5d43 to
8717cde
Compare
|
/test |
|
@cilium/operator Gentle ping 🙏 |
|
/ci-l3-l4 |
Description
Follow-up to #42905, continuing the implementation of CFP-74.
Adds namespace filtering to service sync and MCS-API ServiceExport sync. Services and ServiceExports are only synced to the kvstore when they belong to a "global" namespace.
By default all namespaces are global. Set
--clustermesh-default-global-namespace=falseto require explicitclustermesh.cilium.io/global="true"annotation.Changes
operator/watchers/service_sync.go
pkg/clustermesh/mcsapi/serviceexportsync.go
Tests
operator/watchers/testdata/globalnamespace-services.txtar: Script test for service sync filtering (including dynamic namespace changes)pkg/clustermesh/mcsapi/serviceexportsync_test.go: Unit test for ServiceExport sync filteringManual Testing on Kind Clusters
Tested on two kind clusters with ClusterMesh enabled and
--clustermesh-default-global-namespace=false:Setup
make kind-clustermeshandmake kind-clustermesh-imagesService Namespace Filtering Results
clustermesh.cilium.io/global=trueServiceExport Namespace Filtering Results (MCS API)
clustermesh.cilium.io/global=trueVerification Commands Used
Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXXline if the commit addresses a particularGitHub issue.