Skip to content

Conversation

krishanbhasin-px
Copy link

@krishanbhasin-px krishanbhasin-px commented Aug 29, 2025

Description of your changes:
This PR will add a new configuration option for Kubeflow to optionally disable the ability to upload pipelines to the "shared" space (achieved by setting namespace to None/"").

This config will default to the same behaviour as right now (allowing shared pipelines) so this should not be a breaking change for existing users.

I was curious about the possibility of even doing this which is why I started drafting the code change up front.

I have now opened this PR early to share the idea; if you are open to merging this change I can implement the relevant tests and any other bits that are needed in order to get this in.

I summarised the problem I am trying to solve with this in the CNCF Slack group; I've copied the important bits below:

problem statement

I'm working in an environment where we want to deploy Kubeflow in a multi-tenant way; where I can isolate access to each tenant based on the authorisation of the logged in user.
For example I have a single Kubeflow instance, with 3 tenants that need to use it - "Project A", "Project B", and "Project C".

Alice and Alex work on A, Bob works on B, and Charlie works on C. Users that work on a particular project should not have access to resources for an other project.

To implement this, I have created KubeFlow Profiles for "Proj-A", "Proj-B", and "Proj-C". As the notebook instances within those profiles don't have access controls (and after reading previous threads on this matter), I have also created "child" profiles for each of my users - "Alice-A", "Alex-A", "Bob-B", "Charlie-C". So Alice has access to "Proj-A" and "Alice-A" (and the rest follow similarly)

I had hoped to have each user work in notebooks in their private profiles and, once they have created a pipeline that they think is worth using longer-term, they "publish" it to the project's main profile.

In my testing of this setup I have realised that:

  1. I can't find a way to allow a notebook in profile "Alice-A" to upload/publish a pipeline to "Proj-A"'s private pipeline space
    • I solved this with the kind guidance of Julius von Kohout
  2. They can upload to the Shared space (by setting namespace=None in the upload API call), but unfortunately, any profile in the kubeflow instance can access them - I want to avoid this possibility (whether done by accident or otherwise).

Checklist:

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 assign hbelmiro for approval. 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

Copy link

Hi @krishanbhasin-px. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

🚫 This command cannot be processed. Only organization members or owners can use the commands.

@krishanbhasin-px krishanbhasin-px force-pushed the conditionally-disable-shared-pipelines branch from d1f2af9 to b17f453 Compare August 29, 2025 12:41
@krishanbhasin-px krishanbhasin-px marked this pull request as ready for review August 29, 2025 12:41
@google-oss-prow google-oss-prow bot requested a review from rimolive August 29, 2025 12:41
@rimolive
Copy link
Member

rimolive commented Sep 2, 2025

/ok-to-test

@rimolive
Copy link
Member

rimolive commented Sep 2, 2025

@krishanbhasin-px Please rebase your PR

Copy link

github-actions bot commented Sep 2, 2025

Approvals successfully granted for pending runs.

@krishanbhasin-px krishanbhasin-px force-pushed the conditionally-disable-shared-pipelines branch from b17f453 to 136f4ea Compare September 2, 2025 14:58
@krishanbhasin-px krishanbhasin-px force-pushed the conditionally-disable-shared-pipelines branch from 136f4ea to 0e5f9ce Compare September 2, 2025 16:49
@HumairAK
Copy link
Collaborator

HumairAK commented Sep 3, 2025

@krishanbhasin-px thanks for the pr, could you address the ci failures? feel free to ping me in slack for another look if I miss the re-review

@krishanbhasin-px
Copy link
Author

@HumairAK happily! Can I take this as confirmation that you/the team is happy with the intent of this PR? I wanted to get a confirmation before I put time into preparing it 'properly'

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