Merge "Fix MariaDB backup cronjob"
This commit is contained in:
commit
a57fde9051
@ -100,6 +100,7 @@ get_rows() {
|
||||
if [[ -e $TMP_DIR/$SQL_FILE ]]; then
|
||||
current_db_desc ${DATABASE} ${TMP_DIR}/${SQL_FILE} \
|
||||
| grep "INSERT INTO \`${TABLE}\` VALUES" > $ROW_FILE
|
||||
return 0
|
||||
else
|
||||
# Error, cannot report the rows
|
||||
echo "No SQL file found - cannot extract the rows"
|
||||
|
@ -27,15 +27,9 @@ metadata:
|
||||
labels:
|
||||
{{ tuple $envAll "mariadb-backup" "backup" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||
spec:
|
||||
{{- if .Values.jobs.backup_mariadb.backoffLimit }}
|
||||
backoffLimit: {{ .Values.jobs.backup_mariadb.backoffLimit }}
|
||||
{{- end }}
|
||||
{{- if .Values.jobs.backup_mariadb.activeDeadlineSeconds }}
|
||||
activeDeadlineSeconds: {{ .Values.jobs.backup_mariadb.activeDeadlineSeconds }}
|
||||
{{- end }}
|
||||
schedule: {{ .Values.jobs.backup_mariadb.cron | quote }}
|
||||
successfulJobsHistoryLimit: {{ .Values.jobs.backup_mariadb.history.success }}
|
||||
failedJobsHistoryLimit: {{ .Values.jobs.backup_mariadb.history.failed }}
|
||||
schedule: {{ .Values.jobs.mariadb_backup.cron | quote }}
|
||||
successfulJobsHistoryLimit: {{ .Values.jobs.mariadb_backup.history.success }}
|
||||
failedJobsHistoryLimit: {{ .Values.jobs.mariadb_backup.history.failed }}
|
||||
concurrencyPolicy: Forbid
|
||||
jobTemplate:
|
||||
metadata:
|
||||
@ -44,6 +38,12 @@ spec:
|
||||
annotations:
|
||||
{{ dict "envAll" $envAll "podName" "mariadb-backup" "containerNames" (list "init" "backup-perms" "mariadb-backup") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
|
||||
spec:
|
||||
{{- if .Values.jobs.mariadb_backup.backoffLimit }}
|
||||
backoffLimit: {{ .Values.jobs.mariadb_backup.backoffLimit }}
|
||||
{{- end }}
|
||||
{{- if .Values.jobs.mariadb_backup.activeDeadlineSeconds }}
|
||||
activeDeadlineSeconds: {{ .Values.jobs.mariadb_backup.activeDeadlineSeconds }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
|
@ -226,10 +226,12 @@ dependencies:
|
||||
services:
|
||||
- endpoint: error_pages
|
||||
service: oslo_db
|
||||
backup_mariadb:
|
||||
mariadb_backup:
|
||||
jobs:
|
||||
- mariadb-ks-user
|
||||
services: null
|
||||
services:
|
||||
- endpoint: internal
|
||||
service: oslo_db
|
||||
prometheus_create_mysql_user:
|
||||
services:
|
||||
- endpoint: internal
|
||||
@ -250,10 +252,6 @@ dependencies:
|
||||
services:
|
||||
- endpoint: internal
|
||||
service: local_image_registry
|
||||
mariadb_backup:
|
||||
services:
|
||||
- endpoint: internal
|
||||
service: oslo_db
|
||||
tests:
|
||||
services:
|
||||
- endpoint: internal
|
||||
@ -278,7 +276,7 @@ jobs:
|
||||
exporter_create_sql_user:
|
||||
backoffLimit: 87600
|
||||
activeDeadlineSeconds: 3600
|
||||
backup_mariadb:
|
||||
mariadb_backup:
|
||||
# activeDeadlineSeconds == 0 means no deadline
|
||||
activeDeadlineSeconds: 0
|
||||
backoffLimit: 6
|
||||
|
Loading…
Reference in New Issue
Block a user