Different storage engines for part of nodes in replicaset

Description:

Good afternoon. I am trying to set up a cluster in inMemory mode. However, my current configuration does not survive a planned cluster shutdown. The official documentation recommends creating a hidden replica with priority 0 that uses the WiredTiger storage engine. In the current version (1.21.1) of CR, there is support for hidden replicas exist, but I was unable to configure different storage engine for them within the same replicaset. Could you please tell me if it is possible to configure this functionality using the operator?

Steps to Reproduce:

setup cluster with inMemory storage with hidden replicas support

Version:

1.21.1

Expected Result:

setup cluster with inMemory storage engine with hidden replicas with wiredTiger storage engine

Actual Result:

setup cluster with inMemory storage engine with hidden replicas with inMemory storage engine

Additional Information:

[Include any additional information that could be helpful to diagnose the issue, such as browser or device information]

Hi, the operator currently does not have a way to specify the storage engine in the cr.yaml but you should be able to modify that via a configmap or secret adding the options:

storage:
  engine: inMemory

please see Changing MongoDB options - Percona Operator for MongoDB

As far as i know here it may be configured in cr.yaml, but only for whole replicaset with cli keys in pod entrypoint, which override settings from configmap or secret.

is there any way to change this behaviour for “hidden” mongodb pods within replicaset?