Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

singleuser PVC deletion when the helm chart is uninstalled #432

Closed
lupaang opened this issue Sep 14, 2020 · 2 comments
Closed

singleuser PVC deletion when the helm chart is uninstalled #432

lupaang opened this issue Sep 14, 2020 · 2 comments
Labels
label selector Issues about replacing hardcoded component label as a selector for Pod / PVCs resource cleanup

Comments

@lupaang
Copy link

lupaang commented Sep 14, 2020

Hey guys, first of all, thank you for maintaining a great project.

I'm using jupyterhub with helm chart and when I spawn a single user notebook by jupyterhub, I usually mount a volume(ex. EBS, EFS etc..) with notebook.

However when I delete the hub, since the spawned notebook is not managed by helm chart - no labels, no annotations related to the chart - so the mounted PVC remains released while the hub is gone. There's extraLabel option on singleuser storage but usually labels are created with helper template, we cannot refer those labels within values.yaml.

I'm not sure this spec is related to kubespawner or not, but I want to suggest kubespawner to pass the helm related labels to singleuser spawned resources like notebook mounted storage, or notebook itself.

Thanks in advance.

Proposed change

Delete every notebook-mounted PVC when a jupyterhub is uninstalled.

Alternative options

Who would use this feature?

(Optional): Suggest a solution

@lupaang lupaang added the enhancement New feature or request label Sep 14, 2020
@welcome
Copy link

welcome bot commented Sep 14, 2020

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@consideRatio consideRatio added resource cleanup label selector Issues about replacing hardcoded component label as a selector for Pod / PVCs and removed enhancement New feature or request labels Oct 25, 2020
@consideRatio
Copy link
Member

You can add some labels using common_labels to be able to target the created PVC resources that you want to cleanup, or using the storage_extra_labels to get them only on the PVC resource.

This issue is a bit related to #446 as well, which suggests that we should remove storage as part of deleting JupyterHub users through the JupyterHub UI. I'll close this as a mix of duplicate / resolved by common_labels etc, but we also want to make the JupyterHub Helm chart configure KubeSpawner to set some common labels such as app.kubernetes.io/instance etc in the future, but that is something for the JupyterHub helm chart to do rather than KubeSpawner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
label selector Issues about replacing hardcoded component label as a selector for Pod / PVCs resource cleanup
Projects
None yet
Development

No branches or pull requests

2 participants