Skip to content

fix(rbac): derive HUB_EXTERNAL_URL via the hubExternalURL helper#186

Open
tylerpotts wants to merge 1 commit into
mainfrom
fix-hub-external-url-derivation
Open

fix(rbac): derive HUB_EXTERNAL_URL via the hubExternalURL helper#186
tylerpotts wants to merge 1 commit into
mainfrom
fix-hub-external-url-derivation

Conversation

@tylerpotts

Copy link
Copy Markdown
Contributor

Fixes #185.

Problem

The RBAC bootstrap Job renders HUB_EXTERNAL_URL from .Values.nebariapp.hostname directly, unlike every other consumer which goes through the hubHostname/hubExternalURL helpers (deriving hub.<base-domain> from keycloak.hostname). On zero-config deploys the env var renders as https://; the script's rstrip('/') reduces it to https:, which passes the if not hub_external_url guard, and Keycloak 400s the hub client-URL reconcile — the Job crashloops on every deployment that relies on hostname derivation (observed on a Hetzner k3s deployment; log signature reconciling hub client URLs (rootUrl='https:', ...)).

Fix

One line: default to include "nebari-data-science-pack.hubExternalURL" . | trimSuffix "/" instead of printf "https://%s" .Values.nebariapp.hostname. The helper returns empty when no hostname is derivable, so the script's skip-guard actually engages.

Rendering matrix (verified with helm template)

values before after
keycloak.hostname only https:// -> 400 crashloop https://hub.<base-domain>
explicit nebariapp.hostname https://<hostname> unchanged
explicit rbac.bootstrap.hubExternalUrl wins unchanged (still wins)
no hostname derivable n/a chart already fails render with its existing clear error; with nebariapp.enabled=false the Job is not rendered at all

helm lint passes.

The bootstrap job rendered HUB_EXTERNAL_URL from nebariapp.hostname
raw, unlike every other consumer, which goes through the hubHostname /
hubExternalURL helpers (deriving hub.<base-domain> from
keycloak.hostname). On zero-config deploys the env var therefore
rendered as 'https://'; the script's rstrip('/') reduced it to
'https:', which passed the if-not-hub_external_url guard, and Keycloak
400'd the hub client-URL reconcile - crashlooping the Job on every
deployment that relies on hostname derivation.

Fixes #185
@tylerpotts
tylerpotts requested review from aktech and pmeier as code owners July 20, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RBAC bootstrap job crashloops on zero-config deploys: HUB_EXTERNAL_URL renders 'https://' when nebariapp.hostname is derived

2 participants