diff --git a/templates/openshift/backup-cronjob-template.yaml b/templates/openshift/backup-cronjob-template.yaml index 041703c..10e5882 100644 --- a/templates/openshift/backup-cronjob-template.yaml +++ b/templates/openshift/backup-cronjob-template.yaml @@ -10,14 +10,18 @@ objects: kind: CronJob metadata: name: ${NAME} + labels: + monitoring-key: middleware spec: schedule: ${CRON_SCHEDULE} + concurrencyPolicy: ${CONCURRENCY_POLICY} jobTemplate: spec: template: metadata: name: ${NAME} labels: + monitoring-key: middleware cronjob-name: ${NAME} spec: serviceAccountName: "${SERVICEACCOUNT}" @@ -83,3 +87,6 @@ parameters: value: backupjob - name: DEBUG description: "Debug flag to sleep the job pod after its execution" + - name: CONCURRENCY_POLICY + description: The concurrency policy of the CronJob + value: Forbid diff --git a/templates/openshift/backup-job-template.yaml b/templates/openshift/backup-job-template.yaml index f28fcbe..aa93528 100644 --- a/templates/openshift/backup-job-template.yaml +++ b/templates/openshift/backup-job-template.yaml @@ -10,6 +10,8 @@ objects: kind: Job metadata: name: ${NAME} + labels: + monitoring-key: middleware spec: parallelism: 1 completions: 1