# Operator complains of mongos size

**URL:** <https://forums.percona.com/t/operator-complains-of-mongos-size/19036>\
**Category:** Percona Operator for MongoDB\
**Created:** [December 8, 2022, 8:30pm UTC](https://forums.percona.com/t/operator-complains-of-mongos-size/19036 "2022-12-08T20:30:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/dmn/32/6170_2.png) [@dmn](https://forums.percona.com/u/dmn)\
**Post date:** [December 8, 2022, 8:30pm UTC](https://forums.percona.com/t/operator-complains-of-mongos-size/19036/1 "2022-12-08T20:30:04Z")

</div>

Coming from psmdb-operator 1.10 to 1.13 I’ve noticed this in my testing from the operator logs:

```auto
2022-12-08T20:25:49.642Z	INFO	controller_psmdb	Mongos size will be changed from 1 to 2 due to safe config
2022-12-08T20:25:49.643Z	INFO	controller_psmdb	Set allowUnsafeConfigurations=true to disable safe configuration

```

I’ve deployed a two replica set and shared cluster, but also have set mongos to 1. I’m guessing the operator wants the number of mongos to match the number of replica sets?

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [December 26, 2022, 9:46am UTC](https://forums.percona.com/t/operator-complains-of-mongos-size/19036/2 "2022-12-26T09:46:03Z")

</div>

Hello @dmn ,

this behavior is controlled by `allowUnsafeConfigurations` flag.  
When it is set to false, the Operator makes sure that there are at least 2 mongos pods.  
This behavior is described here: [Custom Resource options - Percona Operator for MongoDB](https://docs.percona.com/percona-operator-for-mongodb/operator.html)

> Prevents users from configuring a cluster with unsafe parameters: starting it with less than 3 replica set instances, with an [even number of replica set instances without additional arbiter](https://docs.percona.com/percona-operator-for-mongodb/arbiter.html#arbiter), or without TLS/SSL certificates, or running a sharded cluster with less than 3 config server Pods or less than 2 mongos Pods (if `false` , the Operator will automatically change unsafe parameters to safe defaults)
