cluster-crunchy

by startxfr

Helm chartv21.3.418App 5.8.9GPL-3.0-or-laterVerified publisher

Helm chart used to configure highly available PostgreSQL clusters using the Crunchy Postgres for Kubernetes operator, with S3 backups, restore, monitoring and network policies

About this chart

Cluster Chart : Crunchy

This helm chart is used to deploy PostgreSQL clusters managed by the Crunchy Postgres for Kubernetes operator (PGO). Each entry of cluster.list is a PostgresCluster, from a single instance for development up to a highly available cluster for production: several instances with synchronous replication on distinct nodes, pgBackRest backups to an S3 bucket with point in time restore, PodMonitor and alerts, NetworkPolicy. The chart is used alone, or as the crunchy sub-chart of cluster-quay, which derives the database connection strings of the registry from the clusters listed here.

This chart is part of the cluster-xxx startx helm chart series that doesn't necessarily deploy pods but rather represent a cluster configuration state orchestrated by gitops tools like ArgoCD.

Requirements and guidelines

Read the startx helm-repository homepage for more information on how to use these resources.

RequirementDetail
OpenShift 4.17+ (Kubernetes 1.30+)kubeVersion of the chart
Crunchy Postgres for Kubernetes 5.8certified-operators catalog, package crunchy-postgres-operator, channel v5, installed by the operator sub-chart in the namespace of the clusters (OwnNamespace). A Crunchy Data support subscription is required in production for organizations of 50 employees or more (terms of use)
backup.type: s3An S3 compatible bucket reachable from the database pods, described in s3.list
monitoring.enabledThe Prometheus operator CRDs (PodMonitor, PrometheusRule): user workload monitoring enabled on the cluster
SecretsPasswords and S3 credentials are expected as Argo CD Vault Plugin placeholders (<path:kv/data/...#key>) or supplied by a values file kept out of Git; the chart never generates them

Deploy this helm chart on openshift

1. Connect to your Openshift cluster

oc login -t <token> <cluster-url>

2. Install the repository

helm repo add startx https://helm-repository.readthedocs.io/en/latest/repos/stable/

3. Get information about this chart

helm show chart startx/cluster-crunchy

4. Install this chart

helm install cluster-crunchy startx/cluster-crunchy

Default values

Complete deployment of a project with the following characteristics :

  • 1 namespace: named default-crunchy without constraints
  • 1 operator: named crunchy-postgres-operator configured with
    • The v5 channel of the certified catalog
    • The v5.8.9 version
    • Deployed under the default-crunchy project
  • 1 cluster: named default-db configured with
    • PostgreSQL 14, one instance, a 2Gi data volume
    • a volume based pgBackRest repository with a full backup on Sunday and a differential backup the other days, 14 days of retention
    • pgBouncer, pgAdmin and password-less connections (pgHbaTrust), as in the previous releases of this chart
# Create the project
helm install cluster-crunchy-project startx/cluster-crunchy --set project.enabled=true,operator.enabled=false,cluster.enabled=false
# Deploy the crunchy operator
helm install cluster-crunchy-operator startx/cluster-crunchy --set project.enabled=false,operator.enabled=true,cluster.enabled=false && sleep 10
# Configure default crunchy resources
helm install cluster-crunchy-instance startx/cluster-crunchy --set project.enabled=false,operator.enabled=false,cluster.enabled=true

Values files

  • startx : CrunchyDB operator (see values.yaml)
  • startx-ha : one highly available cluster, two instances, synchronous replication, S3 backups, monitoring (see values-startx-ha.yaml)
  • startx-quay : the two databases of a highly available Quay registry, used by the crunchy sub-chart of cluster-quay (see values-startx-quay.yaml)
  • demo : demo cluster (see values-demo.yaml)
  • values-startx_noinfra*.yaml : the same without the infra node placement of the operator
helm install cluster-crunchy startx/cluster-crunchy -f https://raw.githubusercontent.com/startxfr/helm-repository/master/charts/cluster-crunchy/values-startx.yaml

Values dictionary

Cluster entries (cluster.list[])

Every key below the first entry of values.yaml is optional; the defaults keep the behaviour of the previous releases (one instance, volume based backups, pgBouncer, pgAdmin, pg_hba trust).

KeyDefaultDescription
name, enabled, namespacedefault-db, true, project nameName of the PostgresCluster, switch, namespace
postgresVersion14Major version; the operator picks its image unless image is set
storageClassName, storageInstanceSize, storageBackupSize"", 2Gi, 2GiData volume (empty class: default StorageClass of the cluster), volume of the volume based repository
username, databasedefault-user, cluster nameOwner role and its database (users[0] of the PostgresCluster)
password""Owner password (secret). Empty: generated by the operator. Set: the chart renders the Secret <name>-pguser-<username> and the operator keeps it
extensions[]Extensions created in the database at initialization; ignored when initScript is set
initScriptSQL sampleFull databaseInitSQL script (ConfigMap <name>-initdb), takes precedence over extensions
replicas1Instances of the cluster; 2 or more enables the Patroni failover
synchronousfalsePatroni synchronous_mode: no committed transaction lost at failover
avoidInfraNodesfalseRequired anti-affinity between the instances (one per node) and no scheduling on infra nodes, backup jobs included
image, resources, parameters"", {}, {}Instance image (empty: operator default), resources of each instance, postgresql.conf parameters
pgHbaTrusttruePassword-less connections from any address, as before. false: operator defaults (SCRAM, TLS)
pgbouncer.enabled, pgadmin.enabledtrue, truepgBouncer pooler and pgAdmin interface
istioSidecarEnabledfalseIstio sidecar annotations on the instances and the backup jobs
backup.enabled, backup.typetrue, volumepgBackRest repository: a volume (storageBackupSize) or an entry of s3.list (backup.s3)
backup.pathPrefix, backup.retentionDays, backup.schedulesnamespace, 14, Sunday 1:00 / other days 1:00S3 repository path /<prefix>/<name>/repo1, retention of the full backups in days, cron of the full and differential backups (differential: "" disables it)
backup.image""pgBackRest image (empty: operator default)
restore.enabled, restore.s3, restore.source, restore.targetfalseBootstrap the cluster from the repository source (a repo1-path) of the endpoint s3 (empty: backup.s3), at target (empty: end of the archive). Read at cluster creation only
inPlaceRestore.enabled, inPlaceRestore.targetfalse, ""Restore in place of the running cluster, triggered by the pgbackrest-restore annotation (see Procedures)
monitoring.enabled and thresholdsfalsepgMonitor exporter, PodMonitor <name>-exporter and PrometheusRule <name>-alerts (CrunchyPostgres* alerts)
networkPolicy.enabled, allowedNamespaces, operatorNamespaces, monitoringNamespacesfalseIngress policy on the database pods: same namespace, allowedNamespaces on 5432, operatorNamespaces on every port, monitoring stacks on 9187

S3 endpoints (s3.list[])

KeyDescription
name, namespaceName referenced by backup.s3 and restore.s3; namespace of the Secret <name>-pgbackrest-s3 (the namespace of the clusters)
endpoint, port, region, bucket, uriStyleEndpoint without scheme, port (empty: 443), signature region (required), bucket, path or host addressing
accessKey, secretKey, caCertCredentials (secret) and PEM of a private CA signing the endpoint certificate

Sub-charts

project (namespace) and operator (OLM subscription and OperatorGroup of the Crunchy operator) are the STARTX basic charts; see their documentation. The chart objects use Argo CD sync waves: Secrets and ConfigMaps (1), PostgresCluster and NetworkPolicy (15), PodMonitor and PrometheusRule (30), loaders (35).

Procedures

Backups

# status of the repository, per cluster
oc exec -n default-crunchy startx-db-instance1-xxxx-0 -c database -- pgbackrest info
# on demand full backup
oc annotate postgrescluster startx-db -n default-crunchy postgres-operator.crunchydata.com/pgbackrest-backup="$(date +%s)" --overwrite

Restore to a point in time, in place

Set inPlaceRestore.enabled: true and inPlaceRestore.target: "2026-10-15 14:00:00+00" on the cluster entry, apply (commit with Argo CD), then trigger the restore. The operator stops the cluster, restores the primary from the repository and rebuilds the replicas. Set inPlaceRestore.enabled back to false once done.

oc annotate postgrescluster startx-db -n default-crunchy postgres-operator.crunchydata.com/pgbackrest-restore="$(date +%s)" --overwrite

Restore into a new cluster

A new cluster entry with restore.enabled: true, restore.source set to the repo1-path of the source cluster (/<prefix>/<cluster>/repo1) and a backup.pathPrefix or a cluster name different from the source: the new cluster must not archive into the repository it restores from (the chart refuses it). The restored cluster gets new passwords unless password is set.

Certificate authority of a cluster

The operator issues one root CA per operator, shared by its clusters, and one leaf certificate per cluster. Clients verifying the server certificate (sslmode=verify-full) need the CA:

oc get secret startx-db-cluster-cert -n default-crunchy -o jsonpath='{.data.ca\.crt}' | base64 -d

Deploy with ArgoCD

AppProject

git clone https://gitlab.com/startx1/helm.git
cd helm-repository/charts/cluster-crunchy/examples/argocd/
oc apply -k .

Applications

The examples/argocd folder holds the AppProject and the three Applications (project, operator, app) of the standard pattern, using values-startx_noinfra.yaml. For a highly available cluster, replace the values file by values-startx_noinfra-ha.yaml and declare the S3 credentials through the Argo CD Vault Plugin.

History

ReleaseDateDescription
16.19.592024-12-09Align all chart to the 16.19.59 release
17.14.902025-04-30Publish stable release for 4.17 version
18.11.712025-11-27Align all charts to the same releas
18.23.02026-02-28Start 4.19 branch
19.23.172026-03-02Align all dependencies to chart v19.23.11
20.14.152026-03-02Update all chrat to OCP version 4.20.14
21.3.02026-03-02Update all chart to OCP version 4.21.3
21.3.122026-06-18Update crunchy-postgres-operator to 5.8.7, add ArgoCD deployment examples
21.3.2782026-08-14add centigpu
21.3.2792026-10-20High availability, S3 backups, restore, monitoring and network policies per cluster; crunchy-postgres-operator 5.8.9
21.3.3002026-10-21Add new charts and align all to this release
21.3.3092026-10-27Adding new charts perconna and align all to v21.3.309
21.3.3212026-11-05Adding external secret management
21.3.3712026-11-19Add Sail, oauthProxy, DSCInitialization, spot machines and annotations support
21.3.3772026-11-19full repository release: aligned pins, ArgoCD source fix, schemas and docs
21.3.3792026-11-19conventions wave: spelling, READMEs, ArgoCD examples and values-app, oauth switch
21.3.3892026-11-19full repository release: HTTPS dependency URLs, dependency-ordered release, schema guard, docs and examples
21.3.3902026-11-20full repository release: test fix, keepalived README, aligned pins
21.3.3922026-11-21full repository release: chaos-pipeline run parameters and authenticated health check, aligned pins
21.3.3972026-11-21stable repository release 21.3.397: all charts aligned, unifai delegation cap documentation
21.3.3982026-11-21project: dockercfg existingSecret; chaos-pipeline: empty default for scenarios, optional ClusterOperator final check; chaos schemas regenerated
21.3.4102026-11-22full repository release: README conventions (Values files, Deploy with ArgoCD), conventions page
21.3.4122026-11-22full repository release: internal pins on the previous published version (ADR-0006)
21.3.4162026-11-23stable update: chart fixes (project, cluster-mongo, cluster-oadp, cluster-pipeline, clust

Deploy cluster-crunchy with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cluster-crunchy 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 chartcluster-crunchy is pinned at v21.3.418 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