Jupyterhub doesn't respect storage capacity

Hello,

I have deployed Jupyterthub on my server with microk8s. I have enable a storage class with the microk8s “storage” add-on module. So far it was working great until I wanted to limit the storage capacity allocated to each user. I wrote the following config :

storage:
  dynamic:
    storageClass: microk8s-hostpath
  capacity: 2Gi

Then I started a new server, launched a new terminal, and proceeded to download 5Go files without problem. When I go look at the related pv and pvc that were generated, it clearly states a 2Gi limit capacity.

Why am i able to download thoses files while I stated a 2Gi limit storage capacity? This question might be related to microk8s.

Thank you for opening this issue!

This is a limitation of kubernetes itself - it does not enforce ‘capacity’ by itself, but expects the storage provider to do so. And hostPath does not support that. See https://stackoverflow.com/a/55621685 for more details.

Hope that is helpful!

1 Like

Thank you for your answer, I understand it better now :slight_smile:

I have another question about storage, if i set the following config :

storage: 
 type: none

Then it doesn’t create some pv/pvc, and of course if I download some files on a jupyter server, and then shut it down I lose all my files as intended. The question is, where are those temp files created and what is the Kubernetes process behind this ?