rstudio / rstudio/helm

Specify `selector` for persistent volume claims

Open
#136 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

consistency
Dominant language
Markdown
Stars
46
Forks
40
Avg merge
4h 3m
Merged PRs (30d)
6

Description

My team often has several development instances of RStudio Workbench deployed at any time. We'd like to be able to leverage creating the homeStorage persistent volume claim, but with NFS persistent volumes it's sometimes tricky to make sure that the claim binds to the correct volume. We leverage the selector feature of persistent volume to make sure the bind happens correctly.

For example, we define the spec for the PVC like so:

spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 1Mi
  selector:
    matchLabels:
      app.kubernetes.io/instance: my-workbench-deployment
      pv-role: home

and it then binds to a persistent volume matching those labels.

It would be helpful if we could define a selector block when creating a persistent volume claim, which would go here:

https://github.com/rstudio/helm/blob/f73fdd04cecfaead6d48f230e2ae722728448ed4/charts/rstudio-workbench/templates/pvc.yaml#L38

Here's the Kubernetes documentation for it: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with charts/rstudio-workbench/templates/pvc.yaml at the referenced PVC spec. Read the surrounding template and determine how chart configuration is passed into it. Done means users can provide a Kubernetes selector for the homeStorage claim and the rendered PVC includes the requested selector fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
infrastructure
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.