Skip to content

simplify singleuser server image parsing by removing stanza from hubploy.yaml and use the default z2jh method#127

Merged
shaneknapp merged 15 commits intoberkeley-dsep-infra:mainfrom
shaneknapp:add-improved-image-parsing
Dec 4, 2025
Merged

simplify singleuser server image parsing by removing stanza from hubploy.yaml and use the default z2jh method#127
shaneknapp merged 15 commits intoberkeley-dsep-infra:mainfrom
shaneknapp:add-improved-image-parsing

Conversation

@shaneknapp
Copy link
Contributor

@shaneknapp shaneknapp commented Oct 2, 2025

resolves #126

now, you can specify an image in either/both staging.yaml and prod.yaml to specify an image to run in that environment (staging or prod). this will override any image spec defined in common.yaml.

example:

jupyterhub:
  singleuser:
    image:
      name: us-central1-docker.pkg.dev/cal-icor-hubs/user-images/testing-user-image
      tag: da1afdf45dfa

here's the order of presidence for how the image/tag will be set:

  • if the image spec is defined in prod or staging.yaml, that will be used.
  • if neither of those are specified, then it will default to what's in common.yaml

doing it this way allows us to remove nearly all of the convoluted logic around specifying the image! our CI/CD will need to be updated to use the new image hash, but that's pretty straightforward.

this is still a WIP, as there are some config parsing weirdnesses that i need to think about. specifically, if there is both no images: stanza in hubploy.yaml, and jupyterhub.singleuser.image in staging/prod.yaml, spawning in to the hub fails.

i'll address this in a later commit.

@shaneknapp
Copy link
Contributor Author

ok, this is better (and basically works as advertised), but the logic around setting images is... wonky AF. i'm gonna take a quick break and think about what i can do to refactor/clean it up.

@shaneknapp
Copy link
Contributor Author

ok, this is better (and basically works as advertised), but the logic around setting images is... wonky AF. i'm gonna take a quick break and think about what i can do to refactor/clean it up.

by deleting the wonky logic, and just letting help and jupyterhub figure things out, we have a much easier tool to maintain.

@shaneknapp
Copy link
Contributor Author

still remaining TODO:

  • check that `jupyterhub.singleuser.image.{name|tag} are both present and fail if missing in at least one config

@ryanlovett
Copy link
Contributor

Fwiw, if the admin doesn't specify them, the chart falls back to defaults.

https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/main/images/singleuser-sample/README.md

@shaneknapp
Copy link
Contributor Author

Fwiw, if the admin doesn't specify them, the chart falls back to defaults.

https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/main/images/singleuser-sample/README.md

odd, it failed to launch a notebook for me when i tried this, but the possibility of PEBKAC exists. i'll try again...

@shaneknapp
Copy link
Contributor Author

Fwiw, if the admin doesn't specify them, the chart falls back to defaults.
https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/main/images/singleuser-sample/README.md

odd, it failed to launch a notebook for me when i tried this, but the possibility of PEBKAC exists. i'll try again...

yep. PEBKAC. it's indeed using the default/sample image. i will still check for this as it's not exactly the behavior that we want.

@shaneknapp shaneknapp changed the title Add improved image parsing simplify singleuser server image parsing by removing stanza from hubploy.yaml and use the default z2jh method Oct 3, 2025
…dev work will be focused on this version moving foward
@shaneknapp shaneknapp merged commit 9400168 into berkeley-dsep-infra:main Dec 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stop using hubploy.yaml to specify the image location/name/tags

4 participants