Skip to content

Conversation

@pha91
Copy link
Contributor

@pha91 pha91 commented Oct 7, 2025

Allow to add plugins to the Cluster definition fixes #634
Prepare migration to the new Barman Cloud Plugin including the ObjectStore.

@pha91 pha91 requested a review from itay-grudev as a code owner October 7, 2025 09:35
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. chart( cluster ) Related to the cluster chart labels Oct 7, 2025
@pha91 pha91 marked this pull request as draft October 7, 2025 10:56
@pha91 pha91 force-pushed the feat/cluster-plugin-support branch from ef1fe69 to fff1e84 Compare October 7, 2025 12:54
@pha91 pha91 force-pushed the feat/cluster-plugin-support branch from fff1e84 to 3118f67 Compare October 7, 2025 12:54
@pha91 pha91 marked this pull request as ready for review October 7, 2025 13:07
limits:
cpu: 100m
memory: 256Mi
memory: 256Mi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing spaces after memory: 256Mi

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Oct 8, 2025
@Const-antine
Copy link

As far as I can see, the new objectStore.yaml template does not support the spec.retentionPolicy knob. More information on migrating this functionality here.

@pha91
Copy link
Contributor Author

pha91 commented Oct 17, 2025

Added the retentionPolicy to the ObjectStore. Thanks @Const-antine for the reminder

@pha91 pha91 force-pushed the feat/cluster-plugin-support branch from 5a84d88 to 0289e16 Compare October 17, 2025 07:37
@ChrisTomAlxHitachi
Copy link

@itay-grudev Is there anything pending on this PR?

@eriksjolund
Copy link

eriksjolund commented Nov 4, 2025

I tried out the PR with such a values file:

type: postgresql

version:
  # -- PostgreSQL major version to use
  postgresql: "16"
  # -- If using TimescaleDB, specify the version
  timescaledb: "2.15"
  # -- If using PostGIS, specify the version
  postgis: "3.4"

mode: standalone

cluster:
  # -- Number of instances
  instances: 3

  storage:
    size: 4Gi
    storageClass: ""

  resources:
    limits:
      cpu: 500m
      memory: 1Gi
    requests:
      cpu: 500m
      memory: 1Gi

  plugins:
     - name: barman-cloud.cloudnative-pg.io
       enabled: true
       isWALArchiver: true
       parameters:
          barmanObjectName: my-postgres-cluster-object-store
          serverName:

backups:
  enabled: true
  endpointURL: "https://s3.example.com"

  destinationPath: "s3://mybucket/testcnpg1"
  provider: s3
  secret:
    # -- Whether to create a secret for the backup credentials
    create: false
    # -- Name of the backup credentials secret
    name: netapp-s3-creds

  scheduledBackups:
    - name: daily-backup
      schedule: "0 2 14 * * *"

  # -- Retention policy for backups
  retentionPolicy: "30d"

It worked. One thing though, I was not able to use

    accessKey: "AWS_ACCESS_KEY_ID"
    secretKey: "AWS_SECRET_ACCESS_KEY"

(but that's not so important).

To make it work I had to use

          barmanObjectName: my-postgres-cluster-object-store

together with

helm upgrade --install -n my-namespace my-postgres -f ~/values.yaml  ./cluster

It seems barmanObjectName should be set to my-postgres + -cluster-object-store

(I used my-postgres as helm release name)

Regarding the software design:

I haven't really thought it through yet, but maybe it would be better to store the S3 configurations under under parameters: together with a name field? Such S3 configurations could then be referenced by name under backup: and under recovery:. Has anyone else been thinking about this too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chart( cluster ) Related to the cluster chart size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The plugins is missing in the cluster helm chart

4 participants