Introduction

CloudNativePG Introduction

CloudNativePG (CNPG) is a Kubernetes-native PostgreSQL operator originally developed by EDB and donated to the CNCF (currently a Sandbox project). Unlike older PostgreSQL operators that wrap Patroni and require a separate distributed consensus store (etcd, ZooKeeper), CNPG implements primary/standby coordination directly in the operator using Kubernetes primitives. This significantly reduces failover time, eliminates an external dependency, and aligns the operational model with cloud-native standards.

CNPG manages the full PostgreSQL lifecycle on Kubernetes: deployment, configuration, scaling, automated failover, backup, point-in-time recovery, rolling upgrades, and connection pooling. PostgreSQL versions 14 through 18 are supported.

Alauda build of CloudNativePG Introduction

Alauda build of CloudNativePG packages CNPG as an Alauda Container Platform (ACP) bundle. The operator code is the upstream CNPG project; the Alauda distribution adds:

  • Air-gapped operation: PostgreSQL container images, extensions, and PgBouncer images mirrored to build-harbor.alauda.cn and consumed via ACP's image-rewrite admission. The bundle's POSTGRES_IMAGE_NAME and PGBOUNCER_IMAGE_NAME defaults are pre-baked to mirror tags so the upstream community quickstart works zero-edit on air-gapped clusters.
  • Image-rewrite tolerance: the operator's ENABLE_IMAGE_REWRITE_TOLERANCE flag is enabled by default, so admission-time image rewriting (mirror substitution) does not trigger phantom rollouts.
  • L5 RBAC: a cpaas:middleware-cnpg:business-ns:{admin,edit,view,backup,restore} role family wired into the ACP namespace-admin / namespace-developer aggregation chain.
  • OLM packaging: bundle published to ACP's platform catalog source via standard violet push. Tracked through the artifacts repository (release-4.3 branch) for inclusion in ACP 4.3 release artifacts.
  • Multi-architecture: amd64 + arm64 for operator, plugin, bundle, and PostgreSQL container images.

Key Features

  • Kubernetes-native HA: primary/standby coordination via the operator, no Patroni or etcd. Failover typically completes in single-digit seconds.
  • Multi-version PostgreSQL: PG 14, 15, 16, 17, 18 shipped with the bundle. standard (with extensions) and minimal variants per major version.
  • Bundled extensions: pgaudit, pgvector available from a shared ClusterImageCatalog for PostgreSQL 18.
  • Backup/restore: integration with Barman Cloud plugin (separate sibling package) for object-storage backup with point-in-time recovery.
  • Connection pooling: dedicated Pooler CR backing PgBouncer.
  • Replication topology: synchronous and asynchronous replicas; minSyncReplicas/maxSyncReplicas for availability tuning.
  • Logical replication: declarative Publication and Subscription CRs (no manual SQL).
  • Image catalogs: ImageCatalog and ClusterImageCatalog CRs let cluster operators centralize PostgreSQL image versions.
  • Multi-architecture: amd64 + arm64 across the full image set.

Differences from upstream CNPG

AspectUpstream CNPGAlauda CloudNativePG
DistributionHelm chart, OLM bundle from operatorhub.ioOLM bundle from ACP platform catalog source
Image registryghcr.io/cloudnative-pg/...build-harbor.alauda.cn/middleware/cnpg/... (mirror)
Image-rewrite toleranceDisabled (operator strict-compares image strings)Enabled (ENABLE_IMAGE_REWRITE_TOLERANCE=true)
Default PG imageghcr.io/cloudnative-pg/postgresql:18.3-system-trixiebuild-harbor.alauda.cn/middleware/cnpg/postgresql:18.3-standard-trixie
Multi-architectureMost images amd64+arm64All images amd64+arm64
RBAC* operator + standard K8s RBAC+ L5 namespace-admin / namespace-developer aggregation

When to use this distribution

Use Alauda CloudNativePG when:

  • You are running PostgreSQL on Alauda Container Platform.
  • Your environment is air-gapped or has restricted egress to public container registries.
  • You want operator pods, PostgreSQL pods, and extensions to all resolve from a single internal mirror registry.
  • You need RBAC integration with the ACP namespace-admin / namespace-developer aggregation model.

For non-ACP Kubernetes clusters or environments with unrestricted internet access, the upstream CNPG distribution from cloudnative-pg.io is appropriate.