From 3280d94357a7d62a9dd2daba39898ef1baec4372 Mon Sep 17 00:00:00 2001 From: Alexander Greene Date: Mon, 28 Feb 2022 13:54:34 -0800 Subject: [PATCH] Replace long running collect-profiles jobs Problem: The collect-profiles job should only take a few seconds to run. There are instances, such as when the pod cannot be scheduled, where the job will not complete in a reasonable amount of time. If enough jobs are scheduled but unable to run, the number of scheduled jobs can exceed pod quota limits. Solution: Given that the collect-profiles job should only take a few seconds to run and that the job is scheduled to run every 15 minutes, set the collect-profiles cronJob's spec.concurrencyPolicy to "Replace" so that only one active collect-profiles pod exists at any time. --- manifests/0000_50_olm_07-collect-profiles.cronjob.yaml | 1 + scripts/generate_crds_manifests.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/manifests/0000_50_olm_07-collect-profiles.cronjob.yaml b/manifests/0000_50_olm_07-collect-profiles.cronjob.yaml index 29b99f87f7..7ea714ee47 100644 --- a/manifests/0000_50_olm_07-collect-profiles.cronjob.yaml +++ b/manifests/0000_50_olm_07-collect-profiles.cronjob.yaml @@ -9,6 +9,7 @@ metadata: namespace: openshift-operator-lifecycle-manager spec: schedule: "*/15 * * * *" + concurrencyPolicy: "Replace" jobTemplate: spec: template: diff --git a/scripts/generate_crds_manifests.sh b/scripts/generate_crds_manifests.sh index b15bc2b1b7..6830ae24e4 100755 --- a/scripts/generate_crds_manifests.sh +++ b/scripts/generate_crds_manifests.sh @@ -256,6 +256,7 @@ metadata: namespace: openshift-operator-lifecycle-manager spec: schedule: "*/15 * * * *" + concurrencyPolicy: "Replace" jobTemplate: spec: template: