pg-operator

by Percona

Helm chartv3.1.0App 3.1.0

A Helm chart to deploy the Percona Operator for PostgreSQL

About this chart

Percona Operator for PostgreSQL

This Helm chart deploys the Kubernetes Operator to manage Percona Distribution for PostgreSQL.

Useful links:

A job will be created based on helm install, upgrade, or uninstall. After the job has completed the RBAC will be cleaned up.

Pre-requisites

  • Kubernetes 1.31+
  • At least v3.2.3 of Helm

Installation

This chart will deploy the Operator Pod for creating PostgreSQL clusters in Kubernetes. NOTE:

The PG Operator v2 is not directly compatible with old v1 so it is advised to always specify `--version`
when installing pg-operator or pg-db charts to not accidentally cause upgrade to v2 if you were using v1
previously.

Installing the chart

To install the chart with the pg-operator release name using a dedicated namespace (recommended):

helm repo add percona https://percona.github.io/percona-helm-charts/
helm install my-operator percona/pg-operator --version 3.1.0 --namespace my-namespace --create-namespace

Configuration

The following shows the configurable parameters that are relevant to the Helm Chart.

ParameterDescriptionDefault
replicaCountNumber of operator replicas1
operatorImageRepositoryPG Operator container image repositorydocker.io/percona/percona-postgresql-operator
imagePG Operator container image full path override""
imagePullPolicyPG Operator container pull policyAlways
imagePullSecretsImage pull secrets for the operator Pod[]
nameOverrideHelm name override""
fullnameOverrideHelm full name override""
resources.requests.cpuCPU resource requests for the operator Pod100m
resources.requests.memoryMemory resource requests for the operator Pod20Mi
resources.limits.cpuCPU resource limits for the operator Pod200m
resources.limits.memoryMemory resource limits for the operator Pod500Mi
nodeSelectorLabels for Pod assignment{}
tolerationsTolerations for the operator Pod[]
affinityAffinity for the operator Pod{}
logStructuredForce PG operator to print JSON-wrapped log messagesfalse
logLevelPG Operator logging levelINFO
workersNumber of operator workers (PGO_WORKERS)1
disableTelemetryDisable sending PG Operator telemetry data to Perconafalse
podAnnotationsAdd annotations to the Operator Pod{}
pprofBindAddressTCP address for serving pprof (profiling). Set "" or "0" to disable"0"
watchNamespaceSet this variable if the target cluster namespace differs from the operator's namespace``
watchAllNamespacesKubernetes cluster-wide operationfalse
leaderElectionEnabledDisable/enable leader electiontrue
leaseNameDetermines the name of the resource that leader election will use for holding the lock""
leaseDurationDuration that non-leader candidates wait to acquire leadership60s
renewDeadlineDuration that the acting control plane retries refreshing leadership40s
retryPeriodDuration between leader election retries10s
featureGates.backupSnapshotsEnable or disable backup snapshots feature gatefalse

Deploy the Database

To deploy Percona Operator for PostgreSQL cluster, run the following command:

helm install my-db percona/pg-db --version 3.1.0 --namespace my-namespace

See more about Percona Operator for PostgreSQL deployment in its chart here or in the Helm chart installation guide.

Need help?

Commercial SupportCommunity Support
Enterprise-grade assistance for your mission-critical database deployments in containers and Kubernetes. Get expert guidance for complex tasks like multi-cloud replication, database migration and building platforms.Connect with our engineers and fellow users for general questions, troubleshooting, and sharing feedback and ideas.
Get Percona SupportVisit our Forum

Deploy pg-operator with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has pg-operator 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 chartpg-operator is pinned at v3.1.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