[DO NOT MERGE] CI validation for #562 (llm-proxy behind hub)#565
[DO NOT MERGE] CI validation for #562 (llm-proxy behind hub)#565fabianvf wants to merge 17 commits into
Conversation
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
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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>
d9c8aae to
cbf154e
Compare
|
Superseded by a new draft that also pins jortel's |
Draft / do-not-merge. This is a scratch PR used only to run the real
llm-proxy-testCI against jortel'soidcbranch (#562) plus fix commits, so we can iterate to green before #562 merges.main, so the diff shows all of ✨ Keycloak dependency removed. #562 + our fixes — that's expected; this mirrors what ✨ Keycloak dependency removed. #562's own CI runs.jortel:oidc, which feeds ✨ Keycloak dependency removed. #562.Will be closed once #562 is green. Do not review or merge.
Refs: #562