Files
home-network-k3s-impl/platform/gateway
jakman85andClaude Opus 4.8 ca982864fc fix(platform): controllers/configs split so CRDs precede their CRs
Un-suspend deadlocked: the single platform Kustomization applies HelmReleases
(which register CRDs) AND custom resources of those CRDs (ClusterIssuer,
Certificate, Kyverno ClusterPolicies) in ONE pass. Flux's server-side apply
fails atomically ('no matches for kind ClusterIssuer') → nothing installs, so
the CRD-registering HelmReleases never run either. Classic ordering deadlock.

Fix (flux2 controllers/configs pattern, applies to dev+prod equally — no
R-ENV-02 divergence): add a platform-config Flux Kustomization (dependsOn
platform, wait) carrying the CRs; platform keeps only the controllers.
- New clusters/base/platform-config.yaml (path ./platform-config, substituteFrom
  cluster-vars, no decryption — no SOPS content); wired into base + apps now
  dependsOn platform-config (transitively waits for platform).
- platform-config/ references the CR files IN PLACE via ../platform/... (Flux
  builds LoadRestrictionsNone; Kyverno policies must stay under platform/kyverno/
  for the CI L0  gate). CR resources dropped from the platform
  component kustomizations (cert-manager, gateway, kyverno).
- Authored the missing Cilium L2 resources (were only a TODO): CiliumLoadBalancerIPPool
  (dev NAT 10.73.0.240-.250) + CiliumL2AnnouncementPolicy (ens*), so Gateway
  LoadBalancer listeners get a VIP. Prod range must be parameterized later.

Verified: platform build has zero CRs; platform-config build has 2 ClusterIssuers,
6 ClusterPolicies, Certificate, Gateway, both Cilium L2 CRs; dev/prod build; gate PASS.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-08-17 01:06:23 -05:00
..

platform/gateway

Gateway API (north-south ingress) implemented by Cilium + the shared HTTPS Gateway and the wildcard TLS certificate.

What this stub is

  • GatewayClass cilium — Gateway API implemented by Cilium; no separate ingress controller (ADR-0002).
  • Gateway shared — HTTPS listener on *.home.keithjackson.dev, TLS terminated with the wildcard cert. App HTTPRoutes attach cross-namespace via a namespace label + ReferenceGrant (rendered by WS-APPS from each ServiceDefinition's exposure).
  • Certificate wildcard-home — *.home.keithjackson.dev issued by ${ACME_CLUSTER_ISSUER} (staging in dev, prod in prod — R-ENV-02). Makes onboarding certificate-free (ADR-0006 default).

Contract (Issuer + Gateway TLS)

The "Issuer + Gateway TLS" interface (roadmap/workstreams.md): this Gateway + wildcard cert are what every service's HTTPRoute attaches to. ExternalDNS (../externaldns) publishes the public records for hostnames routed here. Ingress opens north-south only — it does not relax east-west default-deny (docs/09).

TODO (later phases)

  • Phase 2 (WS-NET): pin the L2-announced ingress VIP / IP pool (Cilium L2 announcement, docs/09); add the HTTP→HTTPS redirect route; confirm the cross-namespace ReferenceGrant pattern with WS-APPS.
  • Public exposure is a manual edge port-forward of 80/443 to the Gateway VIP (single SOHO router, docs/09) — a documented manual step, the analogue of the old pfSense exception.