Files
k8s-manifests/backup-system/cronjob-backup.yaml
T
chemavxandClaude Fable 5 e00c520a26 Decomisión de openclaw
- Elimina manifests openclaw/ y argocd/application-openclaw.yaml
- backup-system: fuera del backup diario, crown-jewels, expected y retain;
  fuera el mount hostPath del cronjob y la fila de RESTORE.md
- monitoring: eliminado panel openclaw del dashboard homelab-overview
- n8n: openclaw y polymarket fuera del health-check (espejo del workflow vivo)
- cluster-wide/namespaces.yaml: fuera openclaw + añadidos separadores '---'
  que faltaban (el archivo era un único doc YAML donde ganaba el último ns)

Cluster ya limpio: app ArgoCD, namespace, PVC/PV, RBAC cluster-scoped y
monitor de Uptime Kuma. Backup final: ~/decommissioned/openclaw-final-2026-07-18.tar.gz

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 14:57:46 +00:00

92 lines
2.9 KiB
YAML

apiVersion: batch/v1
kind: CronJob
metadata:
name: backup
namespace: backup-system
spec:
schedule: "0 2 * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 1
jobTemplate:
spec:
# Sin reintentos automáticos: un reintento re-crea TODOS los artefactos con
# otro timestamp y la retención por número podría expulsar copias buenas.
backoffLimit: 1
activeDeadlineSeconds: 3600
template:
spec:
restartPolicy: Never
serviceAccountName: backup-sa
securityContext:
runAsUser: 0
nodeSelector:
kubernetes.io/hostname: chemavx-k8
containers:
- name: backup
# bitnami/kubectl v1.36.2 — pinneado por digest: los tags de bitnami
# en Docker Hub ya no son fiables (migración Broadcom/bitnamilegacy)
image: docker.io/bitnami/kubectl@sha256:558420daf32bbc382e3e9af4537f4073085b336ddd47399a3b70e70087115978
command: ["/bin/bash", "/scripts/backup.sh"]
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: "1"
memory: 1Gi
volumeMounts:
- name: backup-dir
mountPath: /data/backups/backups
- name: n8n-data
mountPath: /data/n8n
- name: scripts
mountPath: /scripts
- name: k3s-storage
mountPath: /var/lib/rancher/k3s/storage
- name: k3s-db
mountPath: /data/k3s-db
readOnly: true
- name: k3s-token
mountPath: /host/k3s-token
readOnly: true
- name: etc-rancher-k3s
mountPath: /host/etc-rancher-k3s
readOnly: true
- name: home-chemavx
mountPath: /host/home-chemavx
readOnly: true
volumes:
- name: backup-dir
hostPath:
path: /data/backups/backups
type: DirectoryOrCreate
- name: n8n-data
hostPath:
path: /data/n8n
type: DirectoryOrCreate
- name: scripts
configMap:
name: backup-scripts
defaultMode: 0755
- name: k3s-storage
hostPath:
path: /var/lib/rancher/k3s/storage
type: Directory
- name: k3s-db
hostPath:
path: /var/lib/rancher/k3s/server/db
type: Directory
- name: k3s-token
hostPath:
path: /var/lib/rancher/k3s/server/token
type: File
- name: etc-rancher-k3s
hostPath:
path: /etc/rancher/k3s
type: Directory
- name: home-chemavx
hostPath:
path: /home/chemavx
type: Directory