Increase size of a PVC in JupyterHub#

This tutorial is used to show how you can increase the size of a PVC (persistent volume claim) in JupyterHub. The first part of this tutorial shows steps from the user’s perspective and the second from the operation’s perspective.

User#

Note

Before creating an issue check if you meet the following requirements:

  • User of MOC-Smaug

  • Access to JupyterHub on MOC-Smaug

As a user, you can increase PVC size by creating JupyterHub hardware requirements issue to operate-first support repository.

Operation#

Note

Before you start working on the request check if you meet the following requirements:

  • User of MOC-Smaug

  • Access to JupyterHub on MOC-Smaug

  • User (Requester) requested expansion of a PVC in operate-first/support/

  • Requester is a user of MOC-Smaug

  • Requester has access to JupyteHub on MOC-Smaug

Scenarios#

When working on the requests, we can encounter two scenarios:

  1. Requester uses the default PVC

  2. Requester already has a custom PVC defined

Requester uses the default PVC#

  1. Get pvc template file from blueprint/docs/userstories/jupyterhub/templates/pvc-template.yaml
  2. Update the highlighted information
  3. ---
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      annotations:
        hub.jupyter.org/username: user@redhat.com
      name: jupyterhub-nb-URLENCODED_USERNAME-pvc
      labels:
        app: jupyterhub
        component: singleuser-storage
    spec:
      resources:
        requests:
          storage: DESIRED_SIZE
  4. Encrypt file with SOPS
  5. Add the PVC resource to apps/kfdefs/overlays/moc/smaug/opf-jupyterhub/pvcs/
    following convention user-USERNAME-pvc.enc.yaml .
  6. List the resource at apps/kfdefs/overlays/moc/smaug/opf-jupyterhub/pvcs/secret-generator.yaml
  7. Commit updated files and create PR
  8. When PR is merged and changes are applied by ArgoCD restart requester's JupyterHub server

Requester already has a custom PVC defined#

  1. Fetch user's PVC resource from apps/kfdefs/overlays/moc/smaug/opf-jupyterhub/pvcs/
  2. Update storage size in file via SOPS
  3. storage: DESIRED_SIZE
  4. Commit updated file and create PR
  5. When PR is merged and changes are applied by ArgoCD restart requester's JupyterHub server