homek8s/apps/base/siriusdevops/kustomization.yaml

16 lines
576 B
YAML
Raw Normal View History

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- deployment-site.yaml
- deployment-api.yaml
- service-site.yaml
- service-api.yaml
- httproute.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
- networkpolicy-site-egress.yaml
secrets: bring 29 hand-made cluster Secrets under Git via SOPS/age (audit F12) Nothing in the cluster was reconciled from the repo: 67 hand-made Secrets and no managed Secret at all, so a restore of this Git tree produced a cluster that would not start. This commits the first-party ones as SOPS/age ciphertext and enables Flux's sops decryptor. * provider: SOPS + age (chosen over SealedSecrets: Flux already ships the sops decryptor, so no extra controller/CRD, and the age key is escrowed off-cluster). * 29 Secrets across forgejo, siriusdevops, piedmont, sirius-growth, osint, metabase and customer1, as apps/base/<ns>/secret-<name>.sops.yaml with encrypted_regex ^(data|stringData)$ — names/namespaces stay reviewable. * each file was generated from the LIVE object and decrypts to a byte-identical data map and type, so the first apply is a no-op (not a rotation). * the CNPG bootstrap secrets (forgejo-pg-app, pg-app, sirius-growth-portal-db) are ours, not operator output — bootstrap.initdb.secret points at them, so a rebuild has no application password without them. * forgejo-pull is included despite docs/registry-pull-auth.md calling it out-of-band: with imagePullSecrets on every workload it is the one Secret whose absence stops the whole cluster from pulling images. * .gitignore keeps **/*secret*.yaml ignored and re-includes only .sops.yaml, so a plaintext Secret still cannot be committed; age.agekey stays ignored. * excluded on purpose (controller/helm-owned): CNPG *-server/*-replication/*-ca, cnpg-system CA+webhook, cert-manager webhook CA, cilium/hubble certs, helm release records, prometheus-operator rendered prompts. Full table in docs/secrets-sops.md. Key locations (never in git): Secret flux-system/sops-age (age.agekey) and /root/sops/homek8s-age.key on the Linode, reached only over the mesh.
2026-11-27 00:17:47 -05:00
# Secrets, SOPS/age-encrypted in git. Flux decrypts them (the `apps`
# Kustomization carries a decryption block; key = flux-system/sops-age).
# Never add a plaintext Secret next to these — see docs/secrets-sops.md.
- secret-forgejo-pull.sops.yaml
- secret-garage-media-s3.sops.yaml
- secret-siriusdevops-contact.sops.yaml