diff --git a/postgresql/templates/cron-job-backup-postgres.yaml b/postgresql/templates/cron-job-backup-postgres.yaml index b106f7247..98fe9fa8b 100644 --- a/postgresql/templates/cron-job-backup-postgres.yaml +++ b/postgresql/templates/cron-job-backup-postgres.yaml @@ -27,15 +27,9 @@ metadata: labels: {{ tuple $envAll "postgresql-backup" "backup" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} spec: -{{- if .Values.jobs.backup_postgresql.backoffLimit }} - backoffLimit: {{ .Values.jobs.backup_postgresql.backoffLimit }} -{{- end }} -{{- if .Values.jobs.backup_postgresql.activeDeadlineSeconds }} - activeDeadlineSeconds: {{ .Values.jobs.backup_postgresql.activeDeadlineSeconds }} -{{- end }} - schedule: {{ .Values.jobs.backup_postgresql.cron | quote }} - successfulJobsHistoryLimit: {{ .Values.jobs.backup_postgresql.history.success }} - failedJobsHistoryLimit: {{ .Values.jobs.backup_postgresql.history.failed }} + schedule: {{ .Values.jobs.postgresql_backup.cron | quote }} + successfulJobsHistoryLimit: {{ .Values.jobs.postgresql_backup.history.success }} + failedJobsHistoryLimit: {{ .Values.jobs.postgresql_backup.history.failed }} concurrencyPolicy: Forbid jobTemplate: metadata: @@ -44,6 +38,12 @@ spec: annotations: {{ dict "envAll" $envAll "podName" "postgresql-backup" "containerNames" (list "init" "backup-perms" "postgresql-backup") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: +{{- if .Values.jobs.postgresql_backup.backoffLimit }} + backoffLimit: {{ .Values.jobs.postgresql_backup.backoffLimit }} +{{- end }} +{{- if .Values.jobs.postgresql_backup.activeDeadlineSeconds }} + activeDeadlineSeconds: {{ .Values.jobs.postgresql_backup.activeDeadlineSeconds }} +{{- end }} template: metadata: labels: diff --git a/postgresql/values.yaml b/postgresql/values.yaml index ca189964b..07a659348 100644 --- a/postgresql/values.yaml +++ b/postgresql/values.yaml @@ -197,9 +197,12 @@ dependencies: - endpoint: node service: local_image_registry static: - backup_postgresql: + postgresql_backup: jobs: - postgresql-ks-user + services: + - endpoint: internal + service: postgresql tests: services: - endpoint: internal @@ -218,10 +221,6 @@ dependencies: service: postgresql jobs: - prometheus-postgresql-exporter-create-user - postgresql_backup: - services: - - endpoint: internal - service: postgresql monitoring: prometheus: @@ -236,7 +235,7 @@ volume: size: 5Gi jobs: - backup_postgresql: + postgresql_backup: # activeDeadlineSeconds == 0 means no deadline activeDeadlineSeconds: 0 backoffLimit: 6