V2.4.0 - Backup job pods are not being removed

Description:

Using Operator v2.4.0, the backup job pods aren’t being cleaned up. PerconaPGBackup are being deleted according to the retention configuration, but the backup job pods are not.

Steps to Reproduce:

...
spec:
  backups:
    pgbackrest:
      configuration:
        - secret:
            name: pac-registry-db-pgbackrest-backup-s3
      global:
        repo1-path: /pgbackrest/harbor/harbor-db/repo1
        repo1-retention-diff: '5'
        repo1-retention-full: '3'
        repo1-retention-full-type: count
        repo1-s3-uri-style: path
      image: percona/percona-postgresql-operator:2.4.0-ppg13-pgbackrest
      ...
      repos:
        - name: repo1
          ...
          schedules:
            differential: 24 * * * *
            full: 48 1 * * *
  crVersion: 2.4.0
  ...

Version:

Percona Postgresql Operator v2.4.0

Expected Result:

The backup job pods be deleted following the retention policy.

Actual Result:

The backup job pods are being kept when list all the pods.

Additional Information

I solved it by creating my own pgbackrest image which calls quitquitquit istio-proxy endpoint to terminate the container

Hi @mboncalo I have created the task [K8SPG-629] - Percona JIRA We will try to include the fix into v2.5.0