homek8s/apps/base/customer1/kustomization.yaml
Lance Walters 69b003705c infra(netpol): default-deny ingress+egress for the six app namespaces
Audit F3 / A5-1. Every pod in customer1, osint, sirius-growth, piedmont,
siriusdevops and forgejo was reachable from every other pod, from the API
server, from the internal WireGuard-only Gateway ports on 10.10.0.2 and from
the internet.

- each namespace: a stock NetworkPolicy 'default-deny' (podSelector {},
  Ingress+Egress, no rules) plus a CiliumNetworkPolicy allow that names the
  gateway/kubelet/health entities, same-namespace pods, cluster DNS and only
  the egress each workload actually uses (world for Telegram/news/inference,
  remote-node :3900 for Garage, :22 for the backup rsync, kube-apiserver :6443
  where CNPG/kubectl needs it, none at all for customer1)
- siriusdevops: replaces the egress-only siriusdevops-site-egress CNP
- customer1: ResourceQuota + LimitRange sized from the declared 1-replica
  shape (35Gi already bound, 2 CPU / 4Gi requests) - the sandbox stays parked
- docs/network-isolation.md: the model plus the five gotchas measured while
  landing it (both-ends enforcement, kube-apiserver identity covering the
  whole node IP, remote-node vs world for Garage, ingress vs host identity)
2026-11-27 02:19:10 -05:00

35 lines
1.6 KiB
YAML

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
# Secrets are reconciled by Flux from the secret-*.sops.yaml files in this
# directory (SOPS/age; decrypted by the `apps` Kustomization):
# customer1/pg-app basic-auth, postgres superuser
# customer1/pg-users odoo/metabase/metabase_ro role passwords
# customer1/odoo-config admin_passwd (database master password)
# customer1/odoo-admin email, password (web admin login)
# customer1/metabase-admin email, password (Metabase's own login)
# customer1/metabase-data-source-creds username=metabase_ro + password
# customer1/metabase-secret-key MB_ENCRYPTION_SECRET_KEY
# Only ciphertext is committed; the age private key is not in git.
- postgres-init.yaml
- postgres.yaml
- odoo-init.yaml
- odoo.yaml
- metabase.yaml
- backup.yaml
- httproute.yaml
# Default-deny ingress+egress + the tenant's allow list (audit F3 / t_fed52919).
- networkpolicy.yaml
# Tenant guardrails sized from the declared 1-replica shape (same card).
- quota.yaml
# 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-pg-app.sops.yaml
- secret-pg-users.sops.yaml
- secret-odoo-config.sops.yaml
- secret-odoo-admin.sops.yaml
- secret-metabase-admin.sops.yaml
- secret-metabase-data-source-creds.sops.yaml
- secret-metabase-secret-key.sops.yaml