# To enable production sync: remove --dry-run from args below apiVersion: batch/v1 kind: CronJob metadata: name: ha-sync-photos-hp-to-dell namespace: infrastructure spec: schedule: "7,22,37,52 * * * *" concurrencyPolicy: Forbid successfulJobsHistoryLimit: 3 failedJobsHistoryLimit: 3 jobTemplate: spec: template: spec: serviceAccountName: ha-sync restartPolicy: OnFailure containers: - name: ha-sync image: ha-sync:latest imagePullPolicy: Never command: ["/usr/local/bin/ha-sync"] args: - --src=/mnt/hp/photos - --dest=/mnt/dell/photos - --pair=photos - --direction=hp-to-dell - --log-dir=/var/log/ha-sync - --exclude=*.sock - --exclude=*.pid - --exclude=*.lock - --exclude=lock - --dry-run # REMOVE THIS LINE to enable production sync env: - name: HA_SYNC_DB_DSN valueFrom: secretKeyRef: name: ha-sync-db-secret key: HA_SYNC_DB_DSN volumeMounts: - name: hp-data mountPath: /mnt/hp/photos - name: dell-data mountPath: /mnt/dell/photos - name: logs mountPath: /var/log/ha-sync resources: requests: { cpu: 50m, memory: 64Mi } limits: { cpu: 500m, memory: 256Mi } volumes: - name: hp-data persistentVolumeClaim: claimName: pvc-hp-photos - name: dell-data persistentVolumeClaim: claimName: pvc-dell-photos - name: logs persistentVolumeClaim: claimName: pvc-ha-sync-logs