fix(headlamp): rename OIDC secret keys to OIDC_* so chart args expand
Headlamp OIDC login failed with `unsupported protocol scheme ""`. The kubernetes-sigs/headlamp chart `envFrom`s the headlamp-oidc Secret verbatim and renders args like `-oidc-idp-issuer-url=$(OIDC_ISSUER_URL)`, so the Secret keys must be the exact env var names. The keys were camelCase (clientID/issuerURL/scopes/callbackURL/clientSecret), following the mistaken `.example`, so `OIDC_ISSUER_URL` was never defined. Kubernetes left the literal `$(OIDC_ISSUER_URL)` in the arg and Headlamp's OIDC discovery hit `Get "$(OIDC_ISSUER_URL)/.well-known/openid-configuration": unsupported protocol scheme ""`. Rename the SOPS Secret keys to OIDC_CLIENT_ID / OIDC_CLIENT_SECRET / OIDC_ISSUER_URL / OIDC_SCOPES / OIDC_CALLBACK_URL (values unchanged, still SOPS/age-encrypted). Fix the `.example` and README so the correct, load-bearing key names are documented and the camelCase footgun can't recur. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
7910128675
commit
071123ae43
4 files changed
+41
-25
No files matched your search
@@ -39,8 +39,13 @@ This keeps the apiserver OIDC config untouched (preferred over widening `--api-a
|
||||
[`../keycloak/keycloak-realm-clients.sops.yaml`](../keycloak/keycloak-realm-clients.sops.yaml)
|
||||
(`headlamp-client-secret`, injected into the realm import via the `HEADLAMP_CLIENT_SECRET`
|
||||
placeholder) and mirrored in this namespace's `headlamp-oidc-credentials.sops.yaml`
|
||||
(`clientSecret`), which the chart `config.oidc.externalSecret` envFrom's. Same cross-namespace
|
||||
(`OIDC_CLIENT_SECRET`), which the chart `config.oidc.externalSecret` envFrom's. Same cross-namespace
|
||||
mirror pattern as grafana/gitea.
|
||||
- **Key names are load-bearing.** The chart `envFrom`s this Secret verbatim, so its keys become the
|
||||
container env vars referenced by the chart's OIDC args (`-oidc-idp-issuer-url=$(OIDC_ISSUER_URL)`,
|
||||
etc.). They must be exactly `OIDC_CLIENT_ID`, `OIDC_CLIENT_SECRET`, `OIDC_ISSUER_URL`, `OIDC_SCOPES`
|
||||
(and `OIDC_CALLBACK_URL`) — **not** camelCase. A misnamed key leaves `$(OIDC_ISSUER_URL)`
|
||||
unexpanded and OIDC login fails with `unsupported protocol scheme ""`.
|
||||
|
||||
## Break-glass
|
||||
|
||||
|
||||
Reference in new issue
Block a user