How-To

Update CNPG Operator Version

Update the CloudNativePG operator and barman plugin to newer versions.

Prerequisites

  • Access to dp-infra repository

  • Node.js and npm installed (for CDK8S build)

Step 1: Check Available Versions

# Search CloudNativePG chart versions
helm search repo cloudnative-pg/cloudnative-pg --versions

# Search barman plugin versions
helm search repo cloudnative-pg/plugin-barman-cloud --versions

Step 2: Update Configuration

Edit dp-infra/cnpg/config.yaml:

versions:
  operator: "0.27.0"  # New chart version
  barmanPlugin: "0.3.0"  # New plugin version

Step 3: Rebuild Manifests

cd dp-infra/cnpg
npm run build

This regenerates manifests/cnpg.k8s.yaml with new versions.

Step 4: Review Changes

git diff manifests/cnpg.k8s.yaml

Verify:

  • Chart version updated

  • No unexpected changes

Step 5: Commit and Push

git add config.yaml manifests/cnpg.k8s.yaml
git commit -m "Update CNPG operator to v0.27.0 and barman plugin to v0.3.0"
git push

Step 6: Verify ArgoCD Sync

ArgoCD automatically syncs changes:

# Watch ArgoCD Application
kubectl get application cnpg-app-* -n argocd -w

# Check sync status
argocd app get cnpg-app-* -n argocd

Step 7: Verify Operator Update

# Check operator pod version
kubectl get deployment cnpg-cloudnative-pg -n cnpg-system \
  -o jsonpath='{.spec.template.spec.containers[0].image}'

# Check operator logs
kubectl logs -n cnpg-system -l app.kubernetes.io/name=cloudnative-pg

# Verify existing clusters still healthy
kubectl get clusters.postgresql.cnpg.io -A

Rollback (if needed)

If the update causes issues:

cd dp-infra/cnpg

# Revert config.yaml to previous version
git revert HEAD

# Rebuild and push
npm run build
git add config.yaml manifests/
git commit -m "Rollback CNPG operator version"
git push

ArgoCD will automatically sync the rollback.

Next Steps