Skip to content

fix(ocp): MLflow integration gaps on RHOAI - #1644

Merged
pdettori merged 6 commits into
rossoctl:mainfrom
pdettori:fix/mlflow-rhoai-integration-gaps
May 22, 2026
Merged

pdettori merged 6 commits into
rossoctl:mainfrom
pdettori:fix/mlflow-rhoai-integration-gaps

Conversation

@pdettori

@pdettori pdettori commented May 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Resolves multiple issues with the RHOAI MLflow integration on OpenShift:

  • Fix installer wait logic: Detect Available condition on the MLflow CR early — RHOAI never populates status.url (no Route/Ingress created), eliminating a 5-minute timeout
  • Fix ClusterRole name mismatch: Try mlflow-operator-mlflow-edit (actual RHOAI name) before falling back to mlflow-operator-mlflow-integration
  • Wire OTEL MLflow exporter: Pass otel.mlflow.enabled=true and the resolved traces endpoint during helm upgrade --reset-values
  • Fix TLS verification: Mount service-ca.crt for RHOAI MLflow TLS, add bearertokenauth/mlflow extension using projected SA token
  • Fix trace rendering: Upgrade RHOAI subscription channel from fast-3.x (3.3.1, ships MLflow 3.6.x) to stable-3.4 (3.4.0, ships MLflow 3.10.1) which includes the fix for the "Trace failed to render" UI bug (MLflow PR #20596)
  • Expose MLflow UI: Deploy OAuth proxy route for browser access to the MLflow dashboard
  • Add RHOAI MLflow docs: Document the integration setup, authentication flow, version requirements, and OTEL collector configuration differences

Root cause of trace rendering failure

RHOAI 3.3.x ships MLflow 3.6.x which has a client-side JavaScript bug: the trace detail view enters an infinite fetch loop when num_spans metadata (set by the OTLP ingestion path) does not match what the trace viewer JS expects. All API calls return 200 OK — the data is served correctly, but the JS fails to parse the span tree. Fixed in MLflow 3.10.0.

OTEL collector to RHOAI MLflow authentication

The collector uses its projected ServiceAccount token with bearertokenauth extension. MLflow kubernetes-auth plugin validates the token via Kubernetes SubjectAccessReview. TLS is verified using the OpenShift service-ca.crt (auto-injected into pods). Compression is disabled (RHOAI incompatibility) and retry is disabled (RHOAI returns JSON body with Content-Type: application/x-protobuf, causing parse errors on retry).

Fixes #1637

Test plan

  • Run installer with --with-mlflow on RHOAI cluster — no 5-min stall
  • OTEL collector configmap includes otlphttp/mlflow exporter with bearertokenauth
  • RoleBinding references mlflow-operator-mlflow-edit ClusterRole
  • Traces ingested via OTEL collector land in MLflow (POST /v1/traces 200 OK)
  • MLflow 3.10.1 running after RHOAI 3.4.0 upgrade
  • Trace detail view renders correctly in MLflow UI (user verification)

Assisted-By: Claude Code

@pdettori
pdettori force-pushed the fix/mlflow-rhoai-integration-gaps branch from 04dd4c9 to 1298be4 Compare May 22, 2026 13:29
@pdettori
pdettori marked this pull request as draft May 22, 2026 13:29
@pdettori
pdettori force-pushed the fix/mlflow-rhoai-integration-gaps branch from 1298be4 to 84856cb Compare May 22, 2026 13:38
@pdettori pdettori changed the title fix(ocp): resolve MLflow integration gaps on RHOAI fix(ocp): MLflow integration gaps on RHOAI May 22, 2026
@pdettori
pdettori marked this pull request as ready for review May 22, 2026 16:22
pdettori added 5 commits May 22, 2026 12:22
Address three issues when the OCP installer provisions MLflow via the
RHOAI operator (issue rossoctl#1637):

1. Skip the 5-minute status.url wait when the MLflow CR already reports
   Available condition — RHOAI never populates status.url since it
   doesn't create a Route/Ingress.

2. Detect the actual ClusterRole name (mlflow-operator-mlflow-edit)
   instead of the non-existent mlflow-operator-mlflow-integration.

3. Wire the OTEL collector MLflow exporter by passing otel.mlflow.enabled
   and the traces endpoint via helm upgrade with --reset-values.

Also resolves the service port dynamically from the Service object
rather than hardcoding port 5000.

Fixes: rossoctl#1637

Signed-off-by: Paolo Dettori <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Create an OpenShift Route for the RHOAI-managed MLflow service and
patch the kagenti-ui-config ConfigMap with MLFLOW_DASHBOARD_URL so the
Kagenti UI observability page shows the "Open MLflow" link.

RHOAI's MLflow operator does not create a Route, so the installer must
expose the service for external (browser) access.

Fixes: rossoctl#1637

Signed-off-by: Paolo Dettori <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
The OTEL collector's otlphttp/mlflow exporter failed with
"x509: certificate signed by unknown authority" because the
OpenShift service-ca bundle was not mounted in the RHOAI path.

Previously the trusted-ca volume was gated on
components.mlflow.enabled AND mlflow.auth.enabled (the OIDC path).
Now it also activates when otel.mlflow.enabled is true (RHOAI path).

Additionally:
- Add ca_file to rhoaiMlflowAuthConfig so the exporter references
  the mounted CA bundle
- Separate the ingress-ca volume (only needed for OIDC) from the
  trusted-ca volume (needed for both paths)
- Grant otel-collector SA the mlflow-edit role in the MLflow namespace
  so SubjectAccessReview passes for trace export

Fixes: rossoctl#1637

Signed-off-by: Paolo Dettori <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
RHOAI MLflow's TLS cert is signed by the OpenShift service-ca, which is
available in the SA projected volume at service-ca.crt. The previous
approach mounted config-trusted-cabundle (which contains public CAs, not
the service-ca) causing x509 verification failures.

Also discovered that RHOAI MLflow doesn't support gzip-compressed OTLP
payloads and returns a JSON body with Content-Type: application/x-protobuf,
causing the collector's response parser to fail and trigger infinite retries.
Fix: disable compression and retries for the RHOAI exporter.

Additionally, the installer now creates a default MLflow experiment in the
workspace namespace (required for trace ingestion) and simplifies the otel
volume mounts to only include trusted-ca/ingress-ca for the self-managed
OIDC path.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
RHOAI 3.3.x ships MLflow 3.6.x which has a client-side JS bug where
OTEL-ingested traces fail to render in the detail view ("Trace failed
to render"). The root cause is a num_spans metadata mismatch fixed in
upstream MLflow 3.10.0 (PR #20596).

RHOAI 3.4.0 (channel stable-3.4) ships MLflow 3.10.1 which includes
the fix. Update the default RHOAI subscription channel accordingly.

Also adds RHOAI MLflow integration documentation covering:
- Enabling the integration
- Authentication (SA bearer token + kubernetes-auth plugin)
- RHOAI version requirements
- OTEL collector configuration differences vs standalone MLflow

Fixes rossoctl#1637

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
@pdettori
pdettori force-pushed the fix/mlflow-rhoai-integration-gaps branch from 2acb5ef to f4a7adb Compare May 22, 2026 16:50

@huang195 huang195 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Solid, targeted fix-up of the RHOAI MLflow integration. Correctly handles the RHOAI operator's no-status.url behavior, accommodates the renamed mlflow-edit ClusterRole, and documents the version cliff at MLflow 3.10.0.

Areas reviewed: Helm/values, Shell (setup-kagenti.sh), Docs
Commits: 5, all signed-off
CI status: passing (E2E HyperShift gated on /run-e2e — normal)

Approving — the inline notes are cleanup suggestions, none blocking.

Assisted-By: Claude Code

Comment thread scripts/ocp/setup-kagenti.sh Resolved
Comment thread scripts/ocp/setup-kagenti.sh Resolved
Comment thread scripts/ocp/setup-kagenti.sh Resolved
Comment thread scripts/ocp/setup-kagenti.sh Resolved
Comment thread scripts/ocp/setup-kagenti.sh Resolved
- Simplify cookie secret generation to use full entropy from /dev/urandom
- Pre-resolve oauth-proxy image before heredoc with validation/early return
- Pass SA token via pod env var instead of argv to avoid exposure in ps
- Remove redundant `[ -n "$cr_name" ] && break` (while loop condition suffices)

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
@pdettori
pdettori merged commit 3c0ac77 into rossoctl:main May 22, 2026
25 checks passed
@github-project-automation github-project-automation Bot moved this from New /:ToDo to Done in Rossoctl Issue Prioritization May 22, 2026
@pdettori
pdettori deleted the fix/mlflow-rhoai-integration-gaps branch May 22, 2026 19:43
pdettori added a commit that referenced this pull request May 22, 2026
fix(ocp): MLflow integration gaps on RHOAI

(cherry picked from commit 3c0ac77)
eranra pushed a commit to eranra/kagenti that referenced this pull request May 24, 2026
…ration-gaps

fix(ocp): MLflow integration gaps on RHOAI
Signed-off-by: Eran Raichstein <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix(ocp): MLflow integration gaps on RHOAI

2 participants