pxc-db

by Percona

Helm chartv1.20.0App 1.20.0

A Helm chart for installing Percona XtraDB Cluster Databases using the PXC Operator.

About this chart

Percona XtraDB Cluster

Percona XtraDB Cluster (PXC) is a database clustering solution for MySQL. This chart deploys Percona XtraDB Cluster on Kubernetes controlled by Percona Operator for MySQL.

Useful links

Pre-requisites

Chart Details

This chart will deploy Percona XtraDB Cluster in Kubernetes. It will create a Custom Resource, and the Operator will trigger the creation of corresponding Kubernetes primitives: StatefulSets, Pods, Secrets, etc.

Installing the Chart

To install the chart with the pxc release name using a dedicated namespace (recommended):

helm repo add percona https://percona.github.io/percona-helm-charts/
helm install my-db percona/pxc-db --version 1.20.0 --namespace my-namespace

The chart can be customized using the following configurable parameters:

ParameterDescriptionDefault
crVersionVersion of the Operator the Custom Resource belongs to1.20.0
ignoreAnnotationsOperator will not remove following annotations[]
ignoreLabelsOperator will not remove following labels[]
pauseStop PXC Database safelyfalse
enableVolumeExpansionDeprecated. Use storageScaling.enableVolumeScaling instead. Allows to resize PersistentVolumeClaims by changing .pxc.persistence.size field.false
storageScaling.enableVolumeScalingEnable volume resizingfalse
storageScaling.enableExternalAutoscalingEnable external volume autoscalingfalse
storageScaling.autoscaling.enabledEnable volume autoscalingfalse
storageScaling.autoscaling.triggerThresholdPercentPercentage of disk usage that triggers automatic storage expansion80
storageScaling.autoscaling.growthStepAmount to add to storage when the threshold is exceeded2Gi
storageScaling.autoscaling.maxSizeMaximum size for PVCs. If set, autoscaling will not increase storage beyond this limit``
unsafeFlags.tlsAllows users to configure a cluster without TLS/SSL certificatesfalse
unsafeFlags.pxcSizeAllows users to configure a cluster with less than 3 Percona XtraDB Cluster instancesfalse
unsafeFlags.proxySizeAllows users to configure a cluster with less than 2 ProxySQL or HAProxy Podsfalse
unsafeFlags.backupIfUnhealthyAllows running a backup even if the cluster status is not readyfalse
enableCRValidationWebhookEnables or disables schema validation before applying custom resourcefalse
initContainer.imageAn alternative image for the initial Operator installation""
initContainer.containerSecurityContextA custom Kubernetes Security Context for a Container to be used instead of the default{}
initContainer.resources.requestsInit container resource requests{}
initContainer.resources.limitsInit container resource limits{}
updateStrategyRegulates the way how PXC Cluster Pods will be updated after setting a new imageSmartUpdate
upgradeOptions.versionServiceEndpointEndpoint for actual PXC Versions providerhttps://check.percona.com
upgradeOptions.applyPXC image to apply from version service - recommended, latest, actual version like 8.0.19-10.1disabled
upgradeOptions.scheduleCron formatted time to execute the update"0 4 * * *"
finalizers:percona.com/delete-pxc-pods-in-orderSet this if you want to delete PXC pods in order on cluster deletion[]
finalizers:percona.com/delete-proxysql-pvcSet this if you want to delete proxysql persistent volumes on cluster deletion[]
finalizers:percona.com/delete-pxc-pvcSet this if you want to delete database persistent volumes on cluster deletion[]
finalizers:percona.com/delete-sslDeletes objects created for SSL (Secret, certificate, and issuer) after the cluster deletion[]
annotationsPerconaXtraDBCluster custom resource annotations{}
tls.enabledEnable PXC Pod communication with TLStrue
tls.certValidityDurationDefines how long certificates will remain valid from the moment it is issued by cert-manager""
tls.caValidityDurationDefines how long certificate authority will remain valid from the moment it is issued by cert-manager""
tls.SANsAdditional domains (SAN) to be added to the TLS certificate within the extended cert-manager configuration[]
tls.issuerConf.nameA cert-manager issuer name""
tls.issuerConf.kindA cert-manager issuer type""
tls.issuerConf.groupA cert-manager issuer group""
pxc.sizePXC Cluster target member (pod) quantity. Can't even if unsafeFlags.pxcSize is true3
pxc.clusterSecretNameSpecify if you want to use custom or Operator generated users secret (if the one specified doesn't exist)``
pxc.image.repositoryPXC Container image repositorypercona/percona-xtradb-cluster
pxc.image.tagPXC Container image tag8.4.8-8.1
pxc.imagePullPolicyThe policy used to update images``
pxc.autoRecoveryEnable full cluster crash auto recoverytrue
pxc.expose.enabledEnable or disable exposing Percona XtraDB Cluster nodes with dedicated IP addressestrue
pxc.expose.typeThe Kubernetes Service Type used for exposureLoadBalancer
pxc.expose.loadBalancerClassWhen pxc.expose.type set to LoadBalancer, the pxc.expose.loadBalancerClass field enables you to use a load balancer implementation other than the cloud provider default``
pxc.expose.externalTrafficPolicySpecifies whether Service for Percona XtraDB Cluster should [route external traffic to cluster-wide or to node-local endpoints](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-s

Deploy pxc-db with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has pxc-db on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartpxc-db is pinned at v1.20.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply