feat(backup): run the three nightly backups from a pinned image with an egress allow list
monitoring/grafana-backup, forgejo/cluster-backup and sirius-growth/leadgen-backup all ran `apk add --no-cache rsync openssh-client` at container start. Every night that dialled dl-cdn.alpinelinux.org (Fastly anycast 151.101.x.132:443), which is what `egress-new-dst` kept reporting, and made the backups depend on the public internet at 03:00 UTC. - image: forgejo.siriusdevops.com/sirius/backup-tools, built in CI from python:3.12-alpine (pinned by digest) + rsync + openssh-client + bash + kubectl v1.36.4 (release sha256 verified at build). Pinned by digest in all three CronJobs, no apk in any backup path. - egress: CiliumNetworkPolicy per backup pod — cluster DNS and 10.10.0.5:22 for all three, plus kube-apiserver 6443/443 for cluster-backup only, with an explicit deny for `world` (Cilium unions namespace policies, so the allow list alone would not restrict a pod inside `forgejo`/`sirius-growth`). - monitoring gains the registry pull secret it never needed before; the job now keeps imagePullSecrets: forgejo-pull (SOPS-encrypted in git). Schedules, retention, destination paths, entrypoints and RBAC are unchanged.
This commit is contained in:
parent
d44ca50dd1
commit
0acc089dc3
10 changed files with 242 additions and 22 deletions
|
|
@ -17,6 +17,9 @@ resources:
|
|||
- rosenpass.yaml
|
||||
# Nightly consistent sqlite snapshot of Grafana's dashboards/alerts/users.
|
||||
- grafana-backup.yaml
|
||||
# Egress lockdown for that backup pod: DNS + the backup host only, so no
|
||||
# run-time package fetch (card t_9d0428d8).
|
||||
- grafana-backup-networkpolicy.yaml
|
||||
- dashboards
|
||||
# Secrets, SOPS/age-encrypted in git (decrypted by the `monitoring`
|
||||
# Kustomization; key = flux-system/sops-age). See docs/secrets-sops.md.
|
||||
|
|
@ -24,6 +27,10 @@ resources:
|
|||
- secret-grafana-secret-key.sops.yaml
|
||||
- secret-alertmanager-telegram.sops.yaml
|
||||
- secret-cluster-backup-ssh.sops.yaml
|
||||
# Registry pull credential for this namespace. Added because grafana-backup
|
||||
# now runs an image from the in-cluster Forgejo registry instead of
|
||||
# python:3.12-alpine from Docker Hub (card t_9d0428d8).
|
||||
- secret-forgejo-pull.sops.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: kube-prometheus-stack-values
|
||||
|
|
|
|||
Loading…
Reference in a new issue