Custom Resource options

The operator is configured via the spec section of the deploy/cr.yaml file. This file contains the following spec sections to configure three main subsystems of the cluster:

Custom Resource options
Key Value Type Description
pxc subdoc Percona XtraDB Cluster general section
proxysql subdoc ProxySQL section
pmm subdoc Percona Moonitoring and Management section
backup subdoc Percona XtraDB Cluster backups section

PXC Section

The pxc section in the deploy/cr.yaml file contains general configuration options for the Percona XtraDB Cluster.

Key pxc.size
Value int
Example 3
Description The size of the Percona XtraDB cluster must be >= 3 for High Availability
 
Key pxc.allowUnsafeConfigurations
Value boolean
Example false
Description Prevents users from configuring a cluster with unsafe parameters such as starting the cluster with less than 3 nodes or starting the cluster without TLS/SSL certificates
 
Key pxc.image
Value string
Example percona/percona-xtradb-cluster-operator:1.3.0-pxc
Description The Docker image of the Percona cluster used
 
Key pxc.readinessDelaySec
Value int
Example 15
Description Adds a delay before a run check to verify the application is ready to process traffic
 
Key pxc.livenessDelaySec
Value int
Example 300
Description Adds a delay before the run check ensures the application is healthy and capable of processing requests
 
Key pxc.forceUnsafeBootstrap
Value boolean
Example false
Description The setting can be reset in case of a sudden crash when all nodes may be considered unsafe to bootstrap from. The setting lets a node be selected and set to safe_to_bootstrap and provides data recovery
 
Key pxc.configuration
Value string
Example

|

[mysqld]

wsrep_debug=ON

wsrep-provider_options=gcache.size=1G;gcache.recover=yes

Description The my.cnf file options to be passed to Percona XtraDB cluster nodes
 
Key pxc.imagePullSecrets.name
Value string
Example private-registry-credentials
Description The Kubernetes ImagePullSecret
 
Key pxc.priorityClassName
Value string
Example high-priority
Description The Kubernetes Pod priority class
 
Key pxc.schedulerName
Value string
Example default-scheduler
Description The Kubernetes Scheduler
 
Key pxc.annotations
Value label
Example iam.amazonaws.com/role: role-arn
Description The Kubernetes annotations
 
Key pxc.labels
Value label
Example rack: rack-22
Description Labels are key-value pairs attached to objects
 
Key pxc.resources.requests.memory
Value string
Example 1G
Description The Kubernetes memory requests for a PXC container
 
Key pxc.resources.requests.cpu
Value string
Example 600m
Description Kubernetes CPU requests for a PXC container
 
Key pxc.resources.limits.memory
Value string
Example 1G
Description Kubernetes memory limits for a PXC container
 
Key pxc.nodeSelector
Value label
Example disktype: ssd
Description Kubernetes nodeSelector
 
Key pxc.affinity.topologyKey
Value string
Example kubernetes.io/hostname
Description The Operator topology key node anti-affinity constraint
 
Key pxc.affinity.advanced
Value 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 pxc.tolerations
Value subdoc
Example node.alpha.kubernetes.io/unreachable
Description Kubernetes Pod tolerations
 
Key pxc.podDisruptionBudget.maxUnavailable
Value int
Example 1
Description The Kubernetes podDisruptionBudget specifies the number of Pods from the set unavailable after the eviction
 
Key pxc.podDisruptionBudget.minAvailable
Value int
Example 0
Description The Kubernetes podDisruptionBudget Pods that must be available after an eviction
 
Key pxc.volumeSpec.emptyDir
Value string
Example {}
Description The Kubernetes emptyDir volume The directory created on a node and accessible to the PXC Pod containers
 
Key pxc.volumeSpec.hostPath.path
Value string
Example /data
Description Kubernetes hostPath The volume that mounts a directory from the host node’s filesystem into your Pod. The path property is required
 
Key pxc.volumeSpec.hostPath.type
Value string
Example Directory
Description The Kubernetes hostPath. An optional property for the hostPath
 
Key pxc.volumeSpec.persistentVolumeClaim.storageClassName
Value string
Example standard
Description Set the Kubernetes storage class to use with the PXC PersistentVolumeClaim
 
Key pxc.volumeSpec.persistentVolumeClaim.accessModes
Value array
Example [ReadWriteOnce]
Description The Kubernetes PersistentVolumeClaim access modes for the Percona XtraDB cluster
 
Key pxc.volumeSpec.resources.requests.storage
Value string
Example 6Gi
Description The Kubernetes PersistentVolumeClaim size for the Percona XtraDB cluster
 
Key pxc.gracePeriod
Value int
Example 600
Description The Kubernetes grace period when terminating a Pod
 
Key pxc.containerSecurityContext
Value subdoc
Example privileged: true
Description A custom Kubernetes Security Context for a Container to be used instead of the default one
 
Key pxc.podSecurityContext
Value subdoc
Example

fsGroup: 1001

supplementalGroups: [1001, 1002, 1003]

Description A custom Kubernetes Security Context for a Pod to be used instead of the default one

ProxySQL Section

The proxysql section in the deploy/cr.yaml file contains configuration options for the ProxySQL daemon.

Key proxysql.enabled
Value boolean
Example true
Description Enables or disables load balancing with ProxySQL Services
 
Key proxysql.size
Value int
Example 1
Description The number of the ProxySQL daemons to provide load balancing must be = 1 in current release
 
Key proxysql.image
Value string
Example percona/percona-xtradb-cluster-operator:1.3.0-proxysql
Description ProxySQL Docker image to use
 
Key proxysql.imagePullSecrets.name
Value string
Example private-registry-credentials
Description The Kubernetes imagePullSecrets for the ProxySQL image
 
Key proxysql.annotations
Value label
Example iam.amazonaws.com/role: role-arn
Description The Kubernetes annotations metadata
 
Key proxysql.labels
Value label
Example rack: rack-22
Description Labels are key-value pairs attached to objects
 
Key proxysql.servicetype
Value string
Example ClusterIP
Description Specifies the type of Kubernetes Service to be used
 
Key proxysql.resources.requests.memory
Value string
Example 1G
Description The Kubernetes memory requests for the main ProxySQL container
 
Key proxysql.resources.requests.cpu
Value string
Example 600m
Description Kubernetes CPU requests for the main ProxySQL container
 
Key proxysql.resources.limits.memory
Value string
Example 1G
Description Kubernetes memory limits for the main ProxySQL container
 
Key proxysql.resources.limits.cpu
Value string
Example 700m
Description Kubernetes CPU limits for the main ProxySQL container
 
Key proxysql.sidecarResources.requests.memory
Value string
Example 1G
Description The Kubernetes memory requests for the sidecar ProxySQL containers
 
Key proxysql.sidecarResources.requests.cpu
Value string
Example 500m
Description Kubernetes CPU requests for the sidecar ProxySQL containers
 
Key proxysql.sidecarResources.limits.memory
Value string
Example 2G
Description Kubernetes memory limits for the sidecar ProxySQL containers
 
Key proxysql.sidecarResources.limits.cpu
Value string
Example 600m
Description Kubernetes CPU limits for the sidecar ProxySQL containers
 
Key proxysql.priorityClassName
Value string
Example high-priority
Description The Kubernetes Pod Priority class for ProxySQL
 
Key proxysql.schedulerName
Value string
Example default-scheduler
Description The Kubernetes Scheduler
 
Key proxysql.nodeSelector
Value label
Example disktype: ssd
Description Kubernetes nodeSelector
 
Key proxysql.affinity.topologyKey
Value string
Example kubernetes.io/hostname
Description The Operator topology key node anti-affinity constraint
 
Key proxysql.affinity.advanced
Value subdoc
Example  
Description If available it makes a topologyKey node affinity constraint to be ignored
 
Key proxysql.tolerations
Value subdoc
Example node.alpha.kubernetes.io/unreachable
Description Kubernetes Pod tolerations
 
Key proxysql.volumeSpec.emptyDir
Value string
Example {}
Description The Kubernetes emptyDir volume The directory created on a node and accessible to the PXC Pod containers
 
Key proxysql.volumeSpec.hostPath.path
Value string
Example /data
Description Kubernetes hostPath The volume that mounts a directory from the host node’s filesystem into your Pod. The path property is required
 
Key proxysql.volumeSpec.hostPath.type
Value string
Example Directory
Description The Kubernetes hostPath. An optional property for the hostPath
 
Key proxysql.volumeSpec.persistentVolumeClaim.storageClassName
Value string
Example standard
Description Set the Kubernetes storage class to use with the PXC PersistentVolumeClaim
 
Key proxysql.volumeSpec.persistentVolumeClaim.accessModes
Value array
Example [ReadWriteOnce]
Description The Kubernetes PersistentVolumeClaim access modes for the Percona XtraDB cluster
 
Key proxysql.volumeSpec.resources.requests.storage
Value string
Example 6Gi
Description The Kubernetes PersistentVolumeClaim size for the Percona XtraDB cluster
 
Key proxysql.podDisruptionBudget.maxUnavailable
Value int
Example 1
Description The Kubernetes podDisruptionBudget specifies the number of Pods from the set unavailable after the eviction
 
Key proxysql.podDisruptionBudget.minAvailable
Value int
Example 0
Description The Kubernetes podDisruptionBudget Pods that must be available after an eviction
 
Key proxysql.gracePeriod
Value int
Example 30
Description The Kubernetes grace period when terminating a Pod

PMM Section

The pmm section in the deploy/cr.yaml file contains configuration options for Percona Monitoring and Management.

Key pmm.enabled
Value boolean
Example false
Description Enables or disables monitoring Percona XtraDB cluster with PMM
 
Key pmm.image
Value string
Example perconalab/pmm-client:1.17.1
Description PMM client Docker image to use
 
Key pmm.serverHost
Value string
Example monitoring-service
Description Address of the PMM Server to collect data from the cluster
 
Key pmm.serverUser
Value string
Example pmm
Description The PMM Serve_User. The PMM Server password should be configured using Secrets
 
Key pmm.resources.requests.memory
Value string
Example 200M
Description The Kubernetes memory requests for a PMM container
 
Key pmm.resources.requests.cpu
Value string
Example 500m
Description Kubernetes CPU requests for a PMM container

Backup Section

The backup section in the deploy/cr.yaml file contains the following configuration options for the regular Percona XtraDB Cluster backups.

Key backup.image
Value string
Example percona/percona-xtradb-cluster-operator:1.3.0-backup
Description The Percona XtraDB cluster Docker image to use for the backup
 
Key backup.imagePullSecrets.name
Value string
Example private-registry-credentials
Description The Kubernetes imagePullSecrets for the specified image
 
Key backup.storages.<storage-name>.type
Value string
Example s3
Description The cloud storage type used for backups. Only s3 and filesystem types are supported
 
Key backup.storages.<storage-name>.s3.credentialsSecret
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 backup.storages.<storage-name>.s3.bucket
Value string
Example  
Description The Amazon S3 bucket name for backups
 
Key backup.storages.s3.<storage-name>.region
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 backup.storages.s3.<storage-name>.endpointUrl
Value string
Example  
Description The endpoint URL of the S3-compatible storage to be used (not needed for the original Amazon S3 cloud)
 
Key backup.storages.<storage-name>.persistentVolumeClaim.type
Value string
Example filesystem
Description The persistent volume claim storage type
 
Key backup.storages.<storage-name>.persistentVolumeClaim.storageClassName
Value string
Example standard
Description Set the Kubernetes Storage Class to use with the PXC backups PersistentVolumeClaims for the filesystem storage type
 
Key backup.storages.<storage-name>.persistentVolumeClaim.accessModes
Value array
Example [ReadWriteOne]
Description The Kubernetes PersistentVolume access modes
 
Key backup.storages.<storage-name>.persistentVolumeClaim.storage
Value string
Example 6Gi
Description Storage size for the PersistentVolume
 
Key backup.storages.<storage-name>.annotations
Value label
Example iam.amazonaws.com/role: role-arn
Description The Kubernetes annotations
 
Key backup.storages.<storage-name>.labels
Value label
Example rack: rack-22
Description Labels are key-value pairs attached to objects
 
Key backup.storages.<storage-name>.resources.requests.memory
Value string
Example 1G
Description The Kubernetes memory requests for a PXC container
 
Key backup.storages.<storage-name>.resources.requests.cpu
Value string
Example 600m
Description Kubernetes CPU requests for a PXC container
 
Key backup.storages.<storage-name>.resources.limits.memory
Value string
Example 1G
Description Kubernetes memory limits for a PXC container
 
Key backup.storages.<storage-name>.nodeSelector
Value label
Example disktype: ssd
Description Kubernetes nodeSelector
 
Key backup.storages.<storage-name>.affinity.nodeAffinity
Value subdoc
Example  
Description The Operator node affinity constraint
 
Key backup.storages.<storage-name>.tolerations
Value subdoc
Example backupWorker
Description Kubernetes Pod tolerations
 
Key backup.storages.<storage-name>.priorityClassName
Value string
Example high-priority
Description The Kubernetes Pod priority class
 
Key backup.storages.<storage-name>.schedulerName
Value string
Example default-scheduler
Description The Kubernetes Scheduler
 
Key backup.storages.<storage-name>.containerSecurityContext
Value subdoc
Example privileged: true
Description A custom Kubernetes Security Context for a Container to be used instead of the default one
 
Key backup.storages.<storage-name>.podSecurityContext
Value subdoc
Example

fsGroup: 1001

supplementalGroups: [1001, 1002, 1003]

Description A custom Kubernetes Security Context for a Pod to be used instead of the default one
 
Key backup.schedule.name
Value string
Example sat-night-backup
Description The backup name
 
Key backup.schedule.schedule
Value string
Example 0 0 * * 6
Description Scheduled time to make a backup specified in the crontab format
 
Key backup.schedule.keep
Value int
Example 3
Description Number of stored backups
 
Key backup.schedule.storageName
Value string
Example s3-us-west
Description The name of the storage for the backups configured in the storages or fs-pvc subsection

Table Of Contents

Previous topic

Users

Next topic

Providing Backups