feat(backup-system): migración completa a GitOps
- CronJob rclone-mega-backup entra en git (solo existía imperativo) - Scripts backup.sh/verify.sh/rclone-mega.sh como ConfigMap backup-scripts (antes hostPath /data/backups/scripts — cambios ahora pasan por git+ArgoCD) - rclone.conf vía InfisicalStaticSecret (homelab/prod//backup-system → RCLONE_CONF), sustituye al hostPath de ~/.config/rclone/rclone.conf - Imágenes pinneadas: rclone 1.74.3, bitnami/kubectl por digest (v1.36.2) - ClusterRole/CRB de backup-sa entran en git - Application ArgoCD backup-system (auto-sync + prune + selfHeal) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: rclone-mega-backup
|
||||
namespace: backup-system
|
||||
spec:
|
||||
schedule: "0 3 * * 0"
|
||||
concurrencyPolicy: Forbid
|
||||
failedJobsHistoryLimit: 2
|
||||
successfulJobsHistoryLimit: 3
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: chemavx-k8
|
||||
restartPolicy: OnFailure
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
containers:
|
||||
- name: rclone
|
||||
image: docker.io/rclone/rclone:1.74.3
|
||||
command: ["/bin/sh", "/scripts/rclone-mega.sh"]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- mountPath: /data/backups/backups
|
||||
name: backup-dir
|
||||
- mountPath: /rclone
|
||||
name: rclone-conf
|
||||
- mountPath: /scripts
|
||||
name: scripts
|
||||
volumes:
|
||||
- name: backup-dir
|
||||
hostPath:
|
||||
path: /data/backups/backups
|
||||
type: DirectoryOrCreate
|
||||
- name: rclone-conf
|
||||
secret:
|
||||
secretName: rclone-conf-infisical
|
||||
items:
|
||||
- key: RCLONE_CONF
|
||||
path: rclone.conf
|
||||
- name: scripts
|
||||
configMap:
|
||||
name: backup-scripts
|
||||
defaultMode: 0755
|
||||
Reference in New Issue
Block a user