Skip to content

Commit be5dccf

Browse files
committed
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.
1 parent 6858269 commit be5dccf

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

manifests/0000_50_olm_07-collect-profiles.cronjob.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata:
77
name: collect-profiles
88
namespace: openshift-operator-lifecycle-manager
99
spec:
10+
concurrencyPolicy: "Replace"
1011
schedule: "*/15 * * * *"
1112
jobTemplate:
1213
spec:

scripts/generate_crds_manifests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ metadata:
248248
namespace: openshift-operator-lifecycle-manager
249249
spec:
250250
schedule: "*/15 * * * *"
251+
concurrencyPolicy: "Replace"
251252
jobTemplate:
252253
spec:
253254
template:

0 commit comments

Comments
 (0)