feat(platform): make the app-config file authoritative (PLT-475 PR-2)#403
Conversation
Drops the transitional env fallback established in PR-1 (#402): infra config now comes solely from the mounted app-config file. - platform.Load reads infra fields straight from FileConfig (no fileOrEnv); gateway fields stay env-sourced (pending PLT-451). The migrated env-name constants are removed. - Config.Validate reports the file key for infra fields (no "or SEI_*"), and now also requires images.cosmosExporter (previously validated lazily at pod-build). - config/manager/manager.yaml drops the migrated infra env vars; gateway + SEI_CONTROLLER_CONFIG remain. - CLAUDE.md + docs/controller-app-config.md updated to "file-authoritative". - Tests rewritten for file-authoritative behavior (file sourced, infra env ignored, missing field fails Validate, gateway from env). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Platform + kubernetes lenses flagged stale env references now that infra config is file-authoritative: - docs/controller-app-config.md: drop the per-key # SEI_* annotations and the "env-var fallback" framing; the file is the source. - README.md: Platform Configuration section now points at the app-config file (was "reads all settings from environment variables"). - noderesource.go: kubeRBACProxy/cosmosExporter "not configured" errors name the file key, not the removed env var. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR SummaryHigh Risk Overview
Deploy gate: environments must have a complete Reviewed by Cursor Bugbot for commit 056102a. Bugbot is set up for automated code reviews on this repo. Configure here. |
What
PR-2 of PLT-475 — makes the mounted app-config file authoritative, dropping the transitional env fallback from #402.
platform.Loadreads infra straight fromFileConfig(nofileOrEnv); gateway staysos.Getenv(pending PLT-451). Migrated env-name constants removed.Config.Validatereports the file key for infra fields, and now requiresimages.cosmosExporter.config/manager/manager.yamldrops the migrated infra env vars;SEI_GATEWAY_*+SEI_CONTROLLER_CONFIGremain.CLAUDE.md,docs/controller-app-config.md,README.md) +noderesource.goerror strings updated to file-authoritative; dead# SEI_*infra references scrubbed.Validate, gateway from env.images.cosmosExporteris newly boot-required. Previously it failed lazily at first node pod-build (noderesource); nowValidaterequires it at startup. Strict improvement (fail-fast — the cosmos-exporter container is on every pod), but any environment whose ConfigMap omits it will crashloop. The deploy gate covers this field too.ConfigMap handoff
The infra values previously in
manager.yamlmust be in the GitOpssei-controller-configConfigMap before deploy (schema:docs/controller-app-config.md). Repo-base defaults that were removed:(env-specific values come from platform-repo overlays; these are repo-base defaults.)
Cross-review (4 lenses, clean)
platform / security / kubernetes / idiom all COMPATIBLE. Resolved findings folded in: scrubbed the dead
# SEI_*doc/error references (platform + kubernetes), confirmed file-authoritative strictly narrows the trust surface and all failure modes fail closed (security), confirmed thecosmosExporterfold-in is a strict improvement with no test/path regressing (kubernetes).UnmarshalStrict— decided: stay lenient.ReadFileConfigis shared with the per-reconcile state-sync read; strict there would break state-sync hot-reload on controller/ConfigMap version skew, and strict-at-startup only improves error text over aValidatefailure you already get. A startup-only warn (non-fatal) is a possible fast-follow if config typos cause real friction — deferred.🤖 Generated with Claude Code