2026-09-10 23:38:04 -04:00
|
|
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
|
|
|
kind: Kustomization
|
2026-10-27 00:12:38 -04:00
|
|
|
namespace: monitoring
|
|
|
|
|
resources:
|
|
|
|
|
- namespace.yaml
|
|
|
|
|
- repository.yaml
|
|
|
|
|
- release.yaml
|
|
|
|
|
- httproute.yaml
|
2026-10-27 00:57:39 -04:00
|
|
|
- gateway-probe.yaml
|
infrastructure(garage): commit the config, prove WG-only, split keys, back it up, scrape it
Garage was the only piece of the platform in no git repository and reachable
from more than WireGuard. This is a hardening/ownership pass, not a migration —
the container stays on the Pi.
- infrastructure/garage/: docker-compose.yml (pinned dxflrs/garage:v1.1.0,
every publish on an explicit 10.10.0.1 / 127.0.0.1 address, no 0.0.0.0),
garage.toml (rpc_secret moved to /etc/garage/garage.env, [s3_web]/3902
removed, admin API on 3903 for metrics), README (apply, state, restore,
keys, backup, metrics) and an explicit note that Flux does not apply it.
- host/garage-firewall.nft: PREROUTING priority -140 drop of 3900-3903 from
anything but lo/wg0/wg-remote. Docker's DNAT bypasses ufw's INPUT chain, so
ufw alone cannot stop a compose typo from publishing S3 on the LAN.
Measured: a 0.0.0.0:3902 publish stayed unreachable from the LAN and the
drop counter incremented.
- backup/: garage-backup.sh meta|data + systemd timers (meta hourly, data
nightly) rsyncing to [email protected]:/root/garage-backup over wg-remote.
Nothing else backs up Forgejo or the PG PVCs; that stays uncovered.
- monitoring/controllers/home/garage.yaml: Service + EndpointSlice +
ServiceMonitor for 10.10.0.1:3903 and five alerts. Target is UP.
- apps/base/siriusdevops/networkpolicy-site-egress.yaml: first policy in the
namespace. CiliumNetworkPolicy, not a k8s NetworkPolicy: 10.10.0.1 is a
cluster node (reserved:remote-node), so ipBlock 10.10.0.1/32 is inert.
Egress whitelist = TCP 3900 to a node + cluster DNS; measured 403 on 3900,
timeouts on 3900-adjacent 5000/3903, on 10.10.0.2:8080 and on the internet.
Keys: ci-push (W only, siriusdevops-media) and site-fetch (R only, same
bucket) replace the shared ci-key, which is deleted. The k8s Secret and the
two Forgejo repo secrets were repointed. No key material is in this commit.
2026-11-19 16:32:58 -05:00
|
|
|
- garage.yaml
|
2026-10-27 01:43:20 -04:00
|
|
|
- prune-alerts.yaml
|
2026-11-27 00:16:47 -05:00
|
|
|
# Flow-loss gate + material-loss alerts for the Hubble sensor (audit F10).
|
|
|
|
|
- hubble-loss-gate.yaml
|
feat(monitoring): alert on Rosenpass unit state and stalled PSK rotation
Rosenpass rotates the Link A preshared key (rpi wg0 10.10.0.1 <->
siriussec wg0 10.10.0.2) about every two minutes, but WireGuard keeps
using the last key it received: a dead or wedged exchange leaves the
tunnel up and silently non-post-quantum, with no alerting signal.
node-exporter here is distroless without the textfile collector (and
without the dbus plumbing --collector.systemd needs), so observe the
host directly:
- infrastructure/networking/rosenpass/: POSIX sh script run by a 60 s
systemd timer on rpi and siriussec that writes
/var/lib/node-exporter/textfile/rosenpass.prom. It exports
rosenpass_unit_active, rosenpass_psk_rotation_age_seconds and
rosenpass_psk_rotation_last_change_timestamp_seconds; the PSK listing
is only ever sha256'd, never logged or persisted.
- values.yaml: enable --collector.textfile.directory and mount the
hostPath (DirectoryOrCreate, so linode's node-exporter still starts).
extraArgs replaces the subchart defaults, so the two filesystem
exclusions are repeated verbatim.
- rosenpass.yaml: RosenpassDown (5 m) and RosenpassPskRotationStalled
(age > 900 s, 10 m), both warning, both with absent() arms so a
missing series alerts instead of reading as healthy.
Host units are installed out of band (see the directory README); the
GitOps side needs a merge before Prometheus loads the rules.
2026-12-03 02:16:30 -05:00
|
|
|
# Rosenpass unit-state + PSK-rotation alerts for Link A (rpi <-> siriussec).
|
|
|
|
|
# Series come from a host textfile exporter (infrastructure/networking/rosenpass/),
|
|
|
|
|
# so silently missing data is itself an alert.
|
|
|
|
|
- rosenpass.yaml
|
apps(backup): cover the remaining stateful gaps off-host
Four pieces of state were still only on the machine they run on. All four now
land on the Linode over the WireGuard mesh, in the same /root/cluster-backup
tree (or /root/pihost-backup for the Pi) with the same manifest/sha256 habit:
* monitoring/kube-prometheus-stack-grafana — new CronJob `monitoring/grafana-backup`.
The image is -distroless (no shell), so this mounts the PVC read-write and
takes a consistent copy with the sqlite backup API (PRAGMA integrity_check on
the copy), then streams it: grafana/grafana-<stamp>.db, keep 14.
* osint/osint-db — plain Postgres Deployment, so neither the CNPG primary lookup
nor CNPG_TARGETS reaches it. `forgejo/cluster-backup` gains a PG_TARGETS loop
that pg_dump -Fc's inside the pod using its own POSTGRES_USER/POSTGRES_DB
(exec-only RBAC in apps/base/osint/), sha256 checked on both sides.
* sirius-growth/sgs-leadgen-data — new CronJob `sirius-growth/leadgen-backup`,
link-dest snapshot mirror, keep 7.
* Pi /etc/wireguard + wgportal sqlite — infrastructure/wireguard/backup/,
nightly systemd timer -> [email protected]:/root/pihost-backup, keep 14.
Each tree carries its own retention, so adding artifacts cannot crowd the
Linode. Docs §8/§8.1/§8.2 record coverage, the accepted gaps (Prometheus TSDB,
camera frames, runner scratch) and the restore procedure — including the
TimescaleDB pre/post-restore calls osint needs.
2026-11-19 17:14:36 -05:00
|
|
|
# Nightly consistent sqlite snapshot of Grafana's dashboards/alerts/users.
|
|
|
|
|
- grafana-backup.yaml
|
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.
2026-12-04 00:20:34 -05:00
|
|
|
# Egress lockdown for that backup pod: DNS + the backup host only, so no
|
|
|
|
|
# run-time package fetch (card t_9d0428d8).
|
|
|
|
|
- grafana-backup-networkpolicy.yaml
|
2026-10-27 01:32:20 -04:00
|
|
|
- dashboards
|
secrets: SOPS the backup SSH key and monitoring's hand-made Secrets (F12, part 2)
Completes F12 on the objects deliberately held back until the delete-and-reconcile
drill on siriusdevops/siriusdevops-contact had proved the path works (it did:
deleted 05:29:03Z, recreated by Flux 05:29:05Z, byte-identical, pod restarted off
the recovered Secret and /health 200 — see docs/secrets-sops.md).
* cluster-backup-ssh in forgejo, sirius-growth and monitoring — three files, one
plaintext ed25519 key: a Secret cannot cross namespaces and each backup
CronJob mounts its own namespace's copy, so all three must exist and all three
must be rotated together.
* monitoring/grafana-admin, monitoring/grafana-secret-key and
monitoring/alertmanager-telegram, which are the *inputs* the prometheus-operator
and Grafana consume; the operator's rendered prometheus-*/alertmanager-* objects
stay excluded (a second writer would fight it).
* monitoring Kustomization gains the same sops decryption block as apps.
All six files were generated from the live objects and decrypt to a byte-identical
data map and type, so this apply is a no-op.
2026-11-27 00:30:22 -05:00
|
|
|
# Secrets, SOPS/age-encrypted in git (decrypted by the `monitoring`
|
|
|
|
|
# Kustomization; key = flux-system/sops-age). See docs/secrets-sops.md.
|
|
|
|
|
- secret-grafana-admin.sops.yaml
|
|
|
|
|
- secret-grafana-secret-key.sops.yaml
|
|
|
|
|
- secret-alertmanager-telegram.sops.yaml
|
|
|
|
|
- secret-cluster-backup-ssh.sops.yaml
|
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.
2026-12-04 00:20:34 -05:00
|
|
|
# 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
|
secrets: SOPS the backup SSH key and monitoring's hand-made Secrets (F12, part 2)
Completes F12 on the objects deliberately held back until the delete-and-reconcile
drill on siriusdevops/siriusdevops-contact had proved the path works (it did:
deleted 05:29:03Z, recreated by Flux 05:29:05Z, byte-identical, pod restarted off
the recovered Secret and /health 200 — see docs/secrets-sops.md).
* cluster-backup-ssh in forgejo, sirius-growth and monitoring — three files, one
plaintext ed25519 key: a Secret cannot cross namespaces and each backup
CronJob mounts its own namespace's copy, so all three must exist and all three
must be rotated together.
* monitoring/grafana-admin, monitoring/grafana-secret-key and
monitoring/alertmanager-telegram, which are the *inputs* the prometheus-operator
and Grafana consume; the operator's rendered prometheus-*/alertmanager-* objects
stay excluded (a second writer would fight it).
* monitoring Kustomization gains the same sops decryption block as apps.
All six files were generated from the live objects and decrypt to a byte-identical
data map and type, so this apply is a no-op.
2026-11-27 00:30:22 -05:00
|
|
|
|
2026-10-27 00:12:38 -04:00
|
|
|
configMapGenerator:
|
|
|
|
|
- name: kube-prometheus-stack-values
|
|
|
|
|
files:
|
|
|
|
|
- values.yaml=values.yaml
|
|
|
|
|
configurations:
|
|
|
|
|
- kustomizeconfig.yaml
|