Skip to content

fix(connect): propagate sharedStorage.subPath to launcher-managed job volumeMounts#776

Merged
dbkegley merged 5 commits intomainfrom
kegs-fix-connect-propagate-sharedStorage-subPath-to-job-volumeMounts
Feb 11, 2026
Merged

fix(connect): propagate sharedStorage.subPath to launcher-managed job volumeMounts#776
dbkegley merged 5 commits intomainfrom
kegs-fix-connect-propagate-sharedStorage-subPath-to-job-volumeMounts

Conversation

@dbkegley
Copy link
Contributor

Copying this PR so we can run CI and get it merged.
original PR: #774
original author: @hyperbolist

When launcher.enabled, and when sharedStorage.subPath is non-empty, launcher-managed job pod volumeMounts did not prepend that subPath to their job-specific volumeMounts, which had the effect of mounting them higher on the shared storage volume than intended, which caused the job pods to quit immediately when they could not find expected files.

This change ensures that when sharedStorage.subPath is non-empty, it is prepended to the job-specific subPaths of the launcher-managed job pod volumeMounts.

Tested by deploying the chart with clean shared storage volume and fresh database, and then adding a few gallery examples via the web UI, which we could then open and interact with.

fixes #759

Details:

The default values file now prepares an empty value at .Values.launcher.templateValues.sharesStorage.subPath.
https://github.com/FairwindsOps/rstudio-helm/blob/e8ea3daea13f5b1e6ab9ec579d997b1b0a9c2fac/charts/rstudio-connect/values.yaml#L381-L382

The configmap template now pushes .Values.sharedStorage.subPath into the $sessionTemplate for job.tpl to pick up.
https://github.com/FairwindsOps/rstudio-helm/blob/e8ea3daea13f5b1e6ab9ec579d997b1b0a9c2fac/charts/rstudio-connect/templates/configmap.yaml#L60-L63

The job template now looks for the subPath key of .Job.volumeMounts items and prepends $templateData.sharedStorage.subPath to its value if non-empty.
https://github.com/FairwindsOps/rstudio-helm/blob/e8ea3daea13f5b1e6ab9ec579d997b1b0a9c2fac/charts/rstudio-connect/files/job.tpl#L285-L293

@dbkegley dbkegley requested a review from a team as a code owner February 11, 2026 14:31
@dbkegley
Copy link
Contributor Author

dbkegley commented Feb 11, 2026

Ran this locally and confirmed that it works as expected

sharedStorage:
  name: connect-dev-data-pvc
  storageClassName: manual
  create: true
  mount: true
  mountContent: true
  path: /var/lib/rstudio-connect
  subPath: connect-data

launcher:
  enabled: true
  useTemplates: true
  templateValues:
    pod:
      imagePullPolicy: "Always"
    sharedStorage:
      name: connect-dev-data-pvc
      subPath: connect-data
    Mounts:
      /connect/mnt/app from mount0 (rw,path="connect-data/apps/1/1")
      /connect/mnt/job from mount0 (rw,path="connect-data/jobs/1/sLUGS8Fgs1wZhAv3")
      /connect/mnt/python-environments from mount0 (rw,path="connect-data/python-environments")
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-tkjhx (ro)
Conditions:
  Type                        Status
  PodReadyToStartContainers   False
  Initialized                 True
  Ready                       False
  ContainersReady             False
  PodScheduled                True
Volumes:
  mount0:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  connect-dev-data-pvc
    ReadOnly:   false

@dbkegley
Copy link
Contributor Author

That failure was the prepull-daemonset chart so I'm going to ignore it and merge this

 <== Events of namespace posit-test
........................................................................................................................
========================================================================================================================
Deleting release "prepull-daemonset-pdrtq5qxer"...
release "prepull-daemonset-pdrtq5qxer" uninstalled
Error: failed installing charts: failed processing charts

------------------------------------------------------------------------------------------------------------------------
 ✔︎ posit-chronicle => (version: "0.4.6", path: "charts/posit-chronicle")
 ✔︎ rstudio-connect => (version: "0.8.26", path: "charts/rstudio-connect")
 ✔︎ rstudio-launcher-rbac => (version: "0.2.25", path: "charts/rstudio-launcher-rbac")
 ✔︎ rstudio-pm => (version: "0.5.53", path: "charts/rstudio-pm")
 ✔︎ rstudio-workbench => (version: "0.10.6", path: "charts/rstudio-workbench")
 ✖︎ prepull-daemonset => (version: "0.0.5", path: "other-charts/prepull-daemonset") > failed waiting for process: exit status 1

@dbkegley dbkegley merged commit e590ce6 into main Feb 11, 2026
6 of 7 checks passed
@dbkegley dbkegley deleted the kegs-fix-connect-propagate-sharedStorage-subPath-to-job-volumeMounts branch February 11, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shared Storage subpath does not propagate to job templates

4 participants