Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to configure available storage classes #1270

Closed
andrewballantyne opened this issue May 19, 2023 · 6 comments
Closed

Ability to configure available storage classes #1270

andrewballantyne opened this issue May 19, 2023 · 6 comments
Labels
feature/adminui Admin UI Feature feature/ds-projects Data Science Projects feature (formerly Data Science Groupings - DSG) migrated tracker Non-completable ticket; used for tracking work - akin to a Jira Epic

Comments

@andrewballantyne
Copy link
Member

andrewballantyne commented May 19, 2023

Support multiple storage classes for PVCs (Cluster Storages) in the Projects view.

Mocks: https://www.sketch.com/s/f6fa37fc-0c25-49e3-8b24-ecaf981433a8/a/g1rOAvJ

Using feature branch f/storage-class

Dependencies

Foundational Work

P0: Admins must be able to configure which storage classes should be available for users

  • Must be able to configure storage classes other than the OpenShift default.
  • Must be able to configure a 'default' storage for RHODS. This does not have to be the OpenShift default.
  • Must be able to configure the name of the storage class as it should appear for users if exposed in the end user UI. Note: per Guillaume's comment below, the end user UI should show the admin configured display name as well as the real name. 

P0: Users should be able to select from available storage classes based on admin config when creating workbenches or NB serving sessions

  • If only 1 storage class available, the UI should not present an option for users (since the one available will always be used).
  • If more than 1 available, the UI should start with default configured by admin, but users should be able to select any of the available options.
@andrewballantyne andrewballantyne added feature/ds-projects Data Science Projects feature (formerly Data Science Groupings - DSG) tracker Non-completable ticket; used for tracking work - akin to a Jira Epic feature/adminui Admin UI Feature labels May 19, 2023
@shalberd
Copy link
Contributor

shalberd commented Jun 8, 2023

For listing available storage classes, you might need more than Clusterrole Admin. There is a ClusterRole basic-user that can list users and storageclasses. Especially for showing which users already have access to the project in project sharing, that might be good as well. https://docs.openshift.com/container-platform/4.10/authentication/using-rbac.html

If you go with the approach "Admins must be able to configure which storage classes should be available for users", then you do not need the storageclass list rights, that'd be easier. Nice idea with the ability to pick from multiple available storage classes, if defined. Makes the solution more flexible in comparison to the current jupyter tile approach with one storageclass globally.

I can't access the GUI sketches, but that is ok.

@andrewballantyne When you talk about default storage class, do you mean default storage class set at cluster-level or default storage class set in ODHDashboardConfig? There are clusters that have no default storage class, but you can still configure a default storage class for ODH Notebook PVC purposes via ODHDashboardConfig.

Even if there is a default storage class set in ODHDashboardConfig, you should still show the list of available storageclasses, with the focus in e.g. a dropdown on the default one.

Flow could be:

  • check if there is a default storage class at cluster-level. If available, take that one as ODH Default.
  • check if there is a default storage class at ODHDashboardConfig level. Use that one if it is different from cluster default storage class or if no cluster default storage class exists.
  • put focus on default storageclass, as resolved in the first two steps, in GUI list, but with the option to still change to a different one on a workbench-by-workbench basis.

@andrewballantyne
Copy link
Member Author

@shalberd as I understand it, all users can list storage classes (I tested this on my cluster with a basic user -- it was a while ago though). After listing, there is nothing else happening around storage class resources. We are not allowing creation, deletion or editing of the resource itself. We'll need to manage the metadata way from the storage class as this is a cluster resource that the admin probably shouldn't be marking up for our application use-case (a cluster could have multiple use-cases ongoing).

TBD if we use a CRD or some configmap setting / OdhDashboardConfig setting -- but we will need to store in an "enabled state", description and a display name for the end-user (data scientists). That'll be figured out part of this effort once @lucferbux starts flushing it out over the next week or two.

@shalberd
Copy link
Contributor

shalberd commented Jun 11, 2023

all users can list storage classes

Yes

The clusterrole basic-user

openshifthostname/k8s/cluster/clusterroles/basic-user can list storageclasses, which is nice.
Bildschirmfoto 2023-06-11 um 20 47 35

Any authenticated / logged-in user is assigned clusterole basic-user, so it's cool.

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: basic-users
  annotations:
    rbac.authorization.kubernetes.io/autoupdate: 'true'
subjects:
  - kind: Group
    apiGroup: rbac.authorization.k8s.io
    name: 'system:authenticated'
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: basic-user

We'll need to manage the metadata way from the storage class as this is a cluster resource that the admin probably shouldn't be marking up for our application use-case.

Correct, our cluster has like 20 or more different storageclasses for all kinds of purposes. They cannot be tagged or annotated in any way, but people in an enterprise can pick the right one for their purposes themselves. I picked one with file storage instead of block storage for notebook storage purposes, but that is dependent on the environment (AWS, Azure, on-prem with e.g. NetApp) entirely. The most i would recommend on the GUI is having a hint as to what kind of storage type (block vs file) you would recommend from all the storageclasses listed, users can pick the right one themselves by name usually.

@andrewballantyne
Copy link
Member Author

Another good note about something we should support with Storage Classes when we do this feature.

@dgutride
Copy link
Contributor

dgutride commented Dec 5, 2023

Migrated to jira: https://issues.redhat.com/browse/RHOAIENG-332

@dgutride
Copy link
Contributor

Moving to closed - future work will be tracked in Jira

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/adminui Admin UI Feature feature/ds-projects Data Science Projects feature (formerly Data Science Groupings - DSG) migrated tracker Non-completable ticket; used for tracking work - akin to a Jira Epic
Projects
Status: Done
Archived in project
Status: Dashboard
Development

No branches or pull requests

4 participants