diff --git a/controllers/validation/validation.go b/controllers/validation/validation.go index 3d84cc1c0..80949d47b 100644 --- a/controllers/validation/validation.go +++ b/controllers/validation/validation.go @@ -143,7 +143,7 @@ func validateArbiterSpec(mdb mdbv1.MongoDBCommunity) error { if mdb.Spec.Arbiters < 0 { return fmt.Errorf("number of arbiters must be greater or equal than 0") } - if mdb.Spec.Arbiters >= mdb.Spec.Members { + if mdb.Spec.Arbiters >= mdb.Spec.Members && !(mdb.Spec.Members == 0 && mdb.Spec.Arbiter == 0) { return fmt.Errorf("number of arbiters specified (%v) is greater or equal than the number of members in the replicaset (%v). At least one member must not be an arbiter", mdb.Spec.Arbiters, mdb.Spec.Members) }