[Feature Request]: allow volumes and volumeMounts from ConfigMaps for globally or per-namespace needed files #2271
Labels
community
feature/ds-projects
Data Science Projects feature (formerly Data Science Groupings - DSG)
kind/enhancement
New functionality request (existing augments or new additions)
needs-info
Further information is requested from the reporter or from another source
priority/normal
An issue with the product; fix when possible
Feature description
In notebooks / dashboard, I'd like to mount in as a volume a file from a configmap. This might be either via odh notebook controller or odh dashboard. If via Dashboard, the filenames from which configmaps to which volumeMount targetLocation would best be specified centrally in Dashboard Admin Section. A multidimensional array maybe.
https://access.redhat.com/documentation/de-de/openshift_container_platform/4.4/html/builds/builds-configmaps#builds-configmap-creating-from-files_builds-configmaps
Why done centrally and not via the create new workbench dialog?
There are certain volumes and mounts created from configmaps that are universal to all workbenches. Example include Github config entries allowing the use of proxies or Elyra runtime config files (json) for Kubeflow Pipelines. The Git proxy setting is definitely global per cluster. The runtime config files could be potentially different, as with i.e. Airflow, there can be one or more different Airflow runtimes present per cluster in different namespaces, resulting in different entries in fields of the config file. In that case, I could imagine having a configmap in the data science project namespace that contains the needed file:
On the other hand, the possibility at GUI to have that configmap selection dropdown plus related fields (i.e. all files in data section of configmap, only certain data section entries / files, target mount location in the container) would also be okay.
Current examples that are common, context base directory always under /opt/app-root/src:
It would help tremendously mounting in the non-secret parts of the config json via a Configmap pre-rolled-out via devops in all data science projects namespaces, having some basic fields already filled out.
Current manually-created situation, need to repeat for each created Notebook / workbench. It is persistent, as the PVC location is mounted to /opt/app-root/src, but having to re-create this for all workbenches is not nice. I could hard-code it into a custom docker build, but that approach is suboptimal, too. I guess the same could be applied to i.e. Jupyter Git plugin configs, like Git plugin proxy settings and so on, that is in a file as well, which would be nice being able to mount it in.
The concept of creating volumes and referencing a configmap and getting in different items (i.e. files) under the configmap data section is explained here:
https://daein.medium.com/how-to-mount-a-specific-file-configured-in-the-configmap-into-the-pod-8b46d958ca1
Describe alternatives you've considered
Manually baking into container workbench docker image builds the files.
This means, though, having to create different container images for different files.
The solution to mount such files via configmap in the workbench namespace is more elegant.
Anything else?
Slack: https://odh-io.slack.com/archives/C0330L52N22/p1701349038086449
@andrewballantyne @harshad16
The text was updated successfully, but these errors were encountered: