# Periodic git mirror: home's Scooby/Homelabv4 (the actual GitOps # source) -> VPS GitLab's copy of the same project. See # mirror-sync-secret.yaml for why this is a plain CronJob instead of # GitLab's native pull-mirror feature (Premium-gated, confirmed live # 2026-08-21). This is the VPS-standby equivalent of the original # plan's "Gitea pull mirror of the GitOps source" - same intent, # different mechanism now that real GitLab replaced Gitea here. apiVersion: batch/v1 kind: CronJob metadata: name: gitlab-mirror-sync namespace: gitlab spec: schedule: "*/15 * * * *" concurrencyPolicy: Forbid successfulJobsHistoryLimit: 3 failedJobsHistoryLimit: 3 jobTemplate: spec: backoffLimit: 1 activeDeadlineSeconds: 600 template: spec: restartPolicy: Never containers: - name: mirror-sync image: alpine/git:2.43.0 command: - sh - -c - | set -eu rm -rf /tmp/mirror.git git clone --mirror "https://${PULL_USERNAME}:${PULL_TOKEN}@gitlab.kube.huskypup.net/Scooby/Homelabv4.git" /tmp/mirror.git cd /tmp/mirror.git git push --mirror "https://root:${PUSH_TOKEN}@gitlab.vps.huskypup.net/Scooby/Homelabv4.git" echo "Mirror sync complete: $(date -u)" env: - name: PULL_USERNAME valueFrom: secretKeyRef: name: gitlab-mirror-sync-secret key: pull_username - name: PULL_TOKEN valueFrom: secretKeyRef: name: gitlab-mirror-sync-secret key: pull_token - name: PUSH_TOKEN valueFrom: secretKeyRef: name: gitlab-mirror-sync-secret key: push_token resources: requests: cpu: 25m memory: 128Mi limits: memory: 512Mi