Fix postgresql backup cronjob deployment issues
There are a couple of issues that need fixing: 1) "backoffLimit" and "activeDeadlineSeconds" attributes are placed in the CronJob part of the cron-job-backup-postgres.yaml, but should be placed in the Job template part. 2) The backup cronjob had two names in the values.yaml "backup_postgresql" and "postgresql_backup" in various places. It should be "postgresql_backup" in all of those places so that the CronJob can be deployed correctly. Change-Id: Ifd1c7c03ee947763ac073e55c6d74c211615c343
This commit is contained in:
parent
3978c6a33c
commit
c10de970c3
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user