Skip to content

[DO NOT MERGE] CI validation for #562 (llm-proxy behind hub)#565

Closed
fabianvf wants to merge 17 commits into
konveyor:mainfrom
fabianvf:fix-federated-idp-issuer
Closed

[DO NOT MERGE] CI validation for #562 (llm-proxy behind hub)#565
fabianvf wants to merge 17 commits into
konveyor:mainfrom
fabianvf:fix-federated-idp-issuer

Conversation

@fabianvf
Copy link
Copy Markdown
Contributor

Draft / do-not-merge. This is a scratch PR used only to run the real llm-proxy-test CI against jortel's oidc branch (#562) plus fix commits, so we can iterate to green before #562 merges.

Will be closed once #562 is green. Do not review or merge.

Refs: #562

jortel and others added 15 commits May 18, 2026 17:56
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
llm-proxy is now reached only through tackle2-hub's /services/llm-proxy
reverse-proxy endpoint. The hub validates the bearer token, enforces the
llm-proxy RBAC scope, and forwards user identity in the X-Hub-User /
X-Hub-User-Attributes headers it injects in ServiceHandler.Forward.

Operator changes:
- Hub Deployment gains LLM_PROXY_URL env (only when kai_llm_proxy_enabled),
  pointing at the cluster-internal Service URL. Hub reads this at startup
  to register the llm-proxy route in its serviceRoutes map.
- UI Deployment drops KAI_LLM_PROXY_URL; the new UI image's server-side
  proxy targets TACKLE_HUB_URL with pathRewrite /llm-proxy -> /services/llm-proxy.
- llm-proxy ConfigMap drops the oauth2_token Keycloak JWKS auth block.
  llm-proxy itself does no token validation; the namespace NetworkPolicy
  is the only barrier against in-namespace callers bypassing the hub.
  Same trust posture as kai-solution-server today.
- Renamed kai_llm_proxy_url -> kai_llm_proxy_internal_url to signal
  "only hub should call this directly".
- test-llm-proxy.sh rewritten for the new auth flow: uses HTTP Basic Auth
  against hub's seeded admin user and hits the LLM through
  /hub/services/llm-proxy/* so the test path goes through the existing
  /hub UI proxy and does not depend on the new tackle2-ui image.

Companion changes required in:
- tackle2-hub: register llm-proxy in serviceRoutes + inject X-Hub-User
  identity headers in ServiceHandler.Forward.
- tackle2-ui: server/src/proxies.js retargets /llm-proxy at TACKLE_HUB_URL
  with pathRewrite to /services/llm-proxy. (Browser use only; not needed
  for the e2e test in this PR.)

Based on PR konveyor#562 (Keycloak dependency removal / hub OIDC provider).
✨ Route llm-proxy through hub /services/llm-proxy
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d72a8e02-78b0-4985-9cff-9ba726933f3c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

fabianvf added 2 commits May 28, 2026 13:45
The "Set federated IDP issuer" set_fact guarded the conditionally-
registered rhsso_keycloak_cr / rhbk_keycloak_cr vars with `is defined`.
Those k8s_info tasks only run `when: app_profile == 'mta'`; on other
profiles they are skipped, but a skipped task still registers a result
dict that has no `.resources` key. `is defined` is True for that dict,
so the template then evaluated `.resources` and failed with
"'dict object' has no attribute 'resources'", aborting the reconcile
before any workloads were created.

Keep the `is defined` guard (short-circuits a genuinely undefined var)
and add `default([])` on `.resources` so the skipped-register case
(defined dict, missing attribute) collapses to an empty list.

Signed-off-by: Fabian von Feilitzsch <fabian@fabianism.us>
"Set app base URL from UI Ingress" (and the matching Hub OIDC issuer
task) read ui_ingress_info.resources[0].spec.rules[0].host, guarded
only by `resources | length > 0`. The default UI Ingress
(ingress-ui.yml.j2) defines a host-less rule (`- http:` with no
`host:`), so on any non-OpenShift cluster (e.g. minikube CI) the rule
exists but has no `host` key, and the template failed with
"'dict object' has no attribute 'host'", aborting the reconcile before
llm-proxy / kai-db were created.

Add a `...rules[0].host is defined` guard to both tasks so a host-less
Ingress leaves app_base_url / hub_oidc_issuer at their defaults instead
of crashing.

Signed-off-by: Fabian von Feilitzsch <fabian@fabianism.us>
@fabianvf fabianvf force-pushed the fix-federated-idp-issuer branch from d9c8aae to cbf154e Compare May 28, 2026 17:45
@fabianvf
Copy link
Copy Markdown
Contributor Author

Superseded by a new draft that also pins jortel's :oidc hub/UI images, so CI can get past the stale-image walls (stale :latest hub still loops on keycloak; :latest UI crashloops on KEYCLOAK_REALM). Reopening as a fresh draft.

@fabianvf fabianvf closed this May 28, 2026
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.

2 participants