[CFP-39876]: Implement global namespace support for CEP, identities and slices#42905
Conversation
|
Fixing the lint issues. |
|
Still some lint issues remaining, you'll need to fix both the goimports and slog fields not being constant errors. |
ec54724 to
537a310
Compare
MrFreezeex
left a comment
There was a problem hiding this comment.
Thanks! 🙏 The approach seems to make sense to me overall, I left an initial review with some comment inline.
Also I think it would makes sense to split a bit more your commits, the namespace helpers seems to be an obvious candidate for this at least 🤔,
giorio94
left a comment
There was a problem hiding this comment.
Thanks @anubhabMajumdar for iterating on this!
I've started reviewing the new approach, and left a few initial high level comments. Overall it looks better to me compared to the previous ones, but I still have a few reservations detailed inline.
A few more general comments:
- Make sure that the commits pass the basic linting checks before marking a PR ready for review, as there are currently multiple failures (and also compilation errors in tests)
- Make sure that the implementation is actually working; the clustermesh-apiserver is currently crashing due to unmet hive dependencies;
- The clustermesh-apiserver package makes already use of script tests. Please introduce one or more new script test file to validate the correct functioning of the new namespace filtering E2E, to increase confidence in the correctness of the implementation and prevent future regressions.
- The current implementation is entirely included in a single large commit, which makes the review process complex. Please split it into multiple commits, each complemented by a commit message to detail the rationale behind each set of changes. See the amazing split done by @jshr-w in #38388 as an example.
f0f962c to
2dfc21c
Compare
|
Fixing the lint issues and will add one more commit for the script tests. |
d5a6db0 to
5d6176c
Compare
|
Thanks for your reviews. I have:
Cheers! |
gandro
left a comment
There was a problem hiding this comment.
Helm structure-wise this looks okay to me. I do have some concerns regarding the naming and enabling this by default
|
/test |
5d6176c to
5bd00d4
Compare
Fixed one test issues. Rest seems to stem from the configurations to the helm chart, but that was removed. |
|
/test |
bb895a6 to
9eefe9f
Compare
Had to rebase to fix the last commit length. Will restart the tests again. |
|
/test |
MrFreezeex
left a comment
There was a problem hiding this comment.
Thanks the PR seems to be in a great shape overall, I left some minor question/comments about a few things in the code that I spotted
9eefe9f to
b117415
Compare
|
@giorio94 @MrFreezeex |
giorio94
left a comment
There was a problem hiding this comment.
Addressed your comments, let me know if this looks good. Thanks :-)
There's still one bug introduced in the last iteration, but looks good to me otherwise.
clustermesh-apiserver/clustermesh/testdata/ciliumendpointslices.txtar
Outdated
Show resolved
Hide resolved
…onizer Add namespace filtering to synchronizer to only sync resources from global namespaces. - Add Namespacer interface and implementations for namespace extraction - Integrate namespace manager into synchronizer to filter events - Watch namespace changes and resynchronize affected resources - Mark CiliumIdentity, CiliumEndpoint, and CiliumEndpointSlice as namespaced Signed-off-by: Anubhab Majumdar <anmajumdar@microsoft.com>
Add integration tests for global namespace filtering behavior. - Add globalnamespace.txtar to test clustermesh-default-global-namespace=false - Update existing tests with namespace resources - Test namespace annotation changes and deletions Signed-off-by: Anubhab Majumdar <anmajumdar@microsoft.com>
b117415 to
b9a43dc
Compare
Thanks for reviewing this multiple times! |
|
/test |
|
/ci-delegated-ipam |
|
Thanks @MrFreezeex @giorio94 @youngnick for repeated reviews. Cheers! |
Description
This PR is laying the foundation for cilium/design-cfps#74 .
Adds namespace-level filtering for a subset of ClusterMesh resource synchronization using the clustermesh.cilium.io/global annotation, allowing administrators to control which namespaces export resources to the kvstore. Resources handled in this PR are CiliumEndpoints, CiliumIdentities and CiliumEndpointSlices.
Key changes
clustermesh.cilium.io/globalannotation to mark namespaces for export--clustermesh-default-global-namespaceflag (default: true)Behavior
--clustermesh-default-global-namespace=trueby defaultclustermesh.cilium.io/global: "false"to namespacefalse, namespaces must opt-in with annotation set to"true"Testing Done
make kind-clustermeshenable-default-global-namespace=falsek exec -it deploy/clustermesh-apiserver -c kvstoremesh --context=kind-clustermesh2 --namespace=kube-system -- clustermesh-apiserver shellkvstoreusingkvstore/list --keys-only --output=string(no identities or endpoints)kvstoreusingkvstore/list --keys-only --output=string(identities and endpoints present now)Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXXline if the commit addresses a particularGitHub issue.
Fixes: <commit-id>tag, thenplease add the commit author[s] as reviewer[s] to this issue.
Fixes: #issue-number