rstudio / helm

Helm Resources for RStudio Products
MIT License
35 stars 28 forks source link

pip.conf not being mounted to session containers #423

Closed tnederlof closed 8 months ago

tnederlof commented 1 year ago

Specifying a pip.conf under in the Workbench values file like below leads to the pip.conf file being correctly mounted to /etc/pip.conf for workbench pods; however, it is not mounted to session pods.

config:
  session:
    pip.conf: |
        [global]
        index-url = https://packagemanager.posit.co/pypi/latest/simple
        trusted-host = packagemanager.posit.co

The config shows up in the rstudio-workbench-session ConfigMap: image

On the Workbench container under Mounts:

    Mounts:
      /etc/pip.conf from rstudio-session-config (rw,path="pip.conf")
      /etc/rstudio from etc-rstudio (rw)
      /etc/rstudio-licensing from license-file (rw)
      /home from rstudio-home-storage (rw)
      /mnt/configmap/rstudio/ from rstudio-config (rw)
      /mnt/job-json-overrides-new from rstudio-job-overrides-new (rw)
      /mnt/rstudio-server-shared-storage from rstudio-shared-storage (rw)
      /mnt/secret-configmap/rstudio/ from rstudio-secret (rw)
      /mnt/session-configmap/rstudio/ from rstudio-session-config (rw)
      /scripts/ from rstudio-prestart (rw)
      /startup/base from rstudio-rsw-startup (rw)
      /startup/custom from rstudio-custom-startup (rw)
      /startup/launcher from rstudio-launcher-startup (rw)
      /startup/user-provisioning from rstudio-user-startup (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-wd4g (ro)

On the Session container under Mounts:

    Mounts:
      /home from mount0 (rw)
      /mnt/session-configmap/rstudio from session-config (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-daw45 (ro)
tnederlof commented 1 year ago

After reviewing the templates it looks like the following values have to be set for it to mounted in the session pods. Since mounting pip.conf is really needed in the session containers could we make this default true or find another way to make it so it just works for users without having to know about this setting?

launcher:
  useTemplates: true
atheriel commented 1 year ago

It seems like an oversight that pip.conf wouldn't be mounted if defined. I think we should do so regardless of the value of useTemplates.