fix(flux): move oauth2-proxy to a post-platform tier (dependsOn platform-config)
oauth2-proxy is a leaf forward-auth service that depends on Keycloak + trusted wildcard TLS + split-horizon DNS. It lived in the gating `platform` Flux Kustomization (wait:true), so on a cold start it Failed until those dependencies existed, keeping the whole `platform` tier not-Ready. That in turn blocked `platform-config` — which brings up the very Keycloak instance, wildcard Certificate and L2 VIP oauth2-proxy needs (and previously carried oauth2-proxy's own httproute/servicemonitor) — from ever reconciling. A self-gating cold-start deadlock, twice-proven (DECISIONS-LOG sessions 7 & 9). Break the cycle by moving the whole oauth2-proxy component out of the `platform` tier into its own non-gating post-platform Flux Kustomization: - clusters/base/oauth2-proxy.yaml: new Kustomization -> ./platform/oauth2-proxy, dependsOn platform-config, wait:false, substituteFrom cluster-vars. - clusters/base/kustomization.yaml: reference the new Kustomization. - platform/kustomization.yaml: drop the oauth2-proxy component (no longer in the gating tier). - platform/oauth2-proxy/kustomization.yaml: pull in httproute + servicemonitor so the full component travels together. - platform-config/kustomization.yaml: drop the in-place oauth2-proxy httproute/servicemonitor refs (moved with the controller). - clusters/dev/kustomization.yaml: add the SOPS decryption patch for the new oauth2-proxy Kustomization (it now owns the encrypted credentials Secret that the `platform` Kustomization used to decrypt). Now `platform` reaches Ready without oauth2-proxy; platform-config brings up Keycloak/TLS/DNS; then oauth2-proxy reconciles against dependencies that already exist. wait:false guarantees its health can never gate anything above it. No config of oauth2-proxy itself changed — only its reconciliation tier. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
d34c639269
commit
960cab937b
6 files changed
+81
-9
No files matched your search
@@ -57,10 +57,10 @@ resources:
|
||||
- ../platform/keycloak/k8s-oidc-rbac.yaml # maps OIDC groups -> cluster roles (kubectl SSO RBAC)
|
||||
- ../platform/keycloak/httproute.yaml
|
||||
- ../platform/keycloak/servicemonitor.yaml
|
||||
# oauth2-proxy: forward-auth sign-in/callback ingress + ServiceMonitor (Gateway API / monitoring CRs).
|
||||
# Re-enabled together with the platform/oauth2-proxy component now Keycloak is live and split-horizon
|
||||
# DNS resolves to the Proxmox Gateway VIP (192.168.1.53).
|
||||
- ../platform/oauth2-proxy/httproute.yaml
|
||||
- ../platform/oauth2-proxy/servicemonitor.yaml
|
||||
# oauth2-proxy: forward-auth httproute + ServiceMonitor MOVED OUT of platform-config. They now
|
||||
# travel with the oauth2-proxy controller in its own post-platform Flux Kustomization
|
||||
# (clusters/base/oauth2-proxy.yaml, dependsOn platform-config). Keeping them here — while the
|
||||
# controller sat in the gating `platform` tier — was one half of the twice-proven cold-start
|
||||
# deadlock (platform never Ready -> platform-config never reconciles -> these never apply).
|
||||
# monitoring SSO proof: Grafana native-OIDC login ingress (Gateway API CR)
|
||||
- ../platform/monitoring/grafana-httproute.yaml
|
||||
Reference in new issue
Block a user