MirrorManager: don't suspend jobs, only the crawlers on staging

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2025-03-14 12:18:39 +01:00
parent a235e2f53c
commit d9e0180d83
No known key found for this signature in database
GPG key ID: 31584CFEB9BF64AD
6 changed files with 46 additions and 68 deletions

View file

@ -10,6 +10,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "4 */2 * * *" schedule: "4 */2 * * *"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: false
jobTemplate: jobTemplate:
spec: spec:
template: template:
@ -38,6 +39,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "55 0 * * *" schedule: "55 0 * * *"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: false
jobTemplate: jobTemplate:
spec: spec:
template: template:

View file

@ -15,6 +15,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "{{ cronjob.schedule }}" schedule: "{{ cronjob.schedule }}"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: {{ (env == "staging")|ternary("true", "false") }}
jobTemplate: jobTemplate:
spec: spec:
template: template:
@ -60,6 +61,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "56 23 * * *" schedule: "56 23 * * *"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: false
jobTemplate: jobTemplate:
spec: spec:
template: template:
@ -88,40 +90,3 @@ spec:
persistentVolumeClaim: persistentVolumeClaim:
claimName: logs claimName: logs
{{ security_context() | indent(4) }} {{ security_context() | indent(4) }}
---
#
### Download GeoIP database
#
apiVersion: batch/v1
kind: CronJob
metadata:
name: download-geoip-db
spec:
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
concurrencyPolicy: Forbid
schedule: "48 * * * *"
startingDeadlineSeconds: 500
jobTemplate:
spec:
template:
spec:
restartPolicy: Never
containers:
- name: mirrormanager
image: image-registry.openshift-image-registry.svc:5000/mirrormanager/mirrormanager2:latest
command:
- "curl"
- "--create-dirs"
- "--output-dir"
- "/var/lib/mirrormanager/geoip"
- "-O"
- "https://infrastructure.fedoraproject.org/infra/bigfiles/geoip/GeoLite2-City.mmdb"
volumeMounts:
- name: var-lib
mountPath: "/var/lib/mirrormanager"
volumes:
- name: var-lib
persistentVolumeClaim:
claimName: data
{{ security_context() | indent(4) }}

View file

@ -11,6 +11,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "48 * * * *" schedule: "48 * * * *"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: false
jobTemplate: jobTemplate:
spec: spec:
template: template:
@ -47,6 +48,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "50 20 * * *" schedule: "50 20 * * *"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: false
jobTemplate: jobTemplate:
spec: spec:
template: template:

View file

@ -10,6 +10,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "0,15,30,45 * * * *" schedule: "0,15,30,45 * * * *"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: false
jobTemplate: jobTemplate:
spec: spec:
template: template:
@ -38,6 +39,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "30 0 * * *" schedule: "30 0 * * *"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: false
jobTemplate: jobTemplate:
spec: spec:
template: template:
@ -54,37 +56,39 @@ spec:
volumes: volumes:
{{ common_volumes() | indent(4) }} {{ common_volumes() | indent(4) }}
{{ security_context() | indent(4) }} {{ security_context() | indent(4) }}
--- # ---
# Run the script for Internet2 netblocks very late to # ===== DISABLED because the source is not published anymore =====
# make sure the files are all there. The script is # # Run the script for Internet2 netblocks very late to
# looking in date dependent directories and depending # # make sure the files are all there. The script is
# on the timezone of the remote server the files appear late. # # looking in date dependent directories and depending
apiVersion: batch/v1 # # on the timezone of the remote server the files appear late.
kind: CronJob # apiVersion: batch/v1
metadata: # kind: CronJob
name: netblocks-internet2 # metadata:
spec: # name: netblocks-internet2
successfulJobsHistoryLimit: 3 # spec:
failedJobsHistoryLimit: 3 # successfulJobsHistoryLimit: 3
concurrencyPolicy: Forbid # failedJobsHistoryLimit: 3
schedule: "0 23 * * *" # concurrencyPolicy: Forbid
startingDeadlineSeconds: 500 # schedule: "0 23 * * *"
jobTemplate: # startingDeadlineSeconds: 500
spec: # suspend: false
template: # jobTemplate:
spec: # spec:
restartPolicy: Never # template:
containers: # spec:
- name: mirrormanager # restartPolicy: Never
image: image-registry.openshift-image-registry.svc:5000/mirrormanager/mirrormanager2:latest # containers:
command: ["mm2_get-netblocks", "--debug", "internet2", "/var/cache/mirrorlist/i2_netblocks.txt"] # - name: mirrormanager
env: # image: image-registry.openshift-image-registry.svc:5000/mirrormanager/mirrormanager2:latest
{{ common_env() | indent(4) }} # command: ["mm2_get-netblocks", "--debug", "internet2", "/var/cache/mirrorlist/i2_netblocks.txt"]
volumeMounts: # env:
{{ common_volume_mounts() | indent(4) }} # {{ common_env() | indent(4) }}
volumes: # volumeMounts:
{{ common_volumes() | indent(4) }} # {{ common_volume_mounts() | indent(4) }}
{{ security_context() | indent(4) }} # volumes:
# {{ common_volumes() | indent(4) }}
# {{ security_context() | indent(4) }}
--- ---
# Amazon EC2 netblocks # Amazon EC2 netblocks
apiVersion: batch/v1 apiVersion: batch/v1
@ -97,6 +101,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "30 1 * * *" schedule: "30 1 * * *"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: false
jobTemplate: jobTemplate:
spec: spec:
template: template:

View file

@ -14,6 +14,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "{{ cronjob.schedule }}" schedule: "{{ cronjob.schedule }}"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: false
jobTemplate: jobTemplate:
spec: spec:
template: template:

View file

@ -13,6 +13,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "27 */4 * * *" schedule: "27 */4 * * *"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: false
jobTemplate: jobTemplate:
spec: spec:
template: template:
@ -45,6 +46,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "44 */4 * * *" schedule: "44 */4 * * *"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: false
jobTemplate: jobTemplate:
spec: spec:
template: template:
@ -79,6 +81,7 @@ spec:
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
schedule: "10 2,18 * * *" schedule: "10 2,18 * * *"
startingDeadlineSeconds: 500 startingDeadlineSeconds: 500
suspend: false
jobTemplate: jobTemplate:
spec: spec:
template: template: