Skip to content

feat(postgres): add cnpg cluster helmfile and bump operator to 0.29.0 - #161

Merged
patrick-hermann-sva merged 1 commit into
mainfrom
feat/cnpg-cluster-helmfile
Aug 29, 2026
Merged

patrick-hermann-sva merged 1 commit into
mainfrom
feat/cnpg-cluster-helmfile

Conversation

@patrick-hermann-sva

Copy link
Copy Markdown
Contributor

What

  • New: database/postgres-cluster.yaml.gotmpl (+ database/values/postgres-cluster.values.yaml.gotmpl) — deploys a CloudNativePG Cluster CR via the official cnpg/cluster chart, 0.8.1.
  • Bump: database/postgres.yaml.gotmpl operator chart 0.24.0 → 0.29.0 (app 1.26.0 → 1.30.0).
  • Docs: new ### DEPLOY CLUSTER section in database/README.md.

Why

The operator was deployed declaratively, but the Cluster CR was only documented as a manual kubectl apply heredoc. This closes that gap.

The cnpg/cluster chart lives in the repository the operator already comes from, so no new repositories entry is needed and the existing Renovate customManager picks the version up. The operator itself had drifted five minor versions behind upstream.

Defaults

Lab-shaped and fully parameterized: instances: 1, enablePDB: false, enableSuperuserAccess: false, backups and monitoring off, PostgreSQL 17. Leaving appSecretName empty lets cnpg generate the <clusterName>-app secret; set it to point at a pre-created basic-auth secret instead.

Testing

Verified end to end on a test cluster (RKE2 v1.35.3, openebs-hostpath default SC):

  1. Operator upgrade in place — 1.26.0 → 1.30.0 with an existing cluster present; the cluster rolled and returned to Cluster in healthy state.
  2. Fresh deploy — cluster release destroyed and PVC removed, then re-applied against operator 1.30.0:
postgres-cluster       Cluster in healthy state
pod/postgres-cluster-1 1/1 Running
pvc/postgres-cluster-1 Bound 8Gi openebs-hostpath
svc: postgres-cluster-rw / -ro / -r
psql: 17.11 | databases: postgres,app,template1,template0 | owner: app

pre-commit and task check-renovate both pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_012yzd6TJqbsBuk95w3efGiL

The CloudNativePG operator was deployed declaratively, but the Cluster CR
itself was only documented as a manual `kubectl apply` heredoc in the
database README. Add database/postgres-cluster.yaml.gotmpl, using the
official cnpg/cluster chart (0.8.1) from the repository the operator
already comes from, so no new `repositories` entry is needed and the
existing Renovate customManager picks the version up.

Defaults are lab-shaped and fully parameterized: single instance, no PDB,
no superuser access, backups and monitoring off, PostgreSQL 17. Leaving
appSecretName empty lets cnpg generate the <clusterName>-app secret.

Also bump the operator chart 0.24.0 -> 0.29.0 (app 1.26.0 -> 1.30.0),
which had drifted five minor versions behind upstream.

Verified on a test cluster: the operator upgrade rolls in place with the
existing cluster returning to a healthy state, and a fresh deploy of the
cluster helmfile against 1.30.0 comes up healthy on PostgreSQL 17.11 with
the app database and owner created.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012yzd6TJqbsBuk95w3efGiL
@patrick-hermann-sva
patrick-hermann-sva merged commit eadb58b into main Aug 29, 2026
6 checks passed
@patrick-hermann-sva
patrick-hermann-sva deleted the feat/cnpg-cluster-helmfile branch August 29, 2026 11:06

This branch was successfully deployed

1 active deployment
k8s — 2b772976 Deployed Aug 29, 2026 by patrick-hermann-sva via Lint yaml files / Yaml-Lint #255
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants