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

support KubeSpawner profile_options #2937

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Adam-D-Lewis
Copy link
Member

@Adam-D-Lewis Adam-D-Lewis commented Feb 5, 2025

Reference Issues or PRs

Kubespawner has support to configure various docker images (or other options) per profile. See profile_options in their docs. We didn't support it in our Pydantic models so this adds support. I tested it and it worked on my local deployment.

I made a companion docs PR as well

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

How to test this PR?

Add this section to a nebari config.

profiles:
  jupyterlab:
  - display_name: Small Instance
    description: Stable environment with 2 cpu / 4 GB RAM
    default: true
    profile_options: &profile_options
      image:
        display_name: Image
        choices:
          base:
            display_name: jupyter/base-notebook:latest
            kubespawner_override:
              image: jupyter/base-notebook:latest
          minimal:
            display_name: quay.io/nebari/nebari-jupyterlab:latest
            default: true
            kubespawner_override:
              image: quay.io/nebari/nebari-jupyterlab:latest
    kubespawner_override:
      cpu_limit: 2
      cpu_guarantee: 1.5
      mem_limit: 4G
      mem_guarantee: 3G

  - display_name: Medium Instance
    description: Stable environment with 4 cpu / 8 GB RAM
    profile_options: *profile_options
    kubespawner_override:
      cpu_limit: 4
      cpu_guarantee: 3
      mem_limit: 8G
      mem_guarantee: 6G

then ensure the profile selection page looks something like
image

It works whether or not jhub_apps is enabled.

Any other comments?

@Adam-D-Lewis
Copy link
Member Author

Failing "Local Integration Tests" test unrelated to this PR

@dcmcand dcmcand requested a review from a team as a code owner February 7, 2025 14:24
@dcmcand dcmcand requested review from dcmcand and viniciusdc and removed request for a team February 7, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New 🚦
Development

Successfully merging this pull request may close these issues.

2 participants