Skip to content

Custom Resource options reference

Percona Operator for MySQL uses Custom Resources to manage options for the various components of the cluster.

  • PerconaServerMySQL Custom Resource with options for the cluster,
  • PerconaServerMySQLBackup and PerconaServerMySQLRestore Custom Resources contain options for Percona XtraBackup used to backup Percona XtraDB Cluster and to restore it from backups.

PerconaServerMySQL Custom Resource options

Percona Server for MySQL managed by the Operator is configured via the spec section of the deploy/cr.yaml file.

The metadata part of this file contains the following keys:

  • name (cluster1 by default) sets the name of your Percona Server for MySQL cluster; it should include only URL-compatible characters , not exceed 22 characters, start with an alphabetic character, and end with an alphanumeric character;
  • finalizers.delete-mysql-pods-in-order if present, activates the Finalizer which controls the proper Pods deletion order in case of the cluster deletion event (on by default).

  • finalizers.delete-mysql-pods-in-order if present, activates the Finalizer which controls the proper Pods deletion order in case of the cluster deletion event (on by default).

The spec part of the deploy/cr.yaml file contains the following sections:

Key Value type Default Description
mysql subdoc Percona Server for MySQL general section
proxy.haproxy subdoc HAProxy subsection
proxy.router subdoc MySQL Router subsection
orchestrator subdoc Orchestrator section
pmm subdoc Percona Monitoring and Management section
initImage string perconalab/percona-server-mysql-operator:0.7.0 An alternative init image for the Operator
secretsName string cluster1-secrets A name for users secrets
sslSecretName string cluster1-ssl A secret with TLS certificate generated for external communications, see Transport Layer Security (TLS) for details
ignoreAnnotations subdoc service.beta.kubernetes.io/aws-load-balancer-backend-protocol The list of annotations to be ignored by the Operator
ignoreLabels subdoc rack The list of labels to be ignored by the Operator
updateStrategy string SmartUpdate A strategy the Operator uses for upgrades
upgradeOptions subdoc Options to control Percona Server for MySQL version choice at the deployment time and during upgrades
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
allowUnsafeConfigurations boolean false Prevents users from configuring a cluster with unsafe parameters such as starting a group replication cluster with less than 3, more than 9, or an even number of Percona Server for MySQL instances (if false, unsafe parameters will be automatically changed to safe defaults)

Extended cert-manager configuration section

The tls section in the deploy/cr.yaml file contains various configuration options for additional customization of the TLS cert-manager.

Key tls.SANs
Value subdoc
Example
Description Additional domains (SAN) to be added to the TLS certificate within the extended cert-manager configuration
Key tls.issuerConf.name
Value string
Example special-selfsigned-issuer
Description A cert-manager issuer name
Key tls.issuerConf.kind
Value string
Example ClusterIssuer
Description A cert-manager issuer type
Key tls.issuerConf.group
Value string
Example cert-manager.io
Description A cert-manager issuer group . Should be cert-manager.io for built-in cert-manager certificate issuers

Upgrade options section

The upgradeOptions section in the deploy/cr.yaml file contains various configuration options to control Percona Server for MySQL version choice at the deployment time and during upgrades.

Key upgradeOptions.versionServiceEndpoint
Value string
Example https://check.percona.com
Description The Version Service URL used to check versions compatibility for upgrade
Key upgradeOptions.apply
Value string
Example Disabled
Description Specifies how images are picked up from the version service on initial start by the Operator. Never or Disabled will completely disable quering version service for images, otherwise it can be set to Latest or Recommended or to a specific version string of Percona Server for MySQL (e.g. 8.0.32-24) that is wished to be version-locked (so that the user can control the version running)

Percona Server for MySQL section

The mysql section in the deploy/cr.yaml file contains general configuration options for the Percona Server for MySQL.

Key mysql.clusterType
Value int
Example group-replication
Description The cluster type: async for Asynchronous replication , group-replication for Group Replication
Key mysql.autoRecovery
Value boolean
Example true
Description Enables or disables the Operator from attempting to fix the issue in the event of a full cluster crash
Key mysql.size
Value int
Example 3
Description The number of the Percona Server for MySQL instances
Key mysql.image
Value string
Example percona/percona-server:8.0.36-28
Description The Docker image of the Percona Server for MySQL used (actual image names for Percona Server for MySQL 8.0 and Percona Server for MySQL 5.7 can be found in the list of certified images)
Key mysql.imagePullSecrets.name
Value string
Example private-registry-credentials
Description The Kubernetes ImagePullSecret
Key mysql.initImage
Value string
Example perconalab/percona-server-mysql-operator:0.7.0
Description An alternative init image for MySQL Pods
Key mysql.primaryServiceType
Value string
Example LoadBalancer
Description Specifies the type of Kubernetes Service to be used for Primary instance if the asyncronous replication is turned on
Key mysql.replicasServiceType
Value string
Example ClusterIP
Description Specifies the type of Kubernetes Service to be used for Replica instances if the asyncronous replication is turned on
Key mysql.resources.requests.memory
Value string
Example 512M
Description The Kubernetes memory requests for a Percona Server for MySQL container
Key mysql.resources.limits.memory
Value string
Example 1G
Description Kubernetes memory limits for a Percona Server for MySQL container
Key mysql.affinity.antiAffinityTopologyKey
Value string
Example kubernetes.io/hostname
Description The Operator topology key node anti-affinity constraint
Key mysql.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 mysql.topologySpreadConstraints.labelSelector.matchLabels
Value label
Example app.kubernetes.io/name: percona-server
Description The Label selector for the Kubernetes Pod Topology Spread Constraints
Key mysql.topologySpreadConstraints.maxSkew
Value int
Example 1
Description The degree to which Pods may be unevenly distributed under the Kubernetes Pod Topology Spread Constraints
Key mysql.topologySpreadConstraints.topologyKey
Value string
Example kubernetes.io/hostname
Description The key of node labels for the Kubernetes Pod Topology Spread Constraints
Key mysql.topologySpreadConstraints.whenUnsatisfiable
Value string
Example DoNotSchedule
Description What to do with a Pod if it doesn’t satisfy the Kubernetes Pod Topology Spread Constraints
Key mysql.expose.enabled
Value boolean
Example false
Description Enable or disable exposing Percona Server for MySQL nodes with dedicated IP addresses
Key mysql.expose.type
Value string
Example ClusterIP
Description The Kubernetes Service Type used for exposure
Key mysql.expose.annotations
Value string
Example service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
Description The Kubernetes annotations
Key mysql.expose.externalTrafficPolicy
Value string
Example Cluster
Description Specifies whether Service should route external traffic to cluster-wide (Cluster) or node-local (Local) endpoints; it can influence the load balancing effectiveness
Key mysql.expose.internalTrafficPolicy
Value string
Example Cluster
Description Specifies whether Service should route internal traffic to cluster-wide (Cluster) or node-local (Local) endpoints; it can influence the load balancing effectiveness
Key mysql.expose.labels
Value label
Example rack: rack-22
Description Labels are key-value pairs attached to objects
Key mysql.expose.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 mysql.volumeSpec.persistentVolumeClaim.resources.requests.storage
Value string
Example 2Gi
Description The Kubernetes PersistentVolumeClaim size for the Percona Server for MySQL
Key mysql.configuration
Value string
Example
|
[mysqld]
max_connections=250
Description The my.cnf file options to be passed to Percona Server for MySQL instances
Key mysql.sidecars.image
Value string
Example busybox
Description Image for the custom sidecar container for Percona Server for MySQL Pods
Key mysql.sidecars.command
Value array
Example ["sleep", "30d"]
Description Command for the custom sidecar container for Percona Server for MySQL Pods
Key mysql.sidecars.name
Value string
Example my-sidecar-1
Description Name of the custom sidecar container for Percona Server for MySQL Pods
Key mysql.sidecars.volumeMounts.mountPath
Value string
Example /volume1
Description Mount path of the custom sidecar container volume for Replica Set Pods
Key mysql.sidecars.resources.requests.memory
Value string
Example 16M
Description The Kubernetes memory requests for a Percona Server for MySQL sidecar container
Key mysql.sidecars.volumeMounts.name
Value string
Example sidecar-volume-claim
Description Name of the custom sidecar container volume for Replica Set Pods
Key mysql.sidecarVolumes
Value subdoc
Example
Description Volume specification for the custom sidecar container volume for Percona Server for MySQL Pods
Key mysql.sidecarPVCs
Value subdoc
Example
Description Persistent Volume Claim for the custom sidecar container volume for Replica Set Pods

HAProxy subsection

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

Key proxy.haproxy.enabled
Value boolean
Example true
Description Enables or disables load balancing with HAProxy Services
Key proxy.haproxy.size
Value int
Example 3
Description The number of the HAProxy Pods to provide load balancing. Safe configuration should have 2 or more
Key proxy.haproxy.image
Value string
Example percona/perconalab-xtradb-cluster-operator:0.7.0-haproxy
Description HAProxy Docker image to use
Key proxy.haproxy.imagePullPolicy
Value string
Example Always
Description The policy used to update images
Key proxy.haproxy.resources.requests.memory
Value string
Example 1G
Description The Kubernetes memory requests for the main HAProxy container
Key proxy.haproxy.resources.requests.cpu
Value string
Example 600m
Description Kubernetes CPU requests for the main HAProxy container
Key proxy.haproxy.resources.limits.memory
Value string
Example 1G
Description Kubernetes memory limits for the main HAProxy container
Key proxy.haproxy.resources.limits.cpu
Value string
Example 700m
Description Kubernetes CPU limits for the main HAProxy container
Key proxy.haproxy.env.name
Value string
Example HA_CONNECTION_TIMEOUT
Description Name of an environment variable for HAProxy
Key proxy.haproxy.env.value
Value string
Example "1000"
Description Value of an environment variable for HAProxy
Key proxy.haproxy.envFrom.secretRef.name
Value string
Example haproxy-env-secret
Description Name of a Secret with environment variables for HAProxy
Key proxy.haproxy.readinessProbes.timeoutSeconds
Value int
Example 3
Description Number of seconds after which the readiness probe times out
Key proxy.haproxy.readinessProbes.periodSeconds
Value int
Example 5
Description How often (in seconds) to perform the readiness probe
Key proxy.haproxy.readinessProbes.successThreshold
Value int
Example 3
Description Minimum consecutive successes for the readiness probe to be considered successful after having failed
Key proxy.haproxy.readinessProbes.failureThreshold
Value int
Example 1
Description When the readiness probe fails, Kubernetes will try this number of times before marking the Pod Unready
Key proxy.haproxy.livenessProbes.timeoutSeconds
Value int
Example 3
Description Number of seconds after which the liveness probe times out
Key proxy.haproxy.livenessProbes.periodSeconds
Value int
Example 5
Description How often (in seconds) to perform the liveness probe
Key proxy.haproxy.livenessProbes.successThreshold
Value int
Example 3
Description Minimum consecutive successes for the liveness probe to be considered successful after having failed
Key proxy.haproxy.readinessProbes.failureThreshold
Value int
Example 1
Description When the liveness probe fails, Kubernetes will try this number of times before marking the Pod Unready
Key proxy.haproxy.configuration
Value string
Example
Description The custom HAProxy configuration file contents
Key proxy.haproxy.antiAffinityTopologyKey
Value string
Example kubernetes.io/hostname
Description The Operator topology key node anti-affinity constraint
Key proxy.haproxy.affinity.advanced
Value subdoc
Example
Description If available it makes a topologyKey node affinity constraint to be ignored
Key proxy.haproxy.topologySpreadConstraints.labelSelector.matchLabels
Value label
Example app.kubernetes.io/name: percona-server
Description The Label selector for the Kubernetes Pod Topology Spread Constraints
Key proxy.haproxy.topologySpreadConstraints.maxSkew
Value int
Example 1
Description The degree to which Pods may be unevenly distributed under the Kubernetes Pod Topology Spread Constraints
Key proxy.haproxy.topologySpreadConstraints.topologyKey
Value string
Example kubernetes.io/hostname
Description The key of node labels for the Kubernetes Pod Topology Spread Constraints
Key proxy.haproxy.topologySpreadConstraints.whenUnsatisfiable
Value string
Example DoNotSchedule
Description What to do with a Pod if it doesn’t satisfy the Kubernetes Pod Topology Spread Constraints
Key proxy.haproxy.expose.type
Value string
Example ClusterIP
Description The Kubernetes Service Type used for HAProxy exposure
Key proxy.haproxy.expose.annotations
Value string
Example service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
Description The Kubernetes annotations for HAProxy
Key proxy.haproxy.expose.externalTrafficPolicy
Value string
Example Cluster
Description Specifies whether Service for HAProxy should route external traffic to cluster-wide (Cluster) or node-local (Local) endpoints; it can influence the load balancing effectiveness
Key proxy.haproxy.expose.internalTrafficPolicy
Value string
Example Cluster
Description Specifies whether Service for HAProxy should route internal traffic to cluster-wide (Cluster) or node-local (Local) endpoints; it can influence the load balancing effectiveness
Key proxy.haproxy.expose.labels
Value label
Example rack: rack-22
Description Labels are key-value pairs attached to objects for HAProxy
Key proxy.haproxy.expose.loadBalancerIP
Value string
Example 127.0.0.1
Description The static IP-address for the load balancer
Key proxy.haproxy.expose.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)

Router subsection

The proxy.router subsection in the deploy/cr.yaml file contains configuration options for the MySQL Router , which can act as a proxy for Group replication.

Key proxy.router.enabled
Value boolean
Example false
Description Enables or disables MySQL Router
Key proxy.router.size
Value int
Example 3
Description The number of the Router Pods to provide routing to MySQL Servers
Key proxy.router.image
Value string
Example perconalab/percona-server-mysql-operator:0.7.0-router
Description Router Docker image to use
Key proxy.router.imagePullPolicy
Value string
Example Always
Description The policy used to update images
Key proxy.router.initImage
Value string
Example perconalab/percona-server-mysql-operator:0.7.0
Description An alternative init image for MySQL Router Pods
Key proxy.router.resources.requests.memory
Value string
Example 256M
Description The Kubernetes memory requests for MySQL Router container
Key proxy.router.resources.limits.memory
Value string
Example 256M
Description Kubernetes memory limits for MySQL Router container
Key proxy.router.affinity.antiAffinityTopologyKey
Value string
Example kubernetes.io/hostname
Description The Operator topology key node anti-affinity constraint
Key proxy.router.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 proxy.router.topologySpreadConstraints.labelSelector.matchLabels
Value label
Example app.kubernetes.io/name: percona-server
Description The Label selector for the Kubernetes Pod Topology Spread Constraints
Key proxy.router.topologySpreadConstraints.maxSkew
Value int
Example 1
Description The degree to which Pods may be unevenly distributed under the Kubernetes Pod Topology Spread Constraints
Key proxy.router.topologySpreadConstraints.topologyKey
Value string
Example kubernetes.io/hostname
Description The key of node labels for the Kubernetes Pod Topology Spread Constraints
Key proxy.router.topologySpreadConstraints.whenUnsatisfiable
Value string
Example DoNotSchedule
Description What to do with a Pod if it doesn’t satisfy the Kubernetes Pod Topology Spread Constraints
Key proxy.router.configuration
Value string
Example
|
[default]
logging_folder=/tmp/router/log
[logger]
level=DEBUG
Description Custom configuration options to be passed to MySQL Router
Key proxy.router.expose.type
Value string
Example ClusterIP
Description The Kubernetes Service Type used for MySQL Router instances exposure
Key proxy.router.expose.annotations
Value string
Example service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
Description The Kubernetes annotations for MySQL Router
Key proxy.router.expose.externalTrafficPolicy
Value string
Example Cluster
Description Specifies whether Service for MySQL Router should route external traffic to cluster-wide (Cluster) or node-local (Local) endpoints; it can influence the load balancing effectiveness
Key proxy.router.expose.internalTrafficPolicy
Value string
Example Cluster
Description Specifies whether Service for MySQL Router should route internal traffic to cluster-wide (Cluster) or node-local (Local) endpoints; it can influence the load balancing effectiveness
Key proxy.router.expose.labels
Value label
Example rack: rack-22
Description Labels are key-value pairs attached to objects for MySQL Router
Key proxy.router.expose.loadBalancerIP
Value string
Example 127.0.0.1
Description The static IP-address for the load balancer
Key proxy.router.expose.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)

Orchestrator section

The orchestrator section in the deploy/cr.yaml file contains configuration options for the Orchestrator - a replication topology manager, used if asynchronous replication is turned on.

Key orchestrator.enabled
Value boolean
Example true
Description Enables or disables the Orchestrator
Key orchestrator.size
Value int
Example 3
Description The number of the Orchestrator Pods to provide load balancing
Key orchestrator.image
Value string
Example perconalab/percona-server-mysql-operator:0.7.0-orchestrator
Description Orchestrator Docker image to use
Key orchestrator.imagePullPolicy
Value string
Example Always
Description The policy used to update images
Key orchestrator.serviceAccountName
Value string
Example ercona-server-mysql-operator-orchestrator
Description The Kubernetes Service Account for the Orchestrator Pods
Key orchestrator.initImage
Value string
Example perconalab/percona-server-mysql-operator:0.7.0
Description An alternative init image for Orchestrator Pods
Key orchestrator.affinity.antiAffinityTopologyKey
Value string
Example kubernetes.io/hostname
Description The Operator topology key node anti-affinity constraint
Key orchestrator.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 orchestrator.topologySpreadConstraints.labelSelector.matchLabels
Value label
Example app.kubernetes.io/name: percona-server
Description The Label selector for the Kubernetes Pod Topology Spread Constraints
Key orchestrator.topologySpreadConstraints.maxSkew
Value int
Example 1
Description The degree to which Pods may be unevenly distributed under the Kubernetes Pod Topology Spread Constraints
Key orchestrator.topologySpreadConstraints.topologyKey
Value string
Example kubernetes.io/hostname
Description The key of node labels for the Kubernetes Pod Topology Spread Constraints
Key orchestrator.topologySpreadConstraints.whenUnsatisfiable
Value string
Example DoNotSchedule
Description What to do with a Pod if it doesn’t satisfy the Kubernetes Pod Topology Spread Constraints
Key orchestrator.expose.type
Value string
Example ClusterIP
Description The Kubernetes Service Type used for Orchestrator instances exposure
Key orchestrator.expose.annotations
Value string
Example service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
Description The Kubernetes annotations for the Orchestrator
Key orchestrator.expose.externalTrafficPolicy
Value string
Example Cluster
Description Specifies whether Service for the Orchestrator should route external traffic to cluster-wide (Cluster) or node-local (Local) endpoints; it can influence the load balancing effectiveness
Key orchestrator.expose.internalTrafficPolicy
Value string
Example Cluster
Description Specifies whether Service for the Orchestrator should route internal traffic to cluster-wide (Cluster) or node-local (Local) endpoints; it can influence the load balancing effectiveness
Key orchestrator.expose.labels
Value label
Example rack: rack-22
Description Labels are key-value pairs attached to objects for the Orchestrator
Key orchestrator.expose.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 orchestrator.resources.requests.memory
Value string
Example 128M
Description The Kubernetes memory requests for an Orchestrator container
Key orchestrator.resources.limits.memory
Value string
Example 256M
Description Kubernetes memory limits for an Orchestrator container
Key orchestrator.volumeSpec.persistentVolumeClaim.resources.requests.storage
Value string
Example 1Gi
Description The Kubernetes PersistentVolumeClaim size for the Orchestrator

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 Server for MySQL with PMM
Key pmm.image
Value string
Example percona/pmm-client:2.41.1
Description PMM client Docker image to use
Key pmm.imagePullPolicy
Value string
Example Always
Description The policy used to update images
Key pmm.resources.requests.memory
Value string
Example 150M
Description The Kubernetes memory requests for a PMM container
Key pmm.resources.requests.cpu
Value string
Example 300m
Description Kubernetes CPU requests for a PMM container
Key pmm.resources.limits.memory
Value string
Example 256M
Description Kubernetes memory limits for a PMM container
Key pmm.resources.limits.cpu
Value string
Example 400m
Description Kubernetes CPU limits for a PMM container
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 admin
Description The PMM Serve_User. The PMM Server password should be configured using 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 backup.enabled
Value boolean
Example true
Description Enables or disables making backups
Key backup.image
Value string
Example percona/percona-server-mysql-operator:0.7.0-backup
Description The Percona XtraBackup Docker image to use for the backup
Key backup.imagePullPolicy
Value string
Example Always
Description The policy used to update images
Key backup.initImage
Value string
Example perconalab/percona-server-mysql-operator:0.7.0
Description An alternative init image for Percona XtraBackup Pods
Key backup.backoffLimit
Value int
Example 6
Description The number of retries to make a backup (by default, 6 retries are made)
Key backup.storages.<storage-name>.type
Value string
Example s3
Description The cloud storage type used for backups. Only s3 and azure types are supported
Key backup.storages.<storage-name>.verifyTLS
Value boolean
Example true
Description 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
Key backup.storages.<storage-name>.nodeSelector
Value label
Example disktype: ssd
Description Kubernetes nodeSelector
Key backup.storages.<storage-name>.resources.requests.memory
Value string
Example 1G
Description The Kubernetes memory requests for a Percona XtraBackup container
Key backup.storages.<storage-name>.resources.requests.cpu
Value string
Example 600m
Description Kubernetes CPU requests for a Percona XtraBackup container
Key backup.storages.<storage-name>.affinity.nodeAffinity
Value subdoc
Example
Description The Operator node affinity constraint
Key backup.storages.<storage-name>.topologySpreadConstraints.labelSelector.matchLabels
Value label
Example app.kubernetes.io/name: percona-server
Description The Label selector for the Kubernetes Pod Topology Spread Constraints
Key backup.storages.<storage-name>.topologySpreadConstraints.maxSkew
Value int
Example 1
Description The degree to which Pods may be unevenly distributed under the Kubernetes Pod Topology Spread Constraints
Key backup.storages.<storage-name>.topologySpreadConstraints.topologyKey
Value string
Example kubernetes.io/hostname
Description The key of node labels for the Kubernetes Pod Topology Spread Constraints
Key backup.storages.<storage-name>.topologySpreadConstraints.whenUnsatisfiable
Value string
Example DoNotSchedule
Description What to do with a Pod if it doesn’t satisfy the Kubernetes Pod Topology Spread Constraints
Key backup.storages.<storage-name>.tolerations
Value subdoc
Example
Description Kubernetes Pod tolerations
Key backup.storages.<storage-name>.schedulerName
Value string
Example mycustom-scheduler
Description The Kubernetes Scheduler
Key backup.storages.<storage-name>.priorityClassName
Value string
Example high-priority
Description The Kubernetes Pod priority class
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.storages.<storage-name>.annotations
Value label
Example testName: scheduled-backup
Description The Kubernetes annotations
Key backup.storages.<storage-name>.labels
Value label
Example backupWorker: 'True'
Description Labels are key-value pairs attached to objects
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-west-2
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>.prefix
Value string
Example ""
Description The path (sub-folder) to the backups inside the bucket
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.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)

Percona Toolkit section

The toolkit section in the deploy/cr.yaml file contains configuration options for Percona Toolkit .

Key toolkit.image
Value string
Example percona/pmm-client:2.41.1
Description Percona Toolkit client Docker image to use
Key toolkit.imagePullPolicy
Value string
Example Always
Description The policy used to update images
Key toolkit.resources.requests.memory
Value string
Example 150M
Description The Kubernetes memory requests for a Percona Toolkit container
Key toolkit.resources.requests.cpu
Value string
Example 100m
Description Kubernetes CPU requests for a Percona Toolkit container
Key toolkit.resources.limits.memory
Value string
Example 256M
Description Kubernetes memory limits for a Percona Toolkit container
Key toolkit.resources.limits.cpu
Value string
Example 400m
Description Kubernetes CPU limits for a Percona Toolkit container

PerconaServerMySQLRestore Custom Resource options

Percona Server for MySQL Restore options are managed by the Operator via the PerconaServerMySQLRestore Custom Resource and can be configured via the deploy/backup/restore.yaml configuration file. This Custom Resource contains the following options:

Key Value type Description Required
metadata.name string The name of the restore true
spec.clusterName string MySQL Cluster name (the name of your running cluster) true
spec.backupName string The name of the backup which should be restored false
spec.backupSource subdoc Defines configuration for different restore sources false

backupSource section

Key Value type Description Required
destination string Path to the backup false
storageName string The storage name from CR spec.backup.storages false
s3 subdoc Define configuration for s3 compatible storages false
azure subdoc Define configuration for azure blob storage false

backupSource.s3 subsection

Key Value type Description Required
bucket string The bucket with a backup true
credentialsSecret string The Secret name for the backup true
endpointUrl string A valid endpoint URL false
region string The region corresponding to the S3 bucket false

backupSource.azure subsection

Key Value type Description Required
credentialsSecret string The Secret name for the azure blob storage true
container string The container name of the azure blob storage true
endpointUrl string A valid endpoint URL false
storageClass string The storage class name of the azure storage false

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services. Join K8S Squad to benefit from early access to features and “ask me anything” sessions with the Experts.


Last update: 2024-05-02