The PXC Operator (Percona XtraDB Cluster) is an open source enterprise MySQL solution.
This building block will deploy a Percona XtraDB cluster with HAProxy as a load balancing frontend.
Using the supplied configuration possibilities, you can configure all settings for the cluster itself as well as manage databases and users inside the cluster.
In version 1.1.0 of this building block we changed that the volumes of the database will be retained even if
perconaxtradbclusters.pxc.percona.com resource is deleted
Add the directory
syseleven-pxc-operator to your control repository. Add a
.gitlab-ci.yml to the directory with the following content:
include: - project: syseleven/building-blocks/helmfiles/pxc-operator file: JobDevelopment.yaml ref: 3.37.0 - project: syseleven/building-blocks/helmfiles/pxc-operator file: JobStaging.yaml ref: 3.37.0 - project: syseleven/building-blocks/helmfiles/pxc-operator file: JobProduction.yaml ref: 3.37.0
Remove environments you are not using by removing their include.
The building block consists of multiple helm charts that can be configure individually.
Look at the helmfile.yaml in the
releases..values section. The configuration of each helm chart can be overriden in those files in the specified hierarchy.
There are some default values that the building block will set for the upstream helm chart.
Set the following sections in one of those files:
You have to set
backup: storages: s3: s3: credentialsAccessKey: ... credentialsSecretKey: ...
If you can't, please disable the backup schedule with
backup: schedule: 
You have to set the following variables otherwise they will be changed on every run.
secrets: passwords: root: ... xtrabackup: ... monitor: ... clustercheck: ... proxyadmin: ... pmmserver: ... operator: ...
Specify your values in the following helm values files:
The following table lists the configurable parameters for the management of the mysql-config chart and their default values.
||The cron schedule for the job that creates the users and databases||
||The MySQL server on which to manage databases and users||
||The user with which users and databases are created||
||The password for
||The key in
||The databases to manage. See configuration for details||
||The users to manage. See configuration for details||
Default parameters like e.g. the
tolerations are available, too. See the values.yaml file for those parameters.
The user and database creation is done with ansible, so you can specify any parameters that the ansible modules support. See
databases: - name: forms state: present - name: web encoding: utf8mb4 state: present users: - name: 'web' host: '%' # We recommend using already hashed passwords. Please check the notes in the ansible module for the supported hash modules password: '*94BDCEBE19083CINVALIDEFD02F964C7AF3CFC29' priv: 'web.*:ALL' state: present - name: 'old_user' host: '%' password: '*94BDCEBE19083CINVALIDEFD02F964CFOOO21319' priv: 'web.*:ALL' state: absent
This Building Blocks ships a cronjob that deletes s3 backup files older than a certain age (default
By default, PXC-operator does not cleanup backup files stored in s3 (see).
This might lead to saturation of your S3 quota and other applications using this quota might break.
You can disable this cronjob by setting
pxc-db-*.yaml. See pxc-operator-extension/values.yaml for further configuration options and default values.
You have to deploy a local storage class provisioner or change
pxc.persistence.storageClass. A possible local storage class provisoner is local-path-provisioner.
See how to use pxc-operator with local storage for more information
Please check if this bucket already exists. Object storage buckets need to be unique within a region.
This building block consists of multiple components. Each of the components can and must be scaled individually.
Please find more infos on release notes and new features Release notes PXC Operator