Postgres pods custom annotations

Hi,
Need to pass custom annotations to Postgres pods so that velero backup tool could do full backups (including storage)

One finding, if add in crd “pgclusters.pg.percona.com” required annotation line it will do what is required

k get pgclusters.pg.percona.com test-db-pg-db -oyaml|grep global -A 3
    global:
      backup.velero.io/backup-volumes: pgdata
      keep-backups: "false"
      keep-data: "true"
      
// Pods are immediate restarted with annotations included

k get pod pod-name -oyaml |grep annotations: -A 1
  annotations:
    backup.velero.io/backup-volumes: pgdata

Please advise how to add annotations using helm deployment
Helm charts used

Thanks in advance

Hello @VNuser ,

which version of the operator are you using? if you are just starting, I would recommend using v2 (Percona Operator for PostgreSQL)

Hi @Sergey_Pronin,

Thanks for quick response, it looks like we are using older version 1.4.0

Actually we are using it for a while could be 3-4 month, this annotation question rise due to velero tool introduction!

Latest version is capable of doing this?

Thanks
Vitaly

Hi @Sergey_Pronin ,

Might had some time to check on this ?

Thanks in advance

In short you need to add annotations section under pgPrimary to make it work the way you need.
I created this PR: K8SPG-393 Update cluster.yaml custom annotations by spron-in · Pull Request #223 · percona/percona-helm-charts · GitHub

It addresses your request.

Also I would strongly recommend to use Percona Operator v2 instead: Percona Operator for PostgreSQL

@Sergey_Pronin , thank you a TON!
We did investigation regarding v2 version, and first comment when open v2


This is version 2.1.0 of the Percona Operator for PostgreSQL. It is a tech preview release and it is not recommended for production environments.

We decide to stick with 1.4

Thanks, will monitor change implementation!

@VNuser ,

glad I was able to help.

P.S. 2.X will go GA this month, so I would strongly suggest to consider using it :slight_smile:

@Sergey_Pronin thanks for suggestion!
will consider with collages this version and steps of mitigation

Hi @Sergey_Pronin, we discuss with colleagues, and we could go with newer version, is upgrade path available? How this could impact running database clusters?

Thanks in advance

There will be three paths to upgrade. You can read about them in this preview doc: Upgrade overview - Percona Operator for PostgreSQL

Please note, that some of these procedures will not work till the latest release which is coming this month.
Once we do a release, the doc will be available in our official docs.

1 Like

@Sergey_Pronin, thanks a ton!