Repository navigation
Conversation
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.
What problem does this PR solve?
A shared Kubernetes environment needs separate Doris controllers for different teams while creating new namespaces dynamically. The existing --namespace option accepts only one namespace; two unfiltered global controllers would reconcile the same CRs.
Add optional --namespace-selector. Both DorisCluster and DorisDisaggregatedCluster reconciliations check live namespace labels before any resource work. Namespace label events enqueue existing CRs for adoption without a controller restart. Read failures stop reconciliation. Empty configuration preserves current behavior.
Selector mode requires the global read cache and disabled webhooks. The global cache retains explicit cross-namespace dependencies such as FDB ConfigMaps; this partitions reconciliation, not RBAC. Deploy groups in separate controller namespaces for independent leader-election Leases, and use disjoint selectors.
Release note
Support dynamically selected namespace groups through --namespace-selector and dorisOperator.namespaceSelector in Helm.
Check List (For Author)
Validation: go test ./pkg/controller/namespacescope ./cmd/operator ./pkg/controller -run 'TestNamespace|TestFDB' -count=1 passed. Tests cover group separation, namespace label changes, missing namespaces, malformed selectors and legacy behavior. No live environment was changed.
Related consumer work: https://github.com/selectdb/selectdb-qa/pull/6628 and https://github.com/selectdb/selectdb-manager/pull/1531.
Check List (For Reviewer who merge this PR)