From 9ca4d433710a00b76956dd7b143380fda7626ced Mon Sep 17 00:00:00 2001 From: Michal Konecny Date: Nov 01 2024 09:31:26 +0000 Subject: [toddlers] Enable pagure_fas_sync cronjob on production I forgot to enable the cronjob when the toddler was moved to production. Today I realized that the groups are not really synced, this should fix that. Signed-off-by: Michal Konecny --- diff --git a/roles/openshift-apps/toddlers/templates/cron_playtime.yml b/roles/openshift-apps/toddlers/templates/cron_playtime.yml index 0571239..3de4194 100644 --- a/roles/openshift-apps/toddlers/templates/cron_playtime.yml +++ b/roles/openshift-apps/toddlers/templates/cron_playtime.yml @@ -264,17 +264,16 @@ spec: - name: fedora-messaging-cert-volume secret: secretName: toddlers-fedora-messaging-crt -{% else %} --- apiVersion: batch/v1 kind: CronJob metadata: - name: playtime-check-commit-rights + name: playtime-pagure-fas-groups-sync spec: successfulJobsHistoryLimit: 3 failedJobsHistoryLimit: 3 concurrencyPolicy: Forbid - schedule: "0 8 */2 * *" + schedule: "0 4 * * *" startingDeadlineSeconds: 500 jobTemplate: spec: @@ -287,7 +286,7 @@ spec: containers: - name: toddlers image: image-registry.openshift-image-registry.svc:5000/toddlers/toddlers:latest - command: ["/usr/bin/python3", "/code/toddlers/playtime.py", "check-commit-rights"] + command: ["/usr/bin/python3", "/code/toddlers/playtime.py", "pagure_fas_groups_sync"] env: - name: PYTHONPATH value: "/code" @@ -317,16 +316,18 @@ spec: - name: fedora-messaging-cert-volume secret: secretName: toddlers-fedora-messaging-crt + +{% else %} --- apiVersion: batch/v1 kind: CronJob metadata: - name: playtime-pagure-fas-groups-sync + name: playtime-check-commit-rights spec: successfulJobsHistoryLimit: 3 failedJobsHistoryLimit: 3 concurrencyPolicy: Forbid - schedule: "0 4 * * *" + schedule: "0 8 */2 * *" startingDeadlineSeconds: 500 jobTemplate: spec: @@ -339,7 +340,7 @@ spec: containers: - name: toddlers image: image-registry.openshift-image-registry.svc:5000/toddlers/toddlers:latest - command: ["/usr/bin/python3", "/code/toddlers/playtime.py", "pagure_fas_groups_sync"] + command: ["/usr/bin/python3", "/code/toddlers/playtime.py", "check-commit-rights"] env: - name: PYTHONPATH value: "/code" @@ -369,7 +370,6 @@ spec: - name: fedora-messaging-cert-volume secret: secretName: toddlers-fedora-messaging-crt - --- apiVersion: batch/v1 kind: CronJob