You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you do to encounter the bug?
Steps to reproduce the behavior:
A MongoDB operator is deployed in the Kubernetes cluster.
A MongoDBCommunity manifest is created, where spec.arbiters is not specified, and spec.members is set to 1.
Two StatefulSets are created in the cluster (one main StatefulSet with replicas = 1 and one for arbiters with replicas = 0).
What did you expect?
If the number of arbiters is not specified or equals 0, an additional StatefulSet should not be created.
Creating extra objects in the Kubernetes cluster consumes resources in etcd.
Monitoring systems react to this StatefulSet, as they are configured to report when there is a StatefulSet in the cluster with 0 active replicas.
What happened instead?
Even if we do not specify the need to use Arbiter nodes when creating a MongoDBCommunity, an unused StatefulSet is still created in the cluster, and this behavior cannot be adjusted through additional settings.
Operator Information
Operator Version (0.11.0)
MongoDB Image used (mongo:8.0.1)
Kubernetes Cluster Information
Google Cloud Platform
Version (v1.28.7-gke.1026000)
Image Registry location (quay)
Additional context
In the deployStatefulSet function, there is no way to control the creation of a StatefulSet for arbiters. I believe that the part of the code responsible for creating this type of StatefulSet should only execute if spec.arbiters > 0.
If possible, please include:
The operator logs
Below we assume that your replicaset database pods are named mongo-<>. For instance:
❯ k get pods
NAME READY STATUS RESTARTS AGE
mongodb-testing-0 2/2 Running 1 (4d12h ago) 18d
❯ k get mdbc
NAME PHASE VERSION
mongodb-testing Running 8.0.1
The text was updated successfully, but these errors were encountered:
What did you do to encounter the bug?
Steps to reproduce the behavior:
What did you expect?
If the number of arbiters is not specified or equals 0, an additional StatefulSet should not be created.
What happened instead?
Even if we do not specify the need to use Arbiter nodes when creating a MongoDBCommunity, an unused StatefulSet is still created in the cluster, and this behavior cannot be adjusted through additional settings.
Operator Information
Kubernetes Cluster Information
Additional context
In the deployStatefulSet function, there is no way to control the creation of a StatefulSet for arbiters. I believe that the part of the code responsible for creating this type of StatefulSet should only execute if
spec.arbiters > 0
.If possible, please include:
mongo-<>
. For instance:The text was updated successfully, but these errors were encountered: