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

Suggestion: Allow memory requirements and limits within a ProfileList without using kubespawner_override #3336

Open
jmunroe opened this issue Feb 2, 2024 · 1 comment

Comments

@jmunroe
Copy link

jmunroe commented Feb 2, 2024

I was confused recently (context 2i2c-org/infrastructure#3687) about setting memory requirements and limits when not using profileList and when using profileList. @sgibson91 steered me right to the z2jh docs and pointed out that this is the way to set memory requirements/limits:

singleuser:
  memory: 
    limit: 4G 
    guarantee: 4G 

But if I am using profileList , my understanding is needs to be something like

singleuser:
  profileList:
    - display_name: "4GB RAM"
      description: "Example for a 4GB profile"
      kubespawner_override:
        mem_guarantee: 4G
        mem_limit: 4G

From @sgibson91's explaination to me is that memory: limit: and memory: guarantee: are read directly as a z2jh helm chart values, whereas kubespawner_override and therefore mem_guarentee and mem_limit are parsed directly to the KubeSpawner python code. These are two separate GitHub repos (though connected by the helm chart), which might explain the different syntax expectations. The override means we're dropping more directly into the Python code of KubeSpawner and so that's why the syntax changes.

As pure a black box "just do this to make it work", I suppose that's fine, but it was a stumbling block for me.

Proposed change

Given that profileList is a part of the z2jh helm chart, could it be extended that the following works?

singleuser:
  profileList:
    - display_name: "4GB RAM"
      description: "Example for a 4GB profile"
      memory: 
        limit: 4G
        guarantee: 4G 

It appears that the syntax is validated when I did a helm upgrade, but upon testing it, it did not appear to actually enforce that memory request on the profile.

(If this is just a misunderstanding on my part, perhaps there is no action needed at all.)

Copy link

welcome bot commented Feb 2, 2024

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! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant