postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

successfulJobsHistoryLimit & failedJobsHistoryLimit configuration values

Open gloaec opened this issue 3 years ago • 1 comments

Overview

Allow CronJob spec values customization in PostgresCluster CRD :

  • successfulJobsHistoryLimit: 3
  • failedJobsHistoryLimit: 1

At the time being, there is no way to specify those values, and defaults values are the ones shown above.

https://github.com/CrunchyData/postgres-operator/blob/bbe528db567b4d38e1782d27d57eea7afc4463a6/internal/controller/postgrescluster/pgbackrest.go#L2883

Use Case

For customization purposes, it'd be nice to have some configuration options for those two values : successfulJobsHistoryLimit / failedJobsHistoryLimit

Desired Behavior

We could use the pgBackRestConfig.repos array to specify the values like such :

pgBackRestConfig:
  repos:
    - name: repo1
      s3: { ... }
      schedules:
        full: "0 4/6 * * *"
        incremental: "10/30 * * * *"
      successfulJobsHistoryLimit: 1
      failedJobsHistoryLimit: 2

gloaec avatar Jun 07 '22 13:06 gloaec

Hey @gloaec, thank you for this feedback. We have created a story for this in our backlog and will consider it for future releases.

jmckulk avatar Jul 13 '22 16:07 jmckulk