Skip to content

feat(cluster): add pvcTemplate to storage and walStorage - #1061

Open
kimkroening wants to merge 2 commits into
cloudnative-pg:mainfrom
kimkroening:dev/867-pvctemplate
Open

kimkroening wants to merge 2 commits into
cloudnative-pg:mainfrom
kimkroening:dev/867-pvctemplate

Conversation

@kimkroening

Copy link
Copy Markdown

Adds cluster.storage.pvcTemplate and cluster.walStorage.pvcTemplate, passed through to the Cluster's spec.storage.pvcTemplate / spec.walStorage.pvcTemplate.

Addresses #867 (closed by the stale bot). Builds on #577 (no activity).

Why

Some PVC settings can only be expressed through the operator's pvcTemplate; the chart currently exposes only size and storageClass. CloudNative Operator is able to handle pvcTemplate if the helm chart passes it through.

Changes

  • templates/cluster.yaml: render pvcTemplate under storage and walStorage when set. Unset renders exactly as before.
  • values.yaml: pvcTemplate: {} for both. values.schema.json and README.md regenerated with make cluster-schema / make docs.
  • test/postgresql-cluster-configuration: the non-default configuration case now sets storage.pvcTemplate.volumeAttributesClassName and walStorage.pvcTemplate.volumeMode, and asserts both on the Cluster spec.

Testing

  • chainsaw tests pass locally (kind, Kubernetes 1.36.1, CNPG 1.30.1).
  • Also verified that the pvcTemplate contents are applied to PVCs by the Operator.

Assisted-by: Claude

Signed-off-by: kim.kroening <kim.kroening@campbellsci.ca>
Signed-off-by: kim.kroening <kim.kroening@campbellsci.ca>
@kimkroening
kimkroening requested review from a team and danishk as code owners October 20, 2026 19:51

This branch has not been deployed

No deployments
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.

1 participant