CLOUDP-400899: Wire operator MemberCluster discovery + watch#1394
Draft
m1kola wants to merge 2 commits into
Draft
CLOUDP-400899: Wire operator MemberCluster discovery + watch#1394m1kola wants to merge 2 commits into
m1kola wants to merge 2 commits into
Conversation
Discover member clusters from MemberCluster CRs and their per-cluster credential Secrets, keeping the legacy member-list ConfigMap + mounted kubeconfig as a fallback. A watcher restarts the operator on MemberCluster add/change/delete. Grant the base role get/list/watch on memberclusters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Slice 3 of the multi-cluster installation-UX epic. The operator now discovers member clusters by reading
MemberClusterCRs and their per-cluster credential Secrets from its own namespace (keyed byspec.clusterName), instead of the MCK 1.xmongodb-kubernetes-operator-member-listConfigMap + monolithic mounted kubeconfig. The legacy path is kept as a fallback (used when noMemberClusterCRs exist) so existingsetup-driven E2E stay green; it's removed in a later slice.A
MemberClusterwatcher (mirroring theOperatorConfigwatcher) restarts the operator on CR add/spec-change/delete. No-restart reactivity is deferred to a later slice — see the decision +multicluster-runtimeevaluation note indocs/dev/multi-cluster-config-tooling.md. The base role gainsget/list/watchonmemberclusters.Interim limitations (tagged
TODO(m1kola): slice-3): in-place credential rotation needs an operator restart; the failover health-checker's file-based cache doesn't apply on the CR path (guarded).Proof of Work
go build ./...,go vet,gofmtclean.pkg/membercluster(discovery + watcher) andpkg/kubectl-mongodb/commonpass.Checklist
Stacked on top of
iux-multi-cluster-generate-member-registration(#1390).