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:
|
labels:
|
||||||
{{ tuple $envAll "postgresql-backup" "backup" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
{{ tuple $envAll "postgresql-backup" "backup" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.jobs.backup_postgresql.backoffLimit }}
|
schedule: {{ .Values.jobs.postgresql_backup.cron | quote }}
|
||||||
backoffLimit: {{ .Values.jobs.backup_postgresql.backoffLimit }}
|
successfulJobsHistoryLimit: {{ .Values.jobs.postgresql_backup.history.success }}
|
||||||
{{- end }}
|
failedJobsHistoryLimit: {{ .Values.jobs.postgresql_backup.history.failed }}
|
||||||
{{- 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 }}
|
|
||||||
concurrencyPolicy: Forbid
|
concurrencyPolicy: Forbid
|
||||||
jobTemplate:
|
jobTemplate:
|
||||||
metadata:
|
metadata:
|
||||||
@ -44,6 +38,12 @@ spec:
|
|||||||
annotations:
|
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 }}
|
{{ 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:
|
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:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
|
@ -197,9 +197,12 @@ dependencies:
|
|||||||
- endpoint: node
|
- endpoint: node
|
||||||
service: local_image_registry
|
service: local_image_registry
|
||||||
static:
|
static:
|
||||||
backup_postgresql:
|
postgresql_backup:
|
||||||
jobs:
|
jobs:
|
||||||
- postgresql-ks-user
|
- postgresql-ks-user
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: postgresql
|
||||||
tests:
|
tests:
|
||||||
services:
|
services:
|
||||||
- endpoint: internal
|
- endpoint: internal
|
||||||
@ -218,10 +221,6 @@ dependencies:
|
|||||||
service: postgresql
|
service: postgresql
|
||||||
jobs:
|
jobs:
|
||||||
- prometheus-postgresql-exporter-create-user
|
- prometheus-postgresql-exporter-create-user
|
||||||
postgresql_backup:
|
|
||||||
services:
|
|
||||||
- endpoint: internal
|
|
||||||
service: postgresql
|
|
||||||
|
|
||||||
monitoring:
|
monitoring:
|
||||||
prometheus:
|
prometheus:
|
||||||
@ -236,7 +235,7 @@ volume:
|
|||||||
size: 5Gi
|
size: 5Gi
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
backup_postgresql:
|
postgresql_backup:
|
||||||
# activeDeadlineSeconds == 0 means no deadline
|
# activeDeadlineSeconds == 0 means no deadline
|
||||||
activeDeadlineSeconds: 0
|
activeDeadlineSeconds: 0
|
||||||
backoffLimit: 6
|
backoffLimit: 6
|
||||||
|
Loading…
x
Reference in New Issue
Block a user