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 Description
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

PXC Section

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

Key Value Type Example Description
size int 3 The size of the Percona XtraDB Cluster, must be >= 3 for High-Availability
image string perconalab/pxc-openshift:0.1.0 Percona XtraDB Cluster docker image to use
configuration string |
[mysqld]
wsrep_debug=ON
[sst]
wsrep_debug=ON
The my.cnf file options which are to be passed to Percona XtraDB Cluster nodes
resources.requests.memory string 1G Kubernetes Memory requests for a PXC container
resources.requests.cpu string 600m Kubernetes CPU requests for a PXC container
resources.limits.memory string 1G Kubernetes Memory limit for a PXC container
resources.limits.cpu string 1 Kubernetes CPU limit for a PXC container
volumeSpec.emptyDir string {} Kubernetes emptyDir volume, i.e. the directory which will be created on a node, and will be accessible to the PXC Pod containers
volumeSpec.hostPath.path string /data Kubernetes hostPath volume, i.e. the file or directory of a node that will be accessible to the PXC Pod containers
volumeSpec.hostPath.type string Directory The Kubernetes hostPath volume type
volumeSpec.persistentVolumeClaim.storageClassName string standard Set the Kubernetes Storage Class to use with the PXC Persistent Volume Claim
volumeSpec.persistentVolumeClaim.accessModes array [ "ReadWriteOnce" ] Kubernetes Persistent Volume access modes for the PerconaXtraDB Cluster
volumeSpec.resources.requests.storage string 6Gi The Kubernetes Persistent Volume size for the Percona XtraDB Cluster
affinity.topologyKey string kubernetes.io/hostname The Operator topologyKey node anti-affinity constraint
affinity.advanced subdoc   If available, it makes topologyKey node affinity constraint to be ignored
nodeSelector label disktype: ssd The Kubernetes nodeSelector constraint
tolerations subdoc node.alpha.kubernetes.io/unreachable The [Kubernetes Pod tolerations] (https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts)
priorityClassName string high-priority The Kuberentes Pod priority class
annotations label iam.amazonaws.com/role: role-arn The Kubernetes annotations metadata
imagePullSecrets.name string private-registry-credentials Kubernetes imagePullSecret for the Percona XtraDB Cluster docker image
labels label rack: rack-22 The Kubernetes affinity labels

ProxySQL Section

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

Key Value Type Example Description
enabled boolean true Enables or disables load balancing with ProxySQL Service
size int 1 The number of the ProxySQL daemons to provide load balancing, must be = 1 in current release
image string perconalab/proxysql-openshift:0.1.0 ProxySQL docker image to use
resources.requests.memory string 1G Kubernetes Memory requests for a ProxySQL container
resources.requests.cpu string 600m Kubernetes CPU requests for a ProxySQL container
resources.limits.memory string 1G Kubernetes Memory limit for a ProxySQL container
resources.limits.cpu string 700m Kubernetes CPU limit for a ProxySQL container
volumeSpec.emptyDir string {} Kubernetes emptyDir volume, i.e. the directory which will be created on a node, and will be accessible to the ProxySQL Pod containers
volumeSpec.hostPath.path string /data Kubernetes hostPath volume, i.e. the file or directory of a node that will be accessible to the ProxySQL Pod containers
volumeSpec.hostPath.type string Directory The Kubernetes hostPath volume type
volumeSpec.persistentVolumeClaim.storageClassName string standard The Kubernetes Storage Class to use with the ProxySQL Persistent Volume Claim
volumeSpec.persistentVolumeClaim.accessModes array [ "ReadWriteOnce" ] Kubernetes Persistent Volume access modes for ProxySQL
volumeSpec.resources.requests.storage string 2Gi The Kubernetes Persistent Volume size for ProxySQL
affinity.topologyKey string failure-domain.beta.kubernetes.io/zone The Operator topologyKey node anti-affinity constraint
affinity.advanced subdoc   If available, it makes topologyKey node affinity constraint to be ignored
nodeSelector label disktype: ssd The Kubernetes nodeSelector affinity constraint
tolerations subdoc node.alpha.kubernetes.io/unreachable The [Kubernetes Pod tolerations] (https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts)
priorityClassName string high-priority The Kuberentes Pod priority class for ProxySQL
annotations label iam.amazonaws.com/role: role-arn The Kubernetes annotations metadata
imagePullSecrets.name string private-registry-credentials Kubernetes imagePullSecret for the ProxySQL docker image
labels label rack: rack-22 The Kubernetes affinity labels

PMM Section

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

Key Value Type Example Description
enabled boolean false Enables or disables monitoring Percona XtraDB Cluster with PMM
image string perconalab/pmm-client PMM Client docker image to use
serverHost string monitoring-service Address of the PMM Server to collect data from the Cluster
serverUser string pmm The PMM Server user. The PMM Server Password should be configured via secrets.

backup section

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

Key Value Type Example Description
image string perconalab/backupjob-openshift:0.2.0 Percona XtraDB Cluster docker image to use for the backup functionality
imagePullSecrets.name string private-registry-credentials Kubernetes imagePullSecret for the specified docker image
storages.type string s3 Type of the cloud storage to be used for backups. Currently only s3 and filesystem types are supported
storages.s3.credentialsSecret string my-cluster-name-backup-s3 Kubernetes secret for backups. It should contain AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY keys.
storages.s3.bucket string   The Amazon S3 bucket name for backups
storages.s3.region string us-east-1 The AWS region to use. Please note this option is mandatory not only for Amazon S3, but for all S3-compatible storages.
storages.s3.endpointUrl string   The endpoint URL of the S3-compatible storage to be used (not needed for the original Amazon S3 cloud)
storages.persistentVolumeClaim.storageClassName string standard Set the Kubernetes Storage Class to use with the PXC backups Persistent Volume Claim for the filesystem storage type
storages.persistentVolumeClaim.accessModes array [“ReadWriteOnce”] The Kubernetes Persistent Volume access modes
schedule.name string sat-night-backup The backup name
schedule.schedule string 0 0 * * 6 Scheduled time to make a backup, specified in the crontab format
schedule.storageName string st-us-west Name of the storage for backups, configured in the storages or fs-pvc subsection
schedule.keep int 3 Number of backups to store