From 023eca40a2e3b84a6fe7e281c0005fefcaaaff0b 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 6f61d51b15..9960e1c38d 100644 --- a/manifests/0000_50_olm_07-collect-profiles.cronjob.yaml +++ b/manifests/0000_50_olm_07-collect-profiles.cronjob.yaml @@ -8,6 +8,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 7c0ad2af2e..aad312cd27 100755 --- a/scripts/generate_crds_manifests.sh +++ b/scripts/generate_crds_manifests.sh @@ -248,6 +248,7 @@ metadata: namespace: openshift-operator-lifecycle-manager spec: schedule: "*/15 * * * *" + concurrencyPolicy: "Replace" jobTemplate: spec: template: