-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Description
Hi,
I’m currently working on a Kubernetes setup where we need to deploy multiple independent MongoDB replica sets, each one managed as a MongoDBCommunity resource, and isolated per application using different namespaces.
We are using the MongoDB Community Operator, and I would like to better understand the recommended and supported way to handle this scenario.
Current situation
-
We have the MongoDBCommunity CRD installed cluster-wide.
-
We have deployed one MongoDB Community Operator using Helm.
-
We want to create multiple MongoDBCommunity resources, for example:
-
MongoDBCommunity in namespace app-a
-
MongoDBCommunity in namespace app-b
-
Each resource represents a separate replica set, used by a different application.
-
We do not want those MongoDB instances to interact with each other.
However, we’ve observed that:
- MongoDBCommunity resources created outside the operator’s namespace are not reconciled
- The CR appears “Active”, but:
- .status.phase is not populated
- no StatefulSets / Pods are created
This suggests that the operator may be watching only a single namespace, or that additional configuration is required.
Questios
- Is it supported to manage multiple MongoDBCommunity resources across different namespaces using a single operator instance?
If yes:
- How should the operator be configured to watch multiple namespaces (or all namespaces)?
- Is there a recommended Helm value or operator flag for this (WATCH_NAMESPACE, --watch-namespace, etc.)?
- If a single operator watching multiple namespaces is not recommended:
Is it supported to deploy multiple instances of the MongoDB Community Operator, each scoped to a specific namespace?
Are there any caveats regarding:
- CRD ownership
- leader election
- resource conflicts
- What is the recommended best practice for this use case:
- Multiple applications
- Multiple namespaces
- One MongoDB replica set per application
- Strong isolation, but minimal operational overhead
Thanks in advance!