\`_ for the Replica Set nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `wiredTiger` |
### `replsets.storage.wiredTiger.engineConfig.cacheSizeRatio`
The ratio used to compute the [storage.wiredTiger.engineConfig.cacheSizeGB option :octicons-link-external-16:](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-storage.wiredTiger.engineConfig.cacheSizeGB) for the Replica Set nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-decimal: float | `0.5` |
### `replsets.storage.wiredTiger.engineConfig.directoryForIndexes`
Sets the [storage.wiredTiger.engineConfig.directoryForIndexes option :octicons-link-external-16:](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-storage.wiredTiger.engineConfig.directoryForIndexes) for the Replica Set nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `false` |
### `replsets.storage.wiredTiger.engineConfig.journalCompressor`
Sets the [storage.wiredTiger.engineConfig.journalCompressor option :octicons-link-external-16:](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-storage.wiredTiger.engineConfig.journalCompressor) for the Replica Set nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `snappy` |
### `replsets.storage.wiredTiger.collectionConfig.blockCompressor`
Sets the [storage.wiredTiger.collectionConfig.blockCompressor option :octicons-link-external-16:](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-storage.wiredTiger.collectionConfig.blockCompressor) for the Replica Set nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `snappy` |
### `replsets.storage.wiredTiger.indexConfig.prefixCompression`
Sets the [storage.wiredTiger.indexConfig.prefixCompression option :octicons-link-external-16:](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-storage.wiredTiger.indexConfig.prefixCompression) for the Replica Set nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `true` |
### `replsets.storage.inMemory.engineConfig.inMemorySizeRatio`
The ratio used to compute the [storage.engine.inMemory.inMemorySizeGb option :octicons-link-external-16:](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-storage.inMemory.engineConfig.inMemorySizeGB) for the Replica Set nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-decimal: float | `0.9` |
### `replsets.livenessProbe.failureThreshold`
Number of consecutive unsuccessful tries of the [liveness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) to be undertaken before giving up.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `4` |
### `replsets.livenessProbe.initialDelaySeconds`
Number of seconds to wait after the container start before initiating the [liveness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `60` |
### `replsets.livenessProbe.periodSeconds`
How often to perform a [liveness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) (in seconds).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `30` |
### `replsets.livenessProbe.timeoutSeconds`
Number of seconds after which the [liveness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) times out.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `10` |
### `replsets.livenessProbe.startupDelaySeconds`
Time after which the liveness probe is failed if the MongoDB instance didn’t finish its full startup yet.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `7200` |
### `replsets.readinessProbe.failureThreshold`
Number of consecutive unsuccessful tries of the [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) to be undertaken before giving up.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `8` |
### `replsets.readinessProbe.initialDelaySeconds`
Number of seconds to wait after the container start before initiating the [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `10` |
### `replsets.readinessProbe.periodSeconds`
How often to perform a [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) (in seconds).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `3` |
### `replsets.readinessProbe.successThreshold`
Minimum consecutive successes for the [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) to be considered successful after having failed.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `replsets.readinessProbe.timeoutSeconds`
Number of seconds after which the [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) times out.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `2` |
### `replsets.containerSecurityContext`
A custom [Kubernetes Security Context for a Container :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to be used instead of the default one.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | `privileged: false` |
### `replsets.podSecurityContext`
A custom [Kubernetes Security Context for a Pod :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to be used instead of the default one.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | runAsUser: 1001
runAsGroup: 1001
supplementalGroups: [1001]
|
### `replsets.runtimeClassName`
Name of the [Kubernetes Runtime Class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/containers/runtime-class/) for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `image-rc` |
### `replsets.hookScript.configMapRef.name`
The name of the ConfigMap that contains a custom hook script that you can apply to the replica set Pods before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `hookscript-configmap` |
### `replsets.hookScript.script`
The inline hook script that you can apply to the replica set Pods before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `#!/usr/bin/env bash
echo "Hookscript started"` |
### `replsets.sidecars.image`
Image for the [custom sidecar container](sidecar.md) for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `busybox` |
### `replsets.sidecars.command`
Command for the [custom sidecar container](sidecar.md) for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-application-array-outline: array | `["/bin/sh"]` |
### `replsets.sidecars.args`
Command arguments for the [custom sidecar container](sidecar.md) for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-application-array-outline: array | `["-c", "while true; do echo echo $(date -u) 'test' >> /dev/null; sleep 5;done"]` |
### `replsets.sidecars.name`
Name of the [custom sidecar container](sidecar.md) for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `rs-sidecar-1` |
### `replsets.sidecars.volumeMounts.mountPath`
Mount path of the [custom sidecar container](sidecar.md) volume for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `/volume1` |
### `replsets.sidecars.volumeMounts.name`
Name of the [custom sidecar container](sidecar.md) volume for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `sidecar-volume-claim` |
### `replsets.sidecarVolumes.name`
Name of the [custom sidecar container](sidecar.md) volume for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `sidecar-config` |
### `replsets.sidecarVolumes.configMap.name`
Name of the [ConfigMap :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#configmap) for a [custom sidecar container](sidecar.md) volume for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `myconfigmap` |
### `replsets.sidecarVolumes.secret.secretName`
Name of the [Secret :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#secret) for a [custom sidecar container](sidecar.md) volume for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `sidecar-secret` |
### `replsets.sidecarVolumes.nfs.server`
The hostname of the NFS server that will provide remote filesystem to the [custom sidecar container](sidecar.md) volume for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `nfs-service.storage.svc.cluster.local` |
### `replsets.sidecarVolumes.nfs.path`
The path on the NFS server that will be provided as a remote filesystem to the [custom sidecar container](sidecar.md) volume for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `/psmdb-some-name-rs0` |
### `replsets.sidecarPVCs`
[Persistent Volume Claim :octicons-link-external-16:](https://v1-20.docs.kubernetes.io/docs/concepts/storage/persistent-volumes/) for the [custom sidecar container](sidecar.md) volume for Replica Set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | |
### `replsets.podDisruptionBudget.maxUnavailable`
The [Kubernetes Pod distribution budget :octicons-link-external-16:](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/) limit specifying the maximum value for unavailable Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `replsets.podDisruptionBudget.minAvailable`
The [Kubernetes Pod distribution budget :octicons-link-external-16:](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/) limit specifying the minimum value for available Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `replsets.splitHorizons.REPLICASET-POD-NAME.external`
External URI for [Split-horizon](expose.md#exposing-replica-set-with-split-horizon-dns) for replica set Pods of the exposed cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `rs0-0.mycluster.xyz` |
### `replsets.splitHorizons.REPLICASET-POD-NAME.external-2`
External URI for [Split-horizon](expose.md#exposing-replica-set-with-split-horizon-dns) for replica set Pods of the exposed cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `rs0-0.mycluster2.xyz` |
### `replsets.expose.enabled`
Enable or disable exposing [MongoDB Replica Set :octicons-link-external-16:](https://docs.mongodb.com/manual/replication/) nodes with dedicated IP addresses.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `false` |
### `replsets.expose.type`
The [IP address type :octicons-link-external-16:](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) to be exposed.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `ClusterIP`|
### `replsets.expose.loadBalancerClass`
Define the implementation of the load balancer you want to use. This setting enables you to select a custom or specific load balancer class instead of the default one provided by the cloud provider.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `eks.amazonaws.com/nlb`|
### `replsets.expose.loadBalancerSourceRanges`
The range of client IP addresses from which the load balancer should be reachable (if not set, there is no limitations).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `10.0.0.0/8` |
### `replsets.expose.annotations`
The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) metadata for the MongoDB mongod daemon.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http` |
### `replsets.expose.labels`
The [Kubernetes labels :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) for the MongoDB Replica Set Service.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `rack: rack-22` |
### `replsets.expose.internalTrafficPolicy`
Specifies whether Service for MongoDB instances should [route internal traffic to cluster-wide or to node-local endpoints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) (it can influence the load balancing effectiveness).
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `Local` |
### `replsets.expose.externalTrafficPolicy`
Specifies whether Service for MongoDB instances [should route external traffic :octicons-link-external-16:](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip) to cluster-wide (`Cluster`) or to node-local (`Local`) endpoints. It [can influence the load balancing effectiveness](expose.md#connecting-from-outside-kubernetes).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `Local` |
### `replsets.nonvoting.enabled`
Enable or disable creation of [Replica Set non-voting instances](arbiter.md#non-voting-nodes) within the cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `false` |
### `replsets.nonvoting.size`
The number of [Replica Set non-voting instances](arbiter.md#non-voting-nodes) within the cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `replsets.nonvoting.podSecurityContext`
A custom [Kubernetes Security Context for a Pod :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to be used instead of the default one.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | `{}` |
### `replsets.nonvoting.containerSecurityContext`
A custom [Kubernetes Security Context for a Container :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to be used instead of the default one.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | `{}` |
### `replsets.nonvoting.affinity.antiAffinityTopologyKey`
The [Kubernetes topologyKey :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) node affinity constraint for the non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `kubernetes.io/hostname` |
### `replsets.nonvoting.affinity.advanced`
In cases where the pods require complex tuning the advanced option turns off the `topologykey` effect. This setting allows the standard Kubernetes affinity constraints of any complexity to be used.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | |
### `replsets.nonvoting.tolerations.key`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) key for the non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `node.alpha.kubernetes.io/unreachable` |
### `replsets.nonvoting.tolerations.operator`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) operator for the non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `Exists` |
### `replsets.nonvoting.tolerations.effect`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) effect for the non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `NoExecute`|
### `replsets.nonvoting.tolerations.tolerationSeconds`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) time limit for the non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `6000` |
### `replsets.nonvoting.priorityClassName`
The [Kuberentes Pod priority class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass) for the non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `high priority` |
### `replsets.nonvoting.hookScript.configMapRef.name`
The name of the ConfigMap that contains a custom hook script that you can apply to the non-voting replica set members before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `hookscript-configmap` |
### `replsets.nonvoting.hookScript.script`
The inline hook script that you can apply to the non-voting replica set members before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `#!/usr/bin/env bash
echo "Hookscript started"` |
### `replsets.nonvoting.annotations`
The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) metadata for the non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `iam.amazonaws.com/role: role-arn` |
### `replsets.nonvoting.labels`
The [Kubernetes affinity labels :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) for the non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-label-outline: label | `rack: rack-22` |
### `replsets.nonvoting.nodeSelector`
The [Kubernetes nodeSelector :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) affinity constraint for the non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-label-outline: label | `disktype: ssd` |
### `replsets.nonvoting.podDisruptionBudget.maxUnavailable`
The [Kubernetes Pod distribution budget :octicons-link-external-16:](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/) limit specifying the maximum value for unavailable Pods among non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `replsets.nonvoting.podDisruptionBudget.minAvailable`
The [Kubernetes Pod distribution budget :octicons-link-external-16:](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/) limit specifying the minimum value for available Pods among non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `replsets.nonvoting.resources.limits.cpu`
[Kubernetes CPU limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for MongoDB container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `300m` |
### `replsets.nonvoting.resources.limits.memory`
[Kubernetes Memory limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for MongoDB container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `0.5G` |
### `replsets.nonvoting.resources.requests.cpu`
The [Kubernetes CPU requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for MongoDB container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `300m` |
### `replsets.nonvoting.resources.requests.memory`
The [Kubernetes Memory requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for MongoDB container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `0.5G` |
### `replsets.nonvoting.volumeSpec.emptyDir`
The [Kubernetes emptyDir volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir), i.e. the directory which will be created on a node, and will be accessible to the MongoDB Pod containers.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `{}` |
### `replsets.nonvoting.volumeSpec.hostPath.path`
[Kubernetes hostPath volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath), i.e. the file or directory of a node that will be accessible to the MongoDB Pod containers.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `/data` |
### `replsets.nonvoting.volumeSpec.hostPath.type`
The [Kubernetes hostPath volume type :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `Directory`|
### `replsets.nonvoting.volumeSpec.persistentVolumeClaim.annotations`
The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) metadata for [Persistent Volume Claim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http` |
### `replsets.nonvoting.volumeSpec.persistentVolumeClaim.labels`
The [Kubernetes labels :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) metadata for [Persistent Volume Claim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `rack: rack-22` |
### `replsets.nonvoting.volumeSpec.persistentVolumeClaim.storageClassName`
The [Kubernetes Storage Class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/storage-classes/) to use with the MongoDB container [Persistent Volume Claim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) for the non-voting nodes. Use Storage Class with XFS as the default filesystem if possible, [for better MongoDB performance :octicons-link-external-16:](https://dba.stackexchange.com/questions/190578/is-xfs-still-the-best-choice-for-mongodb.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `standard` |
### `replsets.nonvoting.volumeSpec.persistentVolumeClaim.volumeAttributesClassName`
The name of the [volumeAttributesClassName :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/) used to modify the provisioned PVCs bound to MongoDB Pods. See [How to configure VolumeAttributesClass for Persistent Volumes](volume-attributes-class.md) to learn more.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `silver` |
### `replsets.nonvoting.volumeSpec.persistentVolumeClaim.accessModes`
The [Kubernetes Persistent Volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) access modes for the MongoDB container for the non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-application-array-outline: array | `[ "ReadWriteOnce" ]` |
### `replsets.nonvoting.volumeSpec.persistentVolumeClaim.resources.requests.storage`
The [Kubernetes Persistent Volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) size for the MongoDB container for the non-voting nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `3Gi` |
### `replsets.hidden.enabled`
Enable or disable creation of [Replica Set hidden instances](arbiter.md#hidden-nodes) within the cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `false` |
### `replsets.hidden.size`
The number of [Replica Set hidden instances](arbiter.md#hidden-nodes) within the cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `replsets.hidden.podSecurityContext`
A custom [Kubernetes Security Context for a Pod :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to be used instead of the default one.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | `{}` |
### `replsets.hidden.containerSecurityContext`
A custom [Kubernetes Security Context for a Container :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to be used instead of the default one.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | `{}` |
### `replsets.hidden.affinity.antiAffinityTopologyKey`
The [Kubernetes topologyKey :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) node affinity constraint for the hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `kubernetes.io/hostname` |
### `replsets.hidden.affinity.advanced`
In cases where the pods require complex tuning, the advanced option turns off the `topologykey` effect. This setting allows the standard Kubernetes affinity constraints of any complexity to be used.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | |
### `replsets.hidden.tolerations.key`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) key for the hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `node.alpha.kubernetes.io/unreachable` |
### `replsets.hidden.tolerations.operator`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) operator for the hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `Exists` |
### `replsets.hidden.tolerations.effect`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) effect for the hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `NoExecute`|
### `replsets.hidden.tolerations.tolerationSeconds`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) time limit for the hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `6000` |
### `replsets.hidden.priorityClassName`
The [Kuberentes Pod priority class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass) for the hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `high priority` |
### `replsets.hidden.hookScript.configMapRef.name`
The name of the ConfigMap that contains a custom hook script that you can apply to the hidden replica set members before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `hookscript-configmap` |
### `replsets.hidden. hookScript.script`
The inline hook script that you can apply to the hidden replica set members before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `#!/usr/bin/env bash
echo "Hookscript started"` |
### `replsets.hidden.annotations`
The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) metadata for the hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `iam.amazonaws.com/role: role-arn` |
### `replsets.hidden.labels`
The [Kubernetes affinity labels :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) for the hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-label-outline: label | `rack: rack-22` |
### `replsets.hidden.nodeSelector`
The [Kubernetes nodeSelector :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) affinity constraint for the hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-label-outline: label | `disktype: ssd` |
### `replsets.hidden.podDisruptionBudget.maxUnavailable`
The [Kubernetes Pod distribution budget :octicons-link-external-16:](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/) limit specifying the maximum value for unavailable Pods among hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `replsets.hidden.podDisruptionBudget.minAvailable`
The [Kubernetes Pod distribution budget :octicons-link-external-16:](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/) limit specifying the minimum value for available Pods among hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `replsets.hidden.resources.limits.cpu`
[Kubernetes CPU limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for MongoDB container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `300m` |
### `replsets.hidden.resources.limits.memory`
[Kubernetes Memory limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for MongoDB container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `0.5G` |
### `replsets.hidden.volumeSpec.emptyDir`
The [Kubernetes emptyDir volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir), i.e. the directory which will be created on a node, and will be accessible to the MongoDB Pod containers.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `{}` |
### `replsets.hidden.volumeSpec.hostPath.path`
[Kubernetes hostPath volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath), i.e. the file or directory of a node that will be accessible to the MongoDB Pod containers.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `/data` |
### `replsets.hidden.volumeSpec.hostPath.type`
The [Kubernetes hostPath volume type :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `Directory`|
### `replsets.hidden.volumeSpec.persistentVolumeClaim.annotations`
The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) metadata for [Persistent Volume Claim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http` |
### `replsets.hidden.volumeSpec.persistentVolumeClaim.labels`
The [Kubernetes labels :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) metadata for [Persistent Volume Claim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `rack: rack-22` |
### `replsets.hidden.volumeSpec.persistentVolumeClaim.storageClassName`
The [Kubernetes Storage Class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/storage-classes/) to use with the MongoDB container [Persistent Volume Claim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) for the hidden nodes. Use Storage Class with XFS as the default filesystem if possible, [for better MongoDB performance :octicons-link-external-16:](https://dba.stackexchange.com/questions/190578/is-xfs-still-the-best-choice-for-mongodb).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `standard` |
### `replsets.hidden.volumeSpec.persistentVolumeClaim.volumeAttributesClassName`
The name of the [volumeAttributesClassName :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/) used to modify the provisioned PVCs bound to MongoDB Pods. See [How to configure VolumeAttributesClass for Persistent Volumes](volume-attributes-class.md) to learn more.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `silver` |
### `replsets.hidden.volumeSpec.persistentVolumeClaim.accessModes`
The [Kubernetes Persistent Volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) access modes for the MongoDB container for the hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-application-array-outline: array | `[ "ReadWriteOnce" ]` |
### `replsets.hidden.volumeSpec.persistentVolumeClaim.resources.requests.storage`
The [Kubernetes Persistent Volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) size for the MongoDB container for the hidden nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `3Gi` |
### `replsets.arbiter.enabled`
Enable or disable creation of [Replica Set Arbiter :octicons-link-external-16:](https://docs.mongodb.com/manual/core/replica-set-arbiter/) nodes within the cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `false` |
### `replsets.arbiter.size`
The number of [Replica Set Arbiter :octicons-link-external-16:](https://docs.mongodb.com/manual/core/replica-set-arbiter/) instances within the cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `replsets.arbiter.affinity.antiAffinityTopologyKey`
The [Kubernetes topologyKey :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) node affinity constraint for the Arbiter.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `kubernetes.io/hostname` |
### `replsets.arbiter.affinity.advanced`
In cases where the pods require complex tuning the advanced option turns off the `topologykey` effect. This setting allows the standard Kubernetes affinity constraints of any complexity to be used.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | |
### `replsets.arbiter.tolerations.key`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) key for the Arbiter nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `node.alpha.kubernetes.io/unreachable` |
### `replsets.arbiter.tolerations.operator`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) operator for the Arbiter nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `Exists` |
### `replsets.arbiter.tolerations.effect`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) effect for the Arbiter nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `NoExecute`|
### `replsets.arbiter.tolerations.tolerationSeconds`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) time limit for the Arbiter nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `6000` |
### `replsets.arbiter.priorityClassName`
The [Kuberentes Pod priority class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass) for the Arbiter nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `high priority` |
### `replsets.arbiter.hookScript.configMapRef.name`
The name of the ConfigMap that contains a custom hook script that you can apply to the arbiter replica set members before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `hookscript-configmap` |
### `replsets.arbiter.hookScript.script`
The inline hook script that you can apply to the arbiter replica set members before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `#!/usr/bin/env bash
echo "Hookscript started"` |
### `replsets.arbiter.annotations`
The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) metadata for the Arbiter nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `iam.amazonaws.com/role: role-arn` |
### `replsets.arbiter.labels`
The [Kubernetes affinity labels :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) for the Arbiter nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-label-outline: label | `rack: rack-22` |
### `replsets.arbiter.nodeSelector`
The [Kubernetes nodeSelector :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) affinity constraint for the Arbiter nodes.
| Value type | Example |
| ----------- | ---------- |
| :material-label-outline: label | `disktype: ssd` |
### `replsets.resources.limits.cpu`
[Kubernetes CPU limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for MongoDB container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `300m` |
### `replsets.resources.limits.memory`
[Kubernetes Memory limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for MongoDB container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `0.5G` |
### `replsets.resources.requests.cpu`
The [Kubernetes CPU requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for MongoDB container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `300m` |
### `replsets.resources.requests.memory`
The [Kubernetes Memory requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for MongoDB container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `0.5G` |
### `replsets.volumeSpec.emptyDir`
The [Kubernetes emptyDir volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir), i.e. the directory which will be created on a node, and will be accessible to the MongoDB Pod containers.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `{}` |
### `replsets.volumeSpec.hostPath.path`
[Kubernetes hostPath volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath), i.e. the file or directory of a node that will be accessible to the MongoDB Pod containers.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `/data` |
### `replsets.volumeSpec.hostPath.type`
The [Kubernetes hostPath volume type :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `Directory`|
### `replsets.volumeSpec.persistentVolumeClaim.annotations`
The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) metadata for [Persistent Volume Claim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http` |
### `replsets.volumeSpec.persistentVolumeClaim.labels`
The [Kubernetes labels :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) metadata for [Persistent Volume Claim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `rack: rack-22` |
### `replsets.volumeSpec.persistentVolumeClaim.storageClassName`
The [Kubernetes Storage Class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/storage-classes/) to use with the MongoDB container [Persistent Volume Claim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims). Use Storage Class with XFS as the default filesystem if possible, [for better MongoDB performance :octicons-link-external-16:](https://dba.stackexchange.com/questions/190578/is-xfs-still-the-best-choice-for-mongodb).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `standard` |
### `replsets.volumeSpec.persistentVolumeClaim.volumeAttributesClassName`
The name of the [volumeAttributesClassName :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/) used to modify the provisioned PVCs bound to MongoDB Pods. See [How to configure VolumeAttributesClass for Persistent Volumes](volume-attributes-class.md) to learn more.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `silver` |
### `replsets.volumeSpec.persistentVolumeClaim.accessModes`
The [Kubernetes Persistent Volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) access modes for the MongoDB container.
| Value type | Example |
| ----------- | ---------- |
| :material-application-array-outline: array | `[ "ReadWriteOnce" ]` |
### `replsets.volumeSpec.persistentVolumeClaim.resources.requests.storage`
The [Kubernetes Persistent Volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) size for the MongoDB container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `3Gi` |
### `replsets.hostAliases.ip`
The IP address for [Kubernetes host aliases :octicons-link-external-16:](https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/) for replica set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `"10.10.0.2"` |
### `replsets.hostAliases.hostnames`
Hostnames for [Kubernetes host aliases :octicons-link-external-16:](https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/) for replica set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | |
## PMM Section
The `pmm` section in the deploy/cr.yaml file contains configuration
options for Percona Monitoring and Management.
### `pmm.enabled`
Enables or disables monitoring Percona Server for MongoDB with [PMM :octicons-link-external-16:](https://www.percona.com/doc/percona-monitoring-and-managementindex.metrics-monitor.dashboard.html).
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `false` |
### `pmm.image`
PMM Client Docker image to use.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `percona/pmm-client:{{ pmm2recommended }}` |
### `pmm.serverHost`
Address of the PMM Server to collect data from the Cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `monitoring-service` |
### `pmm.containerSecurityContext`
A custom [Kubernetes Security Context for a Container :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to be used instead of the default one.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | `{}` |
### pmm.customClusterName
A custom name to define for a cluster. PMM Server uses this name to properly parse the metrics and display them on dashboards. Using a custom name is useful for clusters deployed in different data centers - PMM Server connects them and monitors them as one deployment. Another use case is for clusters deployed with the same name in different namespaces - PMM treats each cluster separately.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `mongo-cluster` |
### `pmm.mongodParams`
Additional parameters which will be passed to the [pmm-admin add mongodb :octicons-link-external-16:](https://docs.percona.com/percona-monitoring-and-management/2/details/commands/pmm-admin.html#mongodb) command for `mongod` Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `--environment=DEV-ENV --custom-labels=DEV-ENV` |
### `pmm.mongosParams`
Additional parameters which will be passed to the [pmm-admin add mongodb :octicons-link-external-16:](https://docs.percona.com/percona-monitoring-and-management/2/details/commands/pmm-admin.html#mongodb) command for `mongos` Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `--environment=DEV-ENV --custom-labels=DEV-ENV` |
### `pmm.resources.requests.cpu`
The [Kubernetes CPU requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for PMM Client container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `300m` |
### `pmm.resources.requests.memory`
The [Kubernetes Memory requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for PMM Client container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `150M` |
### `pmm.resources.limits.cpu`
[Kubernetes CPU limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for PMM Client container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `400m` |
### `pmm.resources.limits.memory`
[Kubernetes Memory limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for PMM Client container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `256M` |
## Sharding Section
The `sharding` section in the deploy/cr.yaml file contains configuration
options for Percona Server for MondoDB [sharding](sharding.md).
### `sharding.enabled`
Enables or disables [Percona Server for MondoDB sharding :octicons-link-external-16:](https://docs.mongodb.com/manual/sharding/).
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `true` |
### `sharding.configsvrReplSet.size`
The number of [Config Server instances :octicons-link-external-16:](https://docs.mongodb.com/manual/core/sharded-cluster-config-servers/) within the cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `3` |
### `sharding.configsvrReplSet.terminationGracePeriodSeconds`
The amount of seconds Kubernetes will wait for a clean config server Pods termination.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `300` |
### `sharding.configsvrReplSet.serviceAccountName`
Name of the separate privileged service account for Config Server Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `default` |
### `sharding.configsvrReplSet.topologySpreadConstraints.labelSelector.matchLabels`
The label selector for the [Kubernetes Pod Topology Spread Constraints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/).
| Value type | Example |
| ----------- | ---------- |
| :material-label-outline: label | `app.kubernetes.io/name: percona-server-mongodb` |
### `sharding.configsvrReplSet.topologySpreadConstraints.maxSkew`
The degree to which Pods may be unevenly distributed under the [Kubernetes Pod Topology Spread Constraints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `sharding.configsvrReplSet.topologySpreadConstraints.topologyKey`
The key of node labels for the [Kubernetes Pod Topology Spread Constraints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `kubernetes.io/hostname` |
### `sharding.configsvrReplSet.topologySpreadConstraints.whenUnsatisfiable`
What to do with a Pod if it doesn't satisfy the [Kubernetes Pod Topology Spread Constraints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `DoNotSchedule` |
### `sharding.configsvrReplSet.externalNodes.host`
The URL or IP address of the [external config server instance](replication-main.md).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `34.124.76.90` |
### `sharding.configsvrReplSet.externalNodes.port`
The port number of the [external config server instance](replication-main.md).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `27017` |
### `sharding.configsvrReplSet.externalNodes.votes`
The number of [votes :octicons-link-external-16:](https://docs.mongodb.com/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.members-n-.votes) of the [external config server instance](replication-main.md).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `0` |
### `sharding.configsvrReplSet.externalNodes.priority`
The [priority :octicons-link-external-16:](https://docs.mongodb.com/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.members-n-.priority) of the [external config server instance](replication-main.md).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `0` |
### `sharding.configsvrReplSet.configuration`
Custom configuration options for Config Servers. Please refer to the [official manual :octicons-link-external-16:](https://docs.mongodb.com/manual/reference/configuration-options/) for the full list of options.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | |
operationProfiling:
mode: slowOp
systemLog:
verbosity: 1
|
### `sharding.configsvrReplSet.livenessProbe.failureThreshold`
Number of consecutive unsuccessful tries of the [liveness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) to be undertaken before giving up.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `4` |
### `sharding.configsvrReplSet.livenessProbe.initialDelaySeconds`
Number of seconds to wait after the container start before initiating the [liveness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `60` |
### `sharding.configsvrReplSet.livenessProbe.periodSeconds`
How often to perform a [liveness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) (in seconds).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `30` |
### `sharding.configsvrReplSet.livenessProbe.timeoutSeconds`
Number of seconds after which the [liveness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) times out.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `10` |
### `sharding.configsvrReplSet.livenessProbe.startupDelaySeconds`
Time after which the liveness probe is failed if the MongoDB instance didn’t finish its full startup yet.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `7200` |
### `sharding.configsvrReplSet.readinessProbe.failureThreshold`
Number of consecutive unsuccessful tries of the [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) to be undertaken before giving up.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `3` |
### `sharding.configsvrReplSet.readinessProbe.initialDelaySeconds`
Number of seconds to wait after the container start before initiating the [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `10` |
### `sharding.configsvrReplSet.readinessProbe.periodSeconds`
How often to perform a [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) (in seconds).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `3` |
### `sharding.configsvrReplSet.readinessProbe.successThreshold`
Minimum consecutive successes for the [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) to be considered successful after having failed.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `sharding.configsvrReplSet.readinessProbe.timeoutSeconds`
Number of seconds after which the [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) times out.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `2` |
### `sharding.configsvrReplSet.containerSecurityContext`
A custom [Kubernetes Security Context for a Container :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to be used instead of the default one.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | `privileged: false` |
### `sharding.configsvrReplSet.podSecurityContext`
A custom [Kubernetes Security Context for a Pod :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to be used instead of the default one.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | runAsUser: 1001
runAsGroup: 1001
supplementalGroups: [1001]
|
### `sharding.configsvrReplSet.runtimeClassName`
Name of the [Kubernetes Runtime Class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/containers/runtime-class/) for Config Server Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `image-rc` |
### `sharding.configsvrReplSet.hookScript.configMapRef.name`
The name of the ConfigMap that contains a custom hook script that you can apply to the config server replica set Pods before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `hookscript-configmap` |
### `sharding.configsvrReplSet.hookScript.script`
The inline hook script that you can apply to the config server replica set Pods before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `#!/usr/bin/env bash
echo "Hookscript started"` |
### `sharding.configsvrReplSet.sidecars.image`
Image for the [custom sidecar container](sidecar.md) for Config Server Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `busybox` |
### `sharding.configsvrReplSet.sidecars.command`
Command for the [custom sidecar container](sidecar.md) for Config Server Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-application-array-outline: array | `["/bin/sh"]` |
### `sharding.configsvrReplSet.sidecars.args`
Command arguments for the [custom sidecar container](sidecar.md) for Config Server Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-application-array-outline: array | `["-c", "while true; do echo echo $(date -u) 'test' >> /dev/null; sleep 5;done"]` |
### `sharding.configsvrReplSet.sidecars.name`
Name of the [custom sidecar container](sidecar.md) for Config Server Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `rs-sidecar-1` |
### `sharding.configsvrReplSet.sidecarVolumes.name`
Name of the [custom sidecar container](sidecar.md) volume for Config Server Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `sidecar-config` |
### `sharding.configsvrReplSet.sidecarVolumes.nfs.server`
The hostname of the NFS server that will provide remote filesystem to the [custom sidecar container](sidecar.md) volume for Config Server Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `nfs-service.storage.svc.cluster.local` |
### `sharding.configsvrReplSet.sidecarVolumes.nfs.path`
The path on the NFS server that will be provided as a remote filesystem to the [custom sidecar container](sidecar.md) volume for Config Server Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `/psmdb-some-name-rs0` |
### `sharding.configsvrReplSet.limits.cpu`
[Kubernetes CPU limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for Config Server container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `300m` |
### `sharding.configsvrReplSet.limits.memory`
[Kubernetes Memory limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for Config Server container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `0.5G` |
### `sharding.configsvrReplSet.resources.requests.cpu`
The [Kubernetes CPU requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for Config Server container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `300m` |
### `sharding.configsvrReplSet.requests.memory`
The [Kubernetes Memory requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for Config Server container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `0.5G` |
### `sharding.configsvrReplSet.expose.enabled`
Enable or disable exposing [Config Server :octicons-link-external-16:](https://www.mongodb.com/docs/manual/core/sharded-cluster-config-servers/) nodes with dedicated IP addresses.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `false` |
### `sharding.configsvrReplSet.expose.type`
The [IP address type :octicons-link-external-16:](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) to be exposed.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `ClusterIP`|
### `sharding.configsvrReplSet.expose.loadBalancerClass`
Define the implementation of the load balancer you want to use. This setting enables you to select a custom or specific load balancer class instead of the default one provided by the cloud provider.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `eks.amazonaws.com/nlb`|
### `sharding.configsvrReplSet.expose.loadBalancerSourceRanges`
The range of client IP addresses from which the load balancer should be reachable (if not set, there is no limitations).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `10.0.0.0/8` |
### `sharding.configsvrReplSet.expose.annotations`
The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) metadata for the Config Server daemon.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http` |
### `sharding.configsvrReplSet.expose.labels`
The [Kubernetes labels :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) for the Config Server Service.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `rack: rack-22` |
### `sharding.configsvrReplSet.expose.internalTrafficPolicy`
Specifies whether Service for config servers should [route internal traffic to cluster-wide or to node-local endpoints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) (it can influence the load balancing effectiveness).
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `Local` |
### `sharding.configsvrReplSet.expose.externalTrafficPolicy`
Specifies whether Service for config servers [should route external traffic :octicons-link-external-16:](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip) to cluster-wide (`Cluster`) or to node-local (`Local`) endpoints. It [can influence the load balancing effectiveness](expose.md#connecting-from-outside-kubernetes).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `Local` |
### `sharding.configsvrReplSet.volumeSpec.emptyDir`
The [Kubernetes emptyDir volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir), i.e. the directory which will be created on a node, and will be accessible to the Config Server Pod containers.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `{}` |
### `sharding.configsvrReplSet.volumeSpec.hostPath.path`
[Kubernetes hostPath volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath), i.e. the file or directory of a node that will be accessible to the Config Server Pod containers.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `/data` |
### `sharding.configsvrReplSet.volumeSpec.hostPath.type`
The [Kubernetes hostPath volume type :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `Directory`|
### `sharding.configsvrReplSet.volumeSpec.persistentVolumeClaim.annotations`
The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) metadata for [Persistent Volume Claim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http` |
### `sharding.configsvrReplSet.volumeSpec.persistentVolumeClaim.labels`
The [Kubernetes labels :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) metadata for [Persistent Volume Claim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `rack: rack-22` |
### `sharding.configsvrReplSet.volumeSpec.persistentVolumeClaim.storageClassName`
The [Kubernetes Storage Class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/storage-classes/) to use with the Config Server container [Persistent Volume Claim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims). Use Storage Class with XFS as the default filesystem if possible, [for better MongoDB performance :octicons-link-external-16:](https://dba.stackexchange.com/questions/190578/is-xfs-still-the-best-choice-for-mongodb).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `standard` |
### `sharding.configsvrReplSet.volumeSpec.persistentVolumeClaim.volumeAttributesClassName`
The name of the [volumeAttributesClassName :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/) used to modify the provisioned PVCs bound to MongoDB Pods. See [How to configure VolumeAttributesClass for Persistent Volumes](volume-attributes-class.md) to learn more.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `silver` |
### `sharding.configsvrReplSet.volumeSpec.persistentVolumeClaim.accessModes`
The [Kubernetes Persistent Volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) access modes for the Config Server container.
| Value type | Example |
| ----------- | ---------- |
| :material-application-array-outline: array | `[ "ReadWriteOnce" ]` |
### `sharding.configsvrReplSet.volumeSpec.persistentVolumeClaim.resources.requests.storage`
The [Kubernetes Persistent Volume :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) size for the Config Server container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `3Gi` |
### `sharding.configsvrReplSet.hostAliases.ip`
The IP address for [Kubernetes host aliases :octicons-link-external-16:](https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/) for replica set Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `"10.10.0.2"` |
### `sharding.configsvrReplSet.hostAliases.hostnames`
Hostnames for [Kubernetes host aliases :octicons-link-external-16:](https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/) for config server Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | |
### `sharding.configsvrReplSet.splitHorizons.CFGREPLICASET-POD-NAME.external`
External URI for [Split-horizon](expose.md#exposing-replica-set-with-split-horizon-dns) for Config Server replica set Pods of the exposed cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `cfg-0.mycluster.xyz` |
### `sharding.configsvrReplSet.splitHorizons.CFGREPLICASET-POD-NAME.external-2`
External URI for [Split-horizon](expose.md#exposing-replica-set-with-split-horizon-dns) for Config Server replica set Pods of the exposed cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `cfg-0.mycluster2.xyz` |
### `sharding.mongos.size`
The number of [mongos :octicons-link-external-16:](https://docs.mongodb.com/manual/core/sharded-cluster-query-router/) instances within the cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `3` |
### `sharding.mongos.terminationGracePeriodSeconds`
The amount of seconds Kubernetes will wait for a clean mongos Pods termination.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `300` |
### `sharding.mongos.serviceAccountName`
Name of the separate privileged service account for mongos Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `default` |
### `sharding.mongos.topologySpreadConstraints.labelSelector.matchLabels`
The label selector for the [Kubernetes Pod Topology Spread Constraints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/).
| Value type | Example |
| ----------- | ---------- |
| :material-label-outline: label | `app.kubernetes.io/name: percona-server-mongodb` |
### `sharding.mongos.topologySpreadConstraints.maxSkew`
The degree to which Pods may be unevenly distributed under the [Kubernetes Pod Topology Spread Constraints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `sharding.mongos.topologySpreadConstraints.topologyKey`
The key of node labels for the [Kubernetes Pod Topology Spread Constraints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `kubernetes.io/hostname` |
### `sharding.mongos.topologySpreadConstraints.whenUnsatisfiable`
What to do with a Pod if it doesn't satisfy the [Kubernetes Pod Topology Spread Constraints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `DoNotSchedule` |
### `sharding.mongos.configuration`
Custom configuration options for mongos. Please refer to the [official manual :octicons-link-external-16:](https://docs.mongodb.com/manual/reference/configuration-options/) for the full list of options.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | |
systemLog:
verbosity: 1
|
### `sharding.mongos.affinity.antiAffinityTopologyKey`
The [Kubernetes topologyKey :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) node affinity constraint for mongos.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `kubernetes.io/hostname` |
### `sharding.mongos.affinity.advanced`
In cases where the Pods require complex tuning the advanced option turns off the `topologykey` effect. This setting allows the standard Kubernetes affinity constraints of any complexity to be used.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | |
### `sharding.mongos.tolerations.key`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) key for mongos instances.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `node.alpha.kubernetes.io/unreachable` |
### `sharding.mongos.tolerations.operator`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) operator for mongos instances.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `Exists` |
### `sharding.mongos.tolerations.effect`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) effect for mongos instances.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `NoExecute`|
### `sharding.mongos.tolerations.tolerationSeconds`
The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts) time limit for mongos instances.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `6000` |
### `sharding.mongos.priorityClassName`
The [Kuberentes Pod priority class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass) for mongos instances.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `high priority` |
### `sharding.mongos.annotations`
The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) metadata for the mongos instances.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `iam.amazonaws.com/role: role-arn` |
### `sharding.mongos.labels`
The [Kubernetes affinity labels :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) for mongos instances.
| Value type | Example |
| ----------- | ---------- |
| :material-label-outline: label | `rack: rack-22` |
### `sharding.mongos.nodeSelector`
The [Kubernetes nodeSelector :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) affinity constraint for mongos instances.
| Value type | Example |
| ----------- | ---------- |
| :material-label-outline: label | `disktype: ssd` |
### `sharding.mongos.livenessProbe.failureThreshold`
Number of consecutive unsuccessful tries of the [liveness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) to be undertaken before giving up.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `4` |
### `sharding.mongos.livenessProbe.initialDelaySeconds`
Number of seconds to wait after the container start before initiating the [liveness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `60` |
### `sharding.mongos.livenessProbe.periodSeconds`
How often to perform a [liveness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) (in seconds).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `30` |
### `sharding.mongos.livenessProbe.timeoutSeconds`
Number of seconds after which the [liveness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) times out.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `10` |
### `sharding.mongos.livenessProbe.startupDelaySeconds`
Time after which the liveness probe is failed if the MongoDB instance didn’t finish its full startup yet.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `7200` |
### `sharding.mongos.readinessProbe.failureThreshold`
Number of consecutive unsuccessful tries of the [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) to be undertaken before giving up.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `3` |
### `sharding.mongos.readinessProbe.initialDelaySeconds`
Number of seconds to wait after the container start before initiating the [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `10` |
### `sharding.mongos.readinessProbe.periodSeconds`
How often to perform a [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) (in seconds).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `3` |
### `sharding.mongos.readinessProbe.successThreshold`
Minimum consecutive successes for the [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) to be considered successful after having failed.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `1` |
### `sharding.mongos.readinessProbe.timeoutSeconds`
Number of seconds after which the [readiness probe :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) times out.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `2` |
### `sharding.mongos.containerSecurityContext`
A custom [Kubernetes Security Context for a Container :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to be used instead of the default one.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | `privileged: false` |
### `sharding.mongos.podSecurityContext`
A custom [Kubernetes Security Context for a Pod :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to be used instead of the default one.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | runAsUser: 1001
runAsGroup: 1001
supplementalGroups: [1001]
|
### `sharding.mongos.runtimeClassName`
Name of the [Kubernetes Runtime Class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/containers/runtime-class/) for mongos Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `image-rc` |
### `sharding.mongos.hookScript.configMapRef.name`
The name of the ConfigMap that contains a custom hook script that you can apply to the `mongos` Pods before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `hookscript-configmap` |
### `sharding.mongos.hookScript.script`
The inline hook script that you can apply to the `mongos` Pods before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `#!/usr/bin/env bash
echo "Hookscript started"` |
### `sharding.mongos.sidecars.image`
Image for the [custom sidecar container](sidecar.md) for mongos Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `busybox` |
### `sharding.mongos.sidecars.command`
Command for the [custom sidecar container](sidecar.md) for mongos Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-application-array-outline: array | `["/bin/sh"]` |
### `sharding.mongos.sidecars.args`
Command arguments for the [custom sidecar container](sidecar.md) for mongos Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-application-array-outline: array | `["-c", "while true; do echo echo $(date -u) 'test' >> /dev/null; sleep 5;done"]` |
### `sharding.mongos.sidecars.name`
Name of the [custom sidecar container](sidecar.md) for mongos Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `rs-sidecar-1` |
### `sharding.mongos.limits.cpu`
[Kubernetes CPU limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for mongos container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `300m` |
### `sharding.mongos.limits.memory`
[Kubernetes Memory limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for mongos container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `0.5G` |
### `sharding.mongos.resources.requests.cpu`
The [Kubernetes CPU requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for mongos container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `300m` |
### `sharding.mongos.requests.memory`
The [Kubernetes Memory requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for mongos container.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `0.5G` |
### `sharding.mongos.expose.type`
The [IP address type :octicons-link-external-16:](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) to be exposed.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `ClusterIP`|
### `sharding.mongos.expose.servicePerPod`
If set to `true`, a separate ClusterIP Service is created for each mongos instance.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `true` |
### `sharding.mongos.expose.loadBalancerClass`
Define the implementation of the load balancer you want to use. This setting enables you to select a custom or specific load balancer class instead of the default one provided by the cloud provider.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `eks.amazonaws.com/nlb`|
### `sharding.mongos.expose.loadBalancerSourceRanges`
The range of client IP addresses from which the load balancer should be reachable (if not set, there is no limitations).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `10.0.0.0/8` |
### `sharding.mongos.expose.annotations`
The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) metadata for the MongoDB mongos daemon.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http` |
### `sharding.mongos.expose.labels`
The [Kubernetes labels :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) for the MongoDB mongos Service.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `rack: rack-22` |
### `sharding.mongos.expose.nodePort`
The [Node port number :octicons-link-external-16:](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport) to be allocated for the MongoDB mongos Service when the `sharding.mongos.expose.type` is set to the `NodePort`, and `sharding.mongos.expose.servicePerPod` is not turned on.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `32017` |
### `sharding.mongos.internalTrafficPolicy`
Specifies whether Services for the mongos instances should [route internal traffic to cluster-wide or to node-local endpoints :octicons-link-external-16:](https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) (it can influence the load balancing effectiveness).
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `Local` |
### `sharding.mongos.externalTrafficPolicy`
Specifies whether Service for the mongos instances [should route external traffic :octicons-link-external-16:](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip) to cluster-wide (`Cluster`) or to node-local (`Local`) endpoints. It [can influence the load balancing effectiveness](expose.md#connecting-from-outside-kubernetes).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `Local` |
### `sharding.mongos.hostAliases.ip`
The IP address for [Kubernetes host aliases :octicons-link-external-16:](https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/) for mongos Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `"10.10.0.2"` |
### `sharding.mongos.hostAliases.hostnames`
Hostnames for [Kubernetes host aliases :octicons-link-external-16:](https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/) for mongos Pods.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | |
## Roles section
The `roles` section in the [deploy/cr.yaml :octicons-link-external-16:](https://github.com/percona/percona-server-mongodb-operator/blob/main/deploy/cr.yaml) file contains various configuration options [to configure custom MongoDB user roles via the Custom Resource](users.md#create-users-via-custom-resource).
### `roles.role`
The [custom MongoDB role :octicons-link-external-16:](https://www.mongodb.com/docs/manual/core/security-user-defined-roles/) name.
| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `myClusterwideAdmin` |
### `roles.db`
Database in which you want to store the user-defined role.
| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `admin
### `roles.authenticationRestrictions.clientSource`
List of the IP addresses or CIDR blocks *from which* users assigned this role can connect. MongoDB servers reject connection requests from users with this role if the requests come from a client that is not present in this array.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | `127.0.0.1` |
### `roles.authenticationRestrictions.serverAddress`
List of the IP addresses or CIDR blocks *to which* users assigned this role can connect. MongoDB servers reject connection requests from users with this role if the client requests to connect to a server that is not present in this array.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | `127.0.0.1` |
### `roles.privileges.actions`
List of custom role actions that users granted this role can perform: For a list of accepted values, see [Privilege Actions :octicons-link-external-16:](https://www.mongodb.com/docs/manual/reference/privilege-actions/#database-management-actions) in the MongoDB Manual.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | `addShard` |
### `roles.privileges.resource.db`
Database for which the custom role actions apply. An empty string ("") indicates that the privilege actions apply to all databases.
| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `""` |
### `roles.privileges.resource.collection`
Collection for which the custom role actions apply. An empty string ("") indicates that the privilege actions apply to all of the database's collections.
| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `""` |
### `roles.privileges.resource.cluster`
If true, the custom role actions apply to all databases and collections in the MongoDB deployment. False by default. If set to true, values for `roles.privileges.resource.db` and `roles.privileges.resource.collection` shouldn't be provided.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `true` |
### `roles.roles`
An array of roles (with names of the role and the database) from which this role inherits privileges, if any.
| Value type | Example |
| ---------- | ------- |
| :material-text-long: subdoc | role: read
db: admin
|
## Users section
The `users` section in the [deploy/cr.yaml :octicons-link-external-16:](https://github.com/percona/percona-server-mongodb-operator/blob/main/deploy/cr.yaml) file contains various configuration options [to configure custom MongoDB users via the Custom Resource](users.md#create-users-via-custom-resource).
### `users.name`
The username of the MongoDB user.
| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `my-user` |
### `users.db`
Database that the user authenticates against.
| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `admin` |
### `users.passwordSecretRef.name`
Name of the secret that contains the user's password. If `passwordSecretRef` is not present, password will be [generated automatically](users.md#create-users-manually).
| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `my-user-password` |
### `users.passwordSecretRef.key`
Key in the secret that corresponds to the value of the user's password (`password` by default).
| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `password` |
### `users.roles.role.name`
Name of the MongoDB role assigned to the user. As [built-in roles](https://www.mongodb.com/docs/manual/reference/built-in-roles/#built-in-roles), so [custom roles](https://github.com/mongodb/mongodb-kubernetes-operator/blob/master/docs/deploy-configure.md#define-a-custom-database-role) are supported.
| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `clusterAdmin` |
### `users.roles.role.db`
Database that the MongoDB role applies to.
| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `admin` |
## Backup Section
The `backup` section in the
[deploy/cr.yaml :octicons-link-external-16:](https://github.com/percona/percona-server-mongodb-operator/blob/main/deploy/cr.yaml)
file contains the following configuration options for the regular
Percona Server for MongoDB backups.
### `backup.enabled`
Enables or disables making backups.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `true` |
### `backup.image`
The Percona Server for MongoDB Docker image to use for the backup.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `percona/percona-server-mongodb-operator:{{ release }}-backup` |
### `backup.startingDeadlineSeconds`
The maximum time in seconds for a backup to start. The Operator compares the timestamp of the backup object against the current time. If the backup is not started within the set time, the Operator automatically marks it as “failed”.
If your cluster is starting or is not in the READY state when you start a backup, such backup will be marked as `failed`.
You can override this setting for a specific backup in the `deploy/backup/backup.yaml` configuration file.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `300` |
### `backup.hookScript.configMapRef.name`
The name of the ConfigMap that contains a custom hook script that you can apply to the `pbm-agent` container before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `hookscript-configmap` |
### `backup.hookScript.script`
The inline hook script that you can apply to tthe `pbm-agent` container before the main process.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `#!/usr/bin/env bash
echo "Hookscript started"` |
### `backup.serviceAccountName`
Name of the separate privileged service account for backups; **service account for backups is not used by the Operator any more, and the option is deprecated since the Operator version 1.16.0**.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `percona-server-mongodb-operator` |
### `backup.annotations`
The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) metadata for the backup job.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `sidecar.istio.io/inject: "false"` |
### `backup.resources.limits.cpu`
[Kubernetes CPU limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for backups.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `300m` |
### `backup.resources.limits.memory`
[Kubernetes Memory limit :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for backups.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `1.2G` |
### `backup.resources.requests.cpu`
The [Kubernetes CPU requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for backups.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `300m` |
### `backup.resources.requests.memory`
The [Kubernetes Memory requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for backups.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `1G` |
### `backup.containerSecurityContext`
A custom [Kubernetes Security Context for a Container :octicons-link-external-16:](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to be used instead of the default one.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | `privileged: false` |
### `backup.storages.STORAGE-NAME.main`
Marks the storage as main. All other storages you define are added as profiles. The Operator saves backups to all storages but it saves oplog chunks for point-in-time recovery only to the main storage. You can define only one storage as main. Read more about [multiple storages for backups](multi-storage.md).
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `true` |
### `backup.storages.STORAGE-NAME.type`
The cloud storage type used for backups. Only `s3`, `gcs`, `minio`, `azure`, and `filesystem` types are supported.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `s3` |
### `backup.storages.STORAGE-NAME.s3.insecureSkipTLSVerify`
Enable or disable verification of the storage server TLS certificate. Disabling it may be useful e.g. to skip TLS verification for private S3-compatible storage with a self-issued certificate.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `true` |
### `backup.storages.STORAGE-NAME.s3.credentialsSecret`
The [Kubernetes secret :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/secret/) for backups. It should contain `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` keys.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `my-cluster-name-backup-s3` |
### `backup.storages.STORAGE-NAME.s3.bucket`
The [Amazon S3 bucket :octicons-link-external-16:](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html) name for backups.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | |
### `backup.storages.STORAGE-NAME.s3.prefix`
The path (sub-folder) to the backups inside the [bucket :octicons-link-external-16:](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `""` |
### `backup.storages.STORAGE-NAME.s3.uploadPartSize`
The size of data chunks in bytes to be uploaded to the storage bucket (10 MiB by default).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `10485760` |
### `backup.storages.STORAGE-NAME.s3.maxUploadParts`
The maximum number of data chunks to be uploaded to the storage bucket (10000 by default).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `10000` |
### `backup.storages.STORAGE-NAME.s3.storageClass`
The [storage class name :octicons-link-external-16:](https://aws.amazon.com/s3/storage-classes) of the S3 storage.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `STANDARD` |
### `backup.storages.STORAGE-NAME.s3.retryer.numMaxRetries`
The maximum number of retries to upload data to S3 storage.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `3`|
### `backup.storages.STORAGE-NAME.s3.retryer.minRetryDelay`
The minimum time in milliseconds to wait till the next retry.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `10`|
### `backup.storages.STORAGE-NAME.s3.retryer.maxRetryDelay`
The maximum time in minutes to wait till the next retry.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `5`|
### `backup.storages.STORAGE-NAME.s3.region`
The [AWS region :octicons-link-external-16:](https://docs.aws.amazon.com/general/latest/gr/rande.html) to use. Please note **this option is mandatory** for Amazon and all S3-compatible storages.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `us-east-1`|
### `backup.storages.STORAGE-NAME.s3.endpointUrl`
The URL of the S3-compatible storage to be used. It is required for Minio storage and is not needed for the original Amazon S3 cloud.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | |
### `backup.storages.STORAGE-NAME.s3.serverSideEncryption.kmsKeyID`
The [ID of the key stored in the AWS KMS :octicons-link-external-16:](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys) used by the Operator for [backups server-side encryption](backups-encryption.md)
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `""` |
### `backup.storages.STORAGE-NAME.s3.serverSideEncryption.sseAlgorithm`
The key management mode used for [backups server-side encryption](backups-encryption.md) with the encryption keys stored in [AWS KMS :octicons-link-external-16:](https://aws.amazon.com/kms/) - `aws:kms` is the only supported value for now.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `aws:kms` |
### `backup.storages.STORAGE-NAME.s3.serverSideEncryption.sseCustomerAlgorithm`
The key management mode for [backups server-side encryption with customer-provided keys](backups-encryption.md) - `AES256` is the only supported value for now.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `AES256` |
### `backup.storages.STORAGE-NAME.s3.serverSideEncryption.sseCustomerKey`
The locally-stored base64-encoded custom encryption key used by the Operator for [backups server-side encryption](backups-encryption.md) on S3-compatible storages.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `""` |
### `backup.storages.STORAGE-NAME.gcs.bucket`
The name of the storage bucket. See the [GCS bucket naming guidelines :octicons-link-external-16:](https://cloud.google.com/storage/docs/naming-buckets#requirements) for bucket name requirements.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `""` |
### `backup.storages.STORAGE-NAME.gcs.prefix`
The path to the data directory in the bucket. If undefined, backups are stored in the bucket's root directory.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `""` |
### `backup.storages.STORAGE-NAME.gcs.credentialsSecret`
The [Kubernetes secret :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/secret/) for backups. It contains the GCS credentials as either the service account and JSON keys or HMAC keys.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `"my-cluster-name-backup-gcs"` |
### `backup.storages.STORAGE-NAME.gcs.chunkSize`
The size of data chunks in bytes to be uploaded to the GCS storage bucket in a single request. Larger data chunks will be split over multiple requests. Default data chunk size is 10MB.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `10485760` |
### `backup.storages.STORAGE-NAME.gcs.retryer.backoffInitial`
The time to wait to make an initial retry, in seconds. Default value is 1 sec
| Value type | Example |
| ----------- | ---------- |
| :material-code-int: int | `1` |
### `backup.storages.STORAGE-NAME.gcs.retryer.backoffMax`
The maximum amount of time between retries, in seconds. Default value is 30 sec.
| Value type | Example |
| ----------- | ---------- |
| :material-code-int: int | `30` |
### `backup.storages.STORAGE-NAME.gcs.retryer.backoffMultiplier`
Defines the time to increase the wait time after each retry. For example, with the default value of 2 seconds, if the first wait time is 1 second, the next will be 2 seconds, then 4 seconds, and so on, until it reaches the maximum.
| Value type | Example |
| ----------- | ---------- |
| :material-code-int: int | `2` |
### `backup.storages.STORAGE-NAME.azure.credentialsSecret`
The [Kubernetes secret :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/secret/) for backups. It should contain `AZURE_STORAGE_ACCOUNT_NAME` and `AZURE_STORAGE_ACCOUNT_KEY` |
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `my-cluster-azure-secret` |
### `backup.storages.STORAGE-NAME.azure.container`
Name of the [container :octicons-link-external-16:](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction#containers) for backups.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `my-container` |
### `backup.storages.STORAGE-NAME.azure.prefix`
The path (sub-folder) to the backups inside the [container :octicons-link-external-16:](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction#containers).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `""` |
### `backup.storages.STORAGE-NAME.azure.endpointUrl`
The [private endpoint URL :octicons-link-external-16:](https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview) to use instead of the public endpoint.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `https://accountName.blob.core.windows.net` |
### `backup.storages.STORAGE-NAME.filesystem.path`
The mount point for a remote filesystem configured to store backups.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `/mnt/nfs/` |
### `backup.volumeMounts.mountPath`
Mount path for the [remote backup storage](backups-storage.md#remote-file-server).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `/mnt/nfs/` |
### `backup.volumeMounts.name`
Name of the [remote backup storage](backups-storage.md#remote-file-server).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `backup-nfs` |
### `backup.pitr.enabled`
Enables or disables [point-in-time-recovery functionality](backups-pitr.md).
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `false` |
### `backup.pitr.oplogOnly`
If true, Percona Backup for MongoDB saves oplog chunks even without the base logical backup snapshot (oplog chunks without a base backup can't be used with logical backups to restore a backup by the Operator, [but can still be useful for manual restore operations :octicons-link-external-16:](https://docs.percona.com/percona-backup-mongodb/usage/oplog-replay.html)).
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | false |
### `backup.pitr.oplogSpanMin`
Number of minutes between the uploads of oplogs.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `10` |
### `backup.pitr.compressionType`
The point-in-time-recovery chunks compression format, [can be gzip, snappy, lz4, pgzip, zstd, s2, or none :octicons-link-external-16:](https://docs.percona.com/percona-backup-mongodb/point-in-time-recovery.html#incremental-backups).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `gzip` |
### `backup.pitr.compressionLevel`
The point-in-time-recovery chunks compression level ([higher values result in better but slower compression :octicons-link-external-16:](https://docs.percona.com/percona-backup-mongodb/point-in-time-recovery.html#incremental-backups)).
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `6` |
### `backup.configuration.backupOptions.priority`
The list of mongod nodes and their priority for making backups.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | "localhost:28019": 2.5
"localhost:27018": 2.5
|
### `backup.configuration.backupOptions.timeouts.startingStatus`
The wait time in seconds Percona Backup for MongoDB should use to start physical backups on all shards. The 0 (zero) value resets the timeout to the default 33 seconds.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `33` |
### `backup.configuration.backupOptions.oplogSpanMin`
The duration (in minutes) of oplog slices saved by Percona Backup for MongoDB with the logical backup snapshot.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `10` |
### `backup.configuration.restoreOptions.batchSize`
The number of documents Percona Backup for MongoDB should buffer.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `500` |
### `backup.configuration.restoreOptions.numInsertionWorkers`
The number of workers that Percona Backup for MongoDB should use to add the documents to buffer.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `10` |
### `backup.configuration.restoreOptions.numDownloadWorkers`
The number of workers that Percona Backup for MongoDB should use to request data chunks from the storage during the restore.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `4` |
### `backup.configuration.restoreOptions.maxDownloadBufferMb`
The maximum size of the in-memory buffer that Percona Backup for MongoDB should use use when downloading files from the S3 storage.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `0` |
### `backup.configuration.restoreOptions.downloadChunkMb`
The size of the data chunk in MB, that Percona Backup for MongoDB should use when downloading from the S3 storage.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `32` |
### `backup.configuration.restoreOptions.mongodLocation`
The custom path to mongod binaries which Percona Backup for MongoDB should use during restore.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `/usr/bin/mongo` |
### `backup.configuration.restoreOptions.mongodLocationMap`
The list of custom paths to mongod binaries on every node, which Percona Backup for MongoDB should use during restore.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | "node01:2017": /usr/bin/mongo
"node03:27017": /usr/bin/mongo
|
### `backup.tasks.name`
The name of the backup.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | |
### `backup.tasks.enabled`
Enables or disables this exact backup.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `true` |
### `backup.tasks.schedule`
The scheduled time to make a backup, specified in the [crontab format :octicons-link-external-16:](https://en.wikipedia.org/wiki/Cron).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `0 0 \* \* 6` |
### `backup.tasks.keep`
This option is deprecated and kept for backward compatibility. Use the `backup.tasks.retention` subsection instead.
The amount of most recent backups to store. Older backups are automatically deleted. Set `keep` to zero or completely remove it to disable automatic deletion of backups.
| Value type | Example |
| ----------- | ---------- |
| :material-numeric-1-box: int | `3` |
### `backup.tasks.retention.type`
Defines how to retain backups. The type of retention defaults to `count`.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `count` |
### `backup.tasks.retention.count`
Defines the number of backups to store. Older backups are automatically deleted from the cluster.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `count` |
### `backup.tasks.retention.deleteFromStorage`
Defines if the backups are deleted from the cloud storage too.
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `true` |
### `backup.tasks.storageName`
The name of the S3-compatible storage for backups, configured in the storages subsection.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `st-us-west` |
### `backup.tasks.compressionType`
The backup compression format, [can be gzip, snappy, lz4, pgzip, zstd, s2, or none :octicons-link-external-16:](https://docs.percona.com/percona-backup-mongodb/running.html#starting-a-backup).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `gzip` |
### `backup.tasks.compressionLevel`
The backup compression level ([higher values result in better but slower compression :octicons-link-external-16:](https://docs.percona.com/percona-backup-mongodb/running.html#starting-a-backup)).
| Value type | Example |
| ----------- | ---------- |
| :octicons-number-24: int | `6` |
### `backup.tasks.type`
The backup type: (can be either `logical` (default) or `physical`; see [the Operator backups official documentation](backups.md#backup-types) for details.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `physical` |
## Log Collector section
The `logcollector` section contains configuration options for [Fluent Bit Log Collector :octicons-link-external-16:](https://fluentbit.io).
### `logcollector.enabled`
Enables or disables [persistent logging with Fluent Bit](persistent-logging.md).
| Value type | Example |
| ----------- | ---------- |
| :material-toggle-switch-outline: boolean | `true` |
### `logcollector.image`
Log Collector Docker image to use.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `perconalab/fluentbit:main-logcollector` |
### `logcollector.configuration`
Additional configuration options (see [Fluent Bit official documentation :octicons-link-external-16:](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/configuration-file) for details).
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | |
### `logcollector.logrotate.configuration`
Overrides the default logrotate configuration used by the log collector sidecar container.
| Value type | Example |
| ----------- | ---------- |
| :material-text-long: subdoc | |
### `logcollector.logrotate.extraConfig.name`
References a ConfigMap or a Secret containing additional logrotate configuration. The key name must end with `.conf`. The `mongodb.conf` key name is reserved for the main configuration and is not allowed to use.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `logrotate-config` |
### `logcollector.logrotate.schedule`
Cron expression for the logrotate schedule (default: `0 0 0 * * *`).
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `"0 0 0 * * *"` |
### `logcollector.resources.requests.memory`
The [Kubernetes memory requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for a Log Collector sidecar container in a Percona Server for MongoDB Pod.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `100M` |
### `logcollector.resources.requests.cpu`
[Kubernetes CPU requests :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for a Log collector sidecar container in a Percona Server for MongoDB Pod.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `200m` |