Custom Resource options
The operator is configured via the spec section of the deploy/cr.yaml file. This file contains the following spec sections:
Key | Value type | Default | Description |
---|---|---|---|
platform | string | kubernetes | Override/set the Kubernetes platform: kubernetes or openshift. Set openshift on OpenShift 3.11+ |
pause | boolean | false |
Pause/resume: setting it to true gracefully stops the cluster, and
setting it to false after shut down starts the cluster back. |
crVersion | string | 1.6.0 |
Version of the Operator the Custom Resource belongs to |
image | string | percona/percona-server-mongodb:4.4.2-4 |
The Docker image of Percona Server for MongoDB to deploy (actual image names can be found in the list of certified images) |
imagePullPolicy | string | Always |
The policy used to update images |
imagePullSecrets.name | string | private-registry-credentials |
The Kubernetes ImagePullSecret to access the custom registry |
ClusterServiceDNSSuffix | string | svc.cluster.local |
The (non-standard) cluster domain to be used as a suffix of the Service name |
runUid | int | 1001 | The (non-standard) user ID |
allowUnsafeConfigurations | boolean | false |
Prevents users from configuring a cluster with unsafe parameters such as starting the cluster with less than 3 replica set nodes, with odd number of replica set nodes and no arbiter, or without TLS/SSL certificates (if false , unsafe parameters will be automatically changed to safe defaults) |
updateStrategy | string | SmartUpdate |
A strategy the Operator uses for upgrades. Possible values are SmartUpdate, RollingUpdate and OnDelete. |
upgradeOptions | subdoc | Upgrade configuration section | |
secrets | subdoc | Operator secrets section | |
replsets | subdoc | Operator MongoDB Replica Set section | |
pmm | subdoc | Percona Monitoring and Management section | |
sharding | subdoc | MongoDB sharding configuration section | |
mongod | subdoc | Operator MongoDB Mongod configuration section | |
backup | subdoc | Percona Server for MongoDB backups section |
Upgrade Options Section
The upgradeOptions
section in the deploy/cr.yaml file contains various configuration options to control Percona Server for MongoDB upgrades.
Key | |
Value | string |
Example | https://check.percona.com |
Description | The Version Service URL used to check versions compatibility for upgrade |
Key | |
Value | string |
Example | Recommended |
Description | Specifies how updates are processed by the Operator.
Never or Disabled will completely disable automatic upgrades, otherwise it can be
set to Latest or Recommended or to a specific version string of Percona Server for
MongoDB (e.g. 4.4.2-4 )
that is wished to be version-locked (so that the user can control
the version running, but use automatic upgrades to move between them). |
Key | |
Value | string |
Example | 0 2 * * * |
Description | Scheduled time to check for updates, specified in the crontab format |
Secrets section
Each spec in its turn may contain some key-value pairs. The secrets one has only two of them:
Key | |
Value Type | string |
Example | my-cluster-name-mongodb-key |
Description | The secret name for the MongoDB Internal Auth Key. This secret is auto-created by the operator if it doesn’t exist. |
Key | |
Value Type | string |
Example | my-cluster-name-mongodb-users |
Description | The secret name for the MongoDB users required to run the operator. This secret is required to run the operator. |
Replsets Section
The replsets section controls the MongoDB Replica Set.
Key | |
Value Type | string |
Example | rs 0 |
Description | The name of the MongoDB Replica Set |
Key | |
Value Type | int |
Example | 3 |
Description | The size of the MongoDB Replica Set, must be >= 3 for High-Availability |
Key | |
Value Type | string |
Example | kubernetes.io/hostname |
Description | The Kubernetes topologyKey node affinity constraint for the Replica Set nodes |
Key | |
Value Type | subdoc |
Example | |
Description | 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 |
Key | |
Value Type | string |
Example | node.alpha.kubernetes.io/unreachable |
Description | The Kubernetes Pod tolerations key for the Replica Set nodes |
Key | |
Value Type | string |
Example | Exists |
Description | The Kubernetes Pod tolerations operator for the Replica Set nodes |
Key | |
Value Type | string |
Example | NoExecute |
Description | The Kubernetes Pod tolerations effect for the Replica Set nodes |
Key | |
Value Type | int |
Example | 6000 |
Description | The Kubernetes Pod tolerations time limit for the Replica Set nodes |
Key | |
Value Type | string |
Example | high priority |
Description | The Kuberentes Pod priority class for the Replica Set nodes |
Key | |
Value Type | string |
Example | role-arn |
Description | The AWS IAM role for the Replica Set nodes |
Key | |
Value Type | label |
Example | rack: rack-22 |
Description | The Kubernetes affinity labels for the Replica Set nodes |
Key | |
Value Type | label |
Example | disktype: ssd |
Description | The Kubernetes nodeSelector affinity constraint for the Replica Set nodes |
Key | |
Value Type | int |
Example | 4 |
Description | Number of consecutive unsuccessful tries of the liveness probe to be undertaken before giving up. |
Key | |
Value Type | int |
Example | 60 |
Description | Number of seconds to wait after the container start before initiating the liveness probe. |
Key | |
Value Type | int |
Example | 30 |
Description | How often to perform a liveness probe (in seconds). |
Key | |
Value Type | int |
Example | 1 |
Description | Minimum consecutive successes for the liveness probe to be considered successful after having failed. |
Key | |
Value Type | int |
Example | 5 |
Description | Number of seconds after which the liveness probe times out. |
Key | |
Value Type | int |
Example | 7200 |
Description | Time after which the liveness probe is failed if the MongoDB instance didn’t finish its full startup yet |
Key | |
Value Type | int |
Example | 1 |
Description | The Kubernetes Pod distribution budget limit specifying the maximum value for unavailable Pods |
Key | |
Value Type | int |
Example | 1 |
Description | The Kubernetes Pod distribution budget limit specifying the minimum value for available Pods |
Key | |
Value Type | boolean |
Example | false |
Description | Enable or disable exposing MongoDB Replica Set nodes with dedicated IP addresses |
Key | |
Value Type | string |
Example | ClusterIP |
Description | The IP address type to be exposed |
Key | |
Value Type | boolean |
Example | false |
Description | Enable or disable creation of Replica Set Arbiter nodes within the cluster |
Key | |
Value Type | int |
Example | 1 |
Description | The number of Replica Set Arbiter instances within the cluster |
Key | |
Value Type | string |
Example | kubernetes.io/hostname |
Description | The Kubernetes topologyKey node affinity constraint for the Arbiter |
Key | |
Value Type | subdoc |
Example | |
Description | 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 |
Key | |
Value Type | string |
Example | node.alpha.kubernetes.io/unreachable |
Description | The Kubernetes Pod tolerations key for the Arbiter nodes |
Key | |
Value Type | string |
Example | Exists |
Description | The Kubernetes Pod tolerations operator for the Arbiter nodes |
Key | |
Value Type | string |
Example | NoExecute |
Description | The Kubernetes Pod tolerations effect for the Arbiter nodes |
Key | |
Value Type | int |
Example | 6000 |
Description | The Kubernetes Pod tolerations time limit for the Arbiter nodes |
Key | |
Value Type | string |
Example | high priority |
Description | The Kuberentes Pod priority class for the Arbiter nodes |
Key | |
Value Type | string |
Example | role-arn |
Description | The AWS IAM role for the Arbiter nodes |
Key | |
Value Type | label |
Example | rack: rack-22 |
Description | The Kubernetes affinity labels for the Arbiter nodes |
Key | |
Value Type | label |
Example | disktype: ssd |
Description | The Kubernetes nodeSelector affinity constraint for the Arbiter nodes |
Key | |
Value Type | string |
Example | default |
Description | The Kubernetes Scheduler |
Key | |
Value Type | string |
Example | 300m |
Description | Kubernetes CPU limit for MongoDB container |
Key | |
Value Type | string |
Example | 0.5G |
Description | Kubernetes Memory limit for MongoDB container |
Key | |
Value Type | string |
Example | |
Description | The Kubernetes CPU requests for MongoDB container |
Key | |
Value Type | string |
Example | |
Description | The Kubernetes Memory requests for MongoDB container |
Key | |
Value Type | string |
Example | {} |
Description | The Kubernetes emptyDir volume, i.e. the directory which will be created on a node, and will be accessible to the MongoDB Pod containers |
Key | |
Value Type | string |
Example | /data |
Description | Kubernetes hostPath volume, i.e. the file or directory of a node that will be accessible to the MongoDB Pod containers |
Key | |
Value Type | string |
Example | Directory |
Description | The Kubernetes hostPath volume type |
Key | |
Value Type | string |
Example | standard |
Description | The Kubernetes Storage Class to use with the MongoDB container Persistent Volume Claim. Use Storage Class with XFS as the default filesystem if possible, for better MongoDB performance |
Key | |
Value Type | array |
Example | [ "ReadWriteOnce" ] |
Description | The Kubernetes Persistent Volume access modes for the MongoDB container |
Key | replsets.volumeSpec.persistentVolumeClaim.resources.requests.storage |
Value Type | string |
Example | 3Gi |
Description | The Kubernetes Persistent Volume size for the MongoDB container |
PMM Section
The pmm
section in the deploy/cr.yaml file contains configuration
options for Percona Monitoring and Management.
Key | |
Value Type | boolean |
Example | false |
Description | Enables or disables monitoring Percona Server for MongoDB with PMM |
Key | |
Value Type | string |
Example | percona/pmm-client:2.12.0 |
Description | PMM Client docker image to use |
Key | |
Value Type | string |
Example | monitoring-service |
Description | Address of the PMM Server to collect data from the Cluster |
Key | |
Value Type | string |
Example | --environment=DEV-ENV --custom-labels=DEV-ENV |
Description | Additional parameters which will be passed to the pmm-admin add mongodb command for mongod Pods |
Key | |
Value Type | string |
Example | --environment=DEV-ENV --custom-labels=DEV-ENV |
Description | Additional parameters which will be passed to the pmm-admin add mongodb command for mongos Pods |
Sharding Section
The sharding
section in the deploy/cr.yaml file contains configuration
options for Percona Server for MondoDB sharding.
Key | |
Value Type | boolean |
Example | true |
Description | Enables or disables Percona Server for MondoDB sharding |
Key | |
Value Type | int |
Example | 3 |
Description | The number of Config Server instances within the cluster |
Key | |
Value Type | string |
Example | {} |
Description | The Kubernetes emptyDir volume, i.e. the directory which will be created on a node, and will be accessible to the Config Server Pod containers |
Key | |
Value Type | string |
Example | /data |
Description | Kubernetes hostPath volume, i.e. the file or directory of a node that will be accessible to the Config Server Pod containers |
Key | |
Value Type | string |
Example | Directory |
Description | The Kubernetes hostPath volume type |
Key | sharding.configsvrReplSet.volumeSpec.persistentVolumeClaim.storageClassName |
Value Type | string |
Example | standard |
Description | The Kubernetes Storage Class to use with the Config Server container Persistent Volume Claim. Use Storage Class with XFS as the default filesystem if possible, for better MongoDB performance |
Key | sharding.configsvrReplSet.volumeSpec.persistentVolumeClaim.accessModes |
Value Type | array |
Example | [ "ReadWriteOnce" ] |
Description | The Kubernetes Persistent Volume access modes for the Config Server container |
Key | sharding.configsvrReplSet.volumeSpec.persistentVolumeClaim.resources.requests.storage |
Value Type | string |
Example | 3Gi |
Description | The Kubernetes Persistent Volume size for the Config Server container |
Key | |
Value Type | int |
Example | 3 |
Description | The number of mongos instances within the cluster |
Key | |
Value Type | string |
Example | kubernetes.io/hostname |
Description | The Kubernetes topologyKey node affinity constraint for mongos |
Key | |
Value Type | subdoc |
Example | |
Description | 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 |
Key | |
Value Type | string |
Example | node.alpha.kubernetes.io/unreachable |
Description | The Kubernetes Pod tolerations key for mongos instances |
Key | |
Value Type | string |
Example | Exists |
Description | The Kubernetes Pod tolerations operator for mongos instances |
Key | |
Value Type | string |
Example | NoExecute |
Description | The Kubernetes Pod tolerations effect for mongos instances |
Key | |
Value Type | int |
Example | 6000 |
Description | The Kubernetes Pod tolerations time limit for mongos instances |
Key | |
Value Type | string |
Example | high priority |
Description | The Kuberentes Pod priority class for mongos instances |
Key | |
Value Type | string |
Example | role-arn |
Description | The AWS IAM role for mongos instances |
Key | |
Value Type | label |
Example | rack: rack-22 |
Description | The Kubernetes affinity labels for mongos instances |
Key | |
Value Type | label |
Example | disktype: ssd |
Description | The Kubernetes nodeSelector affinity constraint for mongos instances |
Key | |
Value Type | string |
Example | 300m |
Description | Kubernetes CPU limit for mongos container |
Key | |
Value Type | string |
Example | 0.5G |
Description | Kubernetes Memory limit for mongos container |
Key | |
Value Type | string |
Example | 300m |
Description | The Kubernetes CPU requests for mongos container |
Key | |
Value Type | string |
Example | 0.5G |
Description | The Kubernetes Memory requests for mongos container |
Key | |
Value Type | boolean |
Example | false |
Description | Enable or disable exposing MongoDB mongos daemons with dedicated IP addresses |
Key | |
Value Type | string |
Example | ClusterIP |
Description | The IP address type to be exposed |
Key | |
Value | string |
Example | 10.0.0.0/8 |
Description | The range of client IP addresses from which the load balancer should be reachable (if not set, there is no limitations) |
Key | |
Value | string |
Example | service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http |
Description | The Kubernetes annotations metadata for the MongoDB mongos daemon |
Key | |
Value Type | string |
Example | |
Description | Sets the auditLog.destination option for the MongoDB mongos daemon |
Key | |
Value Type | string |
Example | BSON |
Description | Sets the auditLog.format option for the MongoDB mongos daemon |
Key | |
Value Type | string |
Example | {} |
Description | Sets the auditLog.filter option for the MongoDB mongos daemon |
Mongod Section
This section contains the Mongod configuration options.
Key | |
Value Type | int |
Example | 27017 |
Description | Sets the MongoDB net.port option |
Key | |
Value Type | int |
Example | 0 |
Description | Sets the Kubernetes hostPort option |
Key | |
Value Type | bool |
Example | false |
Description | Enables/disables Percona Server for MongoDB Log Redaction |
Key | |
Value Type | bool |
Example | true |
Description | Enables/disables Percona Server for MongoDB data at rest encryption |
Key | |
Value Type | string |
Example | my-cluster-name-mongodb-encryption-key |
Description | Specifies a secret object with the encryption key |
Key | |
Value Type | string |
Example | AES256-CBC |
Description | Sets Percona Server for MongoDB encryption cipher mode |
Key | |
Value Type | int |
Example | 60 |
Description | Sets the Percona Server for MongoDB ttlMonitorSleepSecs option |
Key | |
Value Type | int |
Example | 128 |
Description | Sets the wiredTigerConcurrentReadTransactions option |
Key | |
Value Type | int |
Example | 128 |
Description | Sets the wiredTigerConcurrentWriteTransactions option |
Key | |
Value Type | string |
Example | wiredTiger |
Description | Sets the storage.engine option |
Key | |
Value Type | float |
Example | 0.9 |
Description | The ratio used to compute the storage.engine.inMemory.inMemorySizeGb option |
Key | |
Value Type | int |
Example | 16 |
Description | Sets the storage.mmapv1.nsSize option |
Key | |
Value Type | bool |
Example | false |
Description | Sets the storage.mmapv1.smallfiles option |
Key | |
Value Type | float |
Example | 0.5 |
Description | The ratio used to compute the storage.wiredTiger.engineConfig.cacheSizeGB option |
Key | |
Value Type | bool |
Example | false |
Description | Sets the storage.wiredTiger.engineConfig.directoryForIndexes option |
Key | |
Value Type | string |
Example | snappy |
Description | Sets the storage.wiredTiger.engineConfig.journalCompressor option |
Key | |
Value Type | string |
Example | snappy |
Description | Sets the storage.wiredTiger.collectionConfig.blockCompressor option |
Key | |
Value Type | bool |
Example | true |
Description | Sets the storage.wiredTiger.indexConfig.prefixCompression option |
Key | |
Value Type | string |
Example | slowOp |
Description | Sets the operationProfiling.mode option |
Key | |
Value Type | int |
Example | 100 |
Description | Sets the operationProfiling.slowOpThresholdMs option |
Key | |
Value Type | int |
Example | 1 |
Description | Sets the operationProfiling.rateLimit option |
Key | |
Value Type | string |
Example | |
Description | Sets the auditLog.destination option |
Key | |
Value Type | string |
Example | BSON |
Description | Sets the auditLog.format option |
Key | |
Value Type | string |
Example | {} |
Description | Sets the auditLog.filter option |
Backup Section
The backup
section in the
deploy/cr.yaml
file contains the following configuration options for the regular
Percona Server for MongoDB backups.
Key | |
Value Type | boolean |
Example | true |
Description | Enables or disables making backups |
Key | |
Value Type | boolean |
Example | true |
Description | Enables or disables debug mode for backups |
Key | |
Value Type | boolean |
Example | true |
Description | Enables or disables restarting the previously failed backup process |
Key | |
Value Type | string |
Example | percona/percona-server-mongodb-operator:1.6.0-backup |
Description | The Percona Server for MongoDB Docker image to use for the backup |
Key | |
Value Type | string |
Example | percona-server-mongodb-operator |
Description | Nname of the separate privileged service account used by the Operator |
Key | |
Value Type | string |
Example | 100m |
Description | Kubernetes CPU limit for backups |
Key | |
Value Type | string |
Example | 0.2G |
Description | Kubernetes Memory limit for backups |
Key | |
Value Type | string |
Example | 100m |
Description | The Kubernetes CPU requests for backups |
Key | |
Value Type | string |
Example | 0.1G |
Description | The Kubernetes Memory requests for backups |
Key | |
Value | string |
Example | s3 |
Description | The cloud storage type used for backups. Only s3 type is currently
supported |
Key | |
Value | string |
Example | my-cluster-name-backup-s3 |
Description | The Kubernetes secret for
backups. It should contain AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY keys. |
Key | |
Value | string |
Example | |
Description | The Amazon S3 bucket name for backups |
Key | |
Value | string |
Example | us-east-1 |
Description | The AWS region to use. Please note this option is mandatory for Amazon and all S3-compatible storages |
Key | |
Value | string |
Example | |
Description | The endpoint URL of the S3-compatible storage to be used (not needed for the original Amazon S3 cloud) |
Key | |
Value Type | string |
Example | |
Description | The name of the backup |
Key | |
Value Type | boolean |
Example | true |
Description | Enables or disables this exact backup |
Key | |
Value Type | int |
Example | 0 0 * * 6 |
Description | The scheduled time to make a backup, specified in the crontab format |
Key | |
Value Type | string |
Example | st-us-west |
Description | The name of the S3-compatible storage for backups, configured in the storages subsection |
Key | |
Value Type | string |
Example | gzip |
Description | The backup compression format |
Contact Us
For free technical help, visit the Percona Community Forum.To report bugs or submit feature requests, open a JIRA ticket.
For paid support and managed or professional services, contact Percona Sales.