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:

Key Value type Default Description
upgradeOptions subdoc   Percona XtraDB Cluster upgrade options section
pxc subdoc   Percona XtraDB Cluster general section
proxysql subdoc   ProxySQL section
pmm subdoc   Percona Monitoring and Management section
backup subdoc   Percona XtraDB Cluster backups section
allowUnsafeConfigurations boolean false 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
secretsName string my-cluster-secrets A name for users secrets
vaultSecretName string keyring-secret-vault A secret for the HashiCorp Vault to carry on Data-at-Rest Encryption
sslSecretName string my-cluster-ssl A secret with TLS certificate generated for external communications, see Transport Layer Security (TLS) for details
sslInternalSecretName string my-cluster-ssl-internal A secret with TLS certificate generated for internal communications, see Transport Layer Security (TLS) for details
updateStrategy string SmartUpdate A strategy the Operator uses for upgrades

Upgrade Options Section

The upgradeOptions section in the deploy/cr.yaml file contains various configuration options to control Percona XtraDB Cluster upgrades.

Key

upgradeOptions.versionServiceEndpoint

Value string
Example https://check.percona.com/versions
Description The Version Service URL used to check versions compatibility for upgrade
 
Key

upgradeOptions.apply

Value string
Example Disabled
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 PXC (e.g. 8.0.19-10.1) 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

upgradeOptions.schedule

Value string
Example 0 2 * * *
Description Scheduled time to check for updates, specified in the crontab format

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.image

Value string
Example percona/percona-xtradb-cluster:8.0.19-10.1
Description The Docker image of the Percona cluster used (actual image names for PXC 8.0 and PXC 5.7 can be found in the list of certified images)
 
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

HAProxy Section

The haproxy section in the deploy/cr.yaml file contains configuration options for the HAProxy service.

Key

haproxy.enabled

Value boolean
Example true
Description Enables or disables load balancing with HAProxy Services
 
Key

haproxy.size

Value int
Example 3
Description The number of the HAProxy Pods to provide load balancing
 
Key

haproxy.image

Value string
Example percona/percona-xtradb-cluster-operator:1.5.0-haproxy
Description HAProxy Docker image to use
 
Key

haproxy.imagePullSecrets.name

Value string
Example private-registry-credentials
Description The Kubernetes imagePullSecrets for the HAProxy image
 
Key

haproxy.configuration

Value string
Example  
Description The custom HAProxy configuration file contents
 
Key

haproxy.annotations

Value label
Example iam.amazonaws.com/role: role-arn
Description The Kubernetes annotations metadata
 
Key

haproxy.labels

Value label
Example rack: rack-22
Description Labels are key-value pairs attached to objects
 
Key

haproxy.servicetype

Value string
Example ClusterIP
Description Specifies the type of Kubernetes Service to be used
 
Key

haproxy.resources.requests.memory

Value string
Example 1G
Description The Kubernetes memory requests for the main HAProxy container
 
Key

haproxy.resources.requests.cpu

Value string
Example 600m
Description Kubernetes CPU requests for the main HAProxy container
 
Key

haproxy.resources.limits.memory

Value string
Example 1G
Description Kubernetes memory limits for the main HAProxy container
 
Key

haproxy.resources.limits.cpu

Value string
Example 700m
Description Kubernetes CPU limits for the main HAProxy container
 
Key

haproxy.sidecarResources.requests.memory

Value string
Example 1G
Description The Kubernetes memory requests for the sidecar HAProxy containers
 
Key

haproxy.sidecarResources.requests.cpu

Value string
Example 500m
Description Kubernetes CPU requests for the sidecar HAProxy containers
 
Key

haproxy.sidecarResources.limits.memory

Value string
Example 2G
Description Kubernetes memory limits for the sidecar HAProxy containers
 
Key

haproxy.sidecarResources.limits.cpu

Value string
Example 600m
Description Kubernetes CPU limits for the sidecar HAProxy containers
 
Key

haproxy.priorityClassName

Value string
Example high-priority
Description The Kubernetes Pod Priority class for HAProxy
 
Key

haproxy.schedulerName

Value string
Example default-scheduler
Description The Kubernetes Scheduler
 
Key

haproxy.nodeSelector

Value label
Example disktype: ssd
Description Kubernetes nodeSelector
 
Key

haproxy.affinity.topologyKey

Value string
Example kubernetes.io/hostname
Description The Operator topology key node anti-affinity constraint
 
Key

haproxy.affinity.advanced

Value subdoc
Example  
Description If available it makes a topologyKey node affinity constraint to be ignored
 
Key

haproxy.tolerations

Value subdoc
Example node.alpha.kubernetes.io/unreachable
Description Kubernetes Pod tolerations
 
Key

haproxy.podDisruptionBudget.maxUnavailable

Value int
Example 1
Description The Kubernetes podDisruptionBudget specifies the number of Pods from the set unavailable after the eviction
 
Key

haproxy.podDisruptionBudget.minAvailable

Value int
Example 0
Description The Kubernetes podDisruptionBudget Pods that must be available after an eviction
 
Key

haproxy.gracePeriod

Value int
Example 30
Description The Kubernetes grace period when terminating a Pod
 
Key

haproxy.loadBalancerSourceRanges

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

haproxy.serviceAnnotations

Value string
Example service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
Description The Kubernetes annotations metadata for the load balancer Service
 
Key

haproxy.serviceAccountName

Value string
Example percona-xtradb-cluster-operator-workload
Description The Kubernetes Service Account for the HAProxy Pod

ProxySQL Section

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

Key

proxysql.enabled

Value boolean
Example false
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.5.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
 
Key

proxysql.loadBalancerSourceRanges

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

proxysql.serviceAnnotations

Value string
Example service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
Description The Kubernetes annotations metadata for the load balancer Service
 
Key

proxysql.serviceAccountName

Value string
Example percona-xtradb-cluster-operator-workload
Description The Kubernetes Service Account for the ProxySQL 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.5.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

Debug

Next topic

PXC API Documentation