Skip to content

Conversation

@lucferbux
Copy link
Contributor

@lucferbux lucferbux commented Dec 1, 2025

Description

Implement extension mechanism in bff so we can override code in other codebases.

How Has This Been Tested?

Add a new extension folder with docs to know how to enable it.

Merge criteria:

  • All the commits have been signed-off (To pass the DCO check)
  • The commits have meaningful messages
  • Automated tests are provided as part of the PR for major new functionalities; testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work.
  • Code changes follow the kubeflow contribution guidelines.
  • For first time contributors: Please reach out to the Reviewers to ensure all tests are being run, ensuring the label ok-to-test has been added to the PR.

If you have UI changes

  • The developer has added tests or explained why testing cannot be added.
  • Included any necessary screenshots or gifs if it was a UI change.
  • Verify that UI/UX changes conform the UX guidelines for Kubeflow.

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from lucferbux. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

- Added a new function `NewKubernetesClientFactory` to handle client creation based on authentication method.
- Introduced a new markdown file for documenting BFF handler extensions for downstream builds.
- Implemented handler overrides for Model Registry Settings to support Red Hat-specific behavior.
- Created a new repository for Model Registry Settings with Kubernetes integration.
- Added methods for CRUD operations on Model Registry settings, including handling database secrets.
- Implemented conversion functions for unstructured Kubernetes objects to strongly typed models.
- Ensured that all new functionality adheres to existing interfaces and maintains backward compatibility.

feat: adapt the code to upstream

Signed-off-by: lucferbux <[email protected]>
"program": "${workspaceFolder}/bin/bff",
"args": [
"--port=4000",
"--auth-method=user_token_red_hat",
Copy link
Contributor

Choose a reason for hiding this comment

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

should this red hat specific arg be present upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nah, I guess I can drop this entirely to be honest, and we no longer have that, great catch.

Comment on lines +14 to +17
- **Downstream-only artifacts** live under `clients/ui/bff/internal/<override-folder>` (and sibling vendor folders, if they are ever added). Any logic that assumes Red Hat credentials, namespaces, or controllers must stay here so other distributions do not pick it up accidentally.
- **Shared interfaces** (for example repository interfaces or the handler override registry itself) stay upstream. Only implementers that are specific to a vendor move downstream.

Use this rule of thumb: if a change requires Red Hat-only RBAC, Kubernetes resources, or APIs that are invisible to open-source users, keep it downstream. Everything else should be proposed upstream.
Copy link
Contributor

Choose a reason for hiding this comment

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

References to Red Hat and the downstream here as well, should these not be in upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agh, yup, not sure what I was thinking here, thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants