Coming from psmdb-operator 1.10 to 1.13 I’ve noticed this in my testing from the operator logs:
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?
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
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, 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)