--- apiVersion: batch/v1 kind: CronJob metadata: labels: app.kubernetes.io/component: reposync-openvox7 app.kubernetes.io/name: reposync name: reposync-openvox7 namespace: reposync spec: schedule: "30 2 * * *" timeZone: "Australia/Sydney" concurrencyPolicy: Forbid suspend: false successfulJobsHistoryLimit: 10 failedJobsHistoryLimit: 5 jobTemplate: spec: completions: 1 parallelism: 1 backoffLimit: 3 ttlSecondsAfterFinished: 3600 template: spec: restartPolicy: Never containers: - name: reposync image: git.unkin.net/unkin/almalinux9-base:latest imagePullPolicy: Always command: ["/bin/bash", "-c"] args: - | set -euo pipefail echo "Starting AlmaLinux $REPO_TYPE repository sync..." # Install reposync dnf install -y dnf-plugins-core # Sync repository dnf reposync \ --repoid=$REPO_TYPE \ --destdir=/data \ --download-metadata \ --delete echo "AlmaLinux $REPO_TYPE repository sync completed successfully" env: - name: REPO_TYPE value: "openvox" resources: requests: cpu: 500m memory: 1Gi limits: cpu: 2000m memory: 4Gi volumeMounts: - name: repodata mountPath: /data readOnly: false - name: dnf-conf mountPath: /etc/dnf/dnf.conf subPath: dnf.conf readOnly: true - name: openvox-repo mountPath: /etc/yum.repos.d/openvox.repo subPath: openvox.repo readOnly: true volumes: - name: repodata persistentVolumeClaim: claimName: reposync-openvox7-repodata - name: dnf-conf configMap: name: dnf-conf - name: openvox-repo configMap: name: openvox7-openvox-repo