Skip to content

ODH-ADR-ML-0002: Shared workspace for cross-namespace resource sharing in MLflow - #137

Merged
ederign merged 4 commits into
opendatahub-io:mainfrom
etirelli:adr-ml-0002-shared-workspace-resource-sharing
May 27, 2026
Merged

ODH-ADR-ML-0002: Shared workspace for cross-namespace resource sharing in MLflow#137
ederign merged 4 commits into
opendatahub-io:mainfrom
etirelli:adr-ml-0002-shared-workspace-resource-sharing

Conversation

@etirelli

@etirelli etirelli commented May 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds ODH-ADR-ML-0002 formalizing the architecture for designating a global MLflow namespace to share resources (starting with prompts) across all GenAI Studio users.
  • Documents decisions from the Shared MLflow Workspace Architecture Discussion (May 19, 2026): dashboard config as source of truth, Auth CR controller manages RoleBindings via label watching, SSAR security gate, prompt API centralization in MLflow BFF, user token-based access (no ServiceAccount bypass).
  • Dashboard UI scoped to a single global namespace initially; underlying infrastructure (labels + Auth CR controller) supports multiple namespaces without restriction.
  • Four alternatives analyzed: multi-namespace UI from start (deferred), label-only (rejected), ServiceAccount fetch (rejected), copy-per-workspace (rejected).

Related

Test plan

  • Architecture stakeholders review ADR content and stakeholder table
  • Verify alignment with RHAISTRAT-1750 strategy document
  • Confirm Auth CR controller / RoleBinding mechanism with platform team

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added an Architecture Decision Record describing a shared MLflow workspace for cross-environment resource sharing, including UI scope, lifecycle and graceful-degradation behavior, RBAC/security and privacy considerations, stakeholder impact, risk analysis, and guidance for future multi-namespace support.

…aring

Formalizes the architecture for designating a global MLflow namespace
to share resources (starting with prompts) across GenAI Studio users.

Key decisions: dashboard config as source of truth, Auth CR controller
manages RoleBindings via label watching, SSAR security gate, prompt API
centralization in MLflow BFF, user token-based access.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@etirelli
etirelli requested a review from a team as a code owner May 24, 2026 22:43
@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@etirelli, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 58 minutes and 18 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 485aa0c8-7539-4f5c-adf9-ba4c6492df1d

📥 Commits

Reviewing files that changed from the base of the PR and between 110e3f8 and 90e894f.

📒 Files selected for processing (1)
  • architecture-decision-records/mlflow/ODH-ADR-ML-0002-shared-workspace-for-cross-namespace-resource-sharing.md
📝 Walkthrough

Walkthrough

This pull request adds a new Architecture Decision Record that specifies a cluster-scoped global MLflow workspace for sharing MLflow prompts/resources across OpenShift namespaces. The ADR defines the control flow (Dashboard cluster setting → Auth CR controller provisioning RoleBindings → MLflow BFF serving prompts to GenAI Studio using requester tokens), initial single-namespace UI scope, namespace lifecycle and graceful degradation behaviors, centralization of the prompt API in the MLflow package, security/privacy considerations, rejected alternatives, stakeholder impacts, references, and a reviews table.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly references the ADR document name and accurately captures the primary change: adding a new Architecture Decision Record for MLflow shared workspace functionality across namespaces.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

- It supports GitOps workflows — administrators can label namespaces via declarative configuration, and the controller reacts to label changes regardless of how they are applied.
- It is architecturally consistent with how RoleBindings for other RHOAI projects are already managed.

When the global namespace is changed, the dashboard removes the label from the previous namespace and labels the new one. The Auth CR controller detects both changes and creates RoleBindings in the new namespace and removes them from the previous one.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is there a dashboard controller that watches the dashboard config? Is that the platform operator?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't believe there is active reconciliation of the config at the moment. @ederign ?

@mprahl mprahl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I left a couple comments but they are not blocking from the core MLflow side.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@architecture-decision-records/mlflow/ODH-ADR-ML-0002-shared-workspace-for-cross-namespace-resource-sharing.md`:
- Around line 109-110: The Auth CR controller currently acts on namespace label
changes (e.g., "global-mlflow-workspace") regardless of source; update the
reconciliation in the Auth CR controller (the reconcile/OnUpdate handler that
provisions RoleBindings) to first verify authority via the dashboard-config
(call/check the DashboardConfig/ConfigMap entry that enumerates approved
namespaces and require a successful SSAR-like authorization check) and
ignore/quarantine any label changes on namespaces not listed in that config; in
practice modify the label-change path in the controller to: 1) fetch dashboard
config, 2) validate the namespace is authorized for shared-workspace labels, and
3) skip/provide a quarantine log entry (no RoleBinding provisioning) for labels
applied outside the configured set so provisioning cannot be triggered by
out-of-band CLI/console/GitOps changes.
- Around line 53-94: The fenced diagram block in
ODH-ADR-ML-0002-shared-workspace-for-cross-namespace-resource-sharing.md is
missing a language tag and triggers markdownlint MD040; update the opening fence
for the ASCII diagram (the triple-backtick before the cluster diagram) to
include a language identifier such as text (i.e., change ``` to ```text) and
keep the closing ``` unchanged so the fenced block is properly tagged for
markdownlint.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 8cb2a8e7-7dcf-4239-abdc-d285ba52c6ab

📥 Commits

Reviewing files that changed from the base of the PR and between 423c1f6 and 451380e.

📒 Files selected for processing (1)
  • architecture-decision-records/mlflow/ODH-ADR-ML-0002-shared-workspace-for-cross-namespace-resource-sharing.md

Make explicit that authenticated users receive mlflow-view in the global namespace so they can discover and use shared prompts, while RHOAI administrators receive both mlflow-view and mlflow-edit for managing shared resources.

Signed-off-by: Edson Tirelli <etirelli@redhat.com>
@etirelli
etirelli force-pushed the adr-ml-0002-shared-workspace-resource-sharing branch from 451380e to 2804eaa Compare May 27, 2026 09:12
etirelli added 2 commits May 27, 2026 07:35
Fix markdownlint MD040 by tagging the ASCII architecture diagram code fence.

Signed-off-by: Edson Tirelli <etirelli@redhat.com>
Signed-off-by: Edson Tirelli <etirelli@redhat.com>

@ederign ederign 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.

/approve
/lgtm

@ederign
ederign merged commit f08c4d6 into opendatahub-io:main May 27, 2026
1 check passed
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.

3 participants