Zero-to-jupyterhub-k8s: refactoring/hub-config - systematic style

Created on 5 Sep 2018  路  4Comments  路  Source: jupyterhub/zero-to-jupyterhub-k8s

Almost all of the hub's configmap entries, which are read by the images/hub/jupyterhub_config.py file are named like-this rather than snake_case or camelCase. But, there are some snake_case entries there still like db_url.

  • values.yaml - should be cameCase
  • configmap.yaml - should be css-case
  • pythoncode.py - should be snake_case

Most helpful comment

I think our bigger goal should be to eliminate most things in the configmap and passthrough values.yaml ~as-is. That should eliminate the css-case entirely.

And for most configuration, we should probably have passthrough to exactly jupyterhub configuration options, so we could have configuration like:

jupyterhub_config:
  KubeSpawner:
    image: myimage
  JupyterHub:
    tornado_settings:
      slow_spawn_timeout: 0

Only very common high-level options and those that don't map directly onto single configurables (e.g. auth.type) would need special treatment, and most new options in JupyterHub and KubeSpawner wouldn't need to be exposed with special handling at all, they would just get passed through for free, and the documentation for these options would remain valid and useful for z2jh users.

All 4 comments

I think our bigger goal should be to eliminate most things in the configmap and passthrough values.yaml ~as-is. That should eliminate the css-case entirely.

And for most configuration, we should probably have passthrough to exactly jupyterhub configuration options, so we could have configuration like:

jupyterhub_config:
  KubeSpawner:
    image: myimage
  JupyterHub:
    tornado_settings:
      slow_spawn_timeout: 0

Only very common high-level options and those that don't map directly onto single configurables (e.g. auth.type) would need special treatment, and most new options in JupyterHub and KubeSpawner wouldn't need to be exposed with special handling at all, they would just get passed through for free, and the documentation for these options would remain valid and useful for z2jh users.

Yes ah that would be perfect!

I left comments about this in #341. Agree with @minrk

Consolidating this to #341 so we don't have multiple issues for the same thing

Was this page helpful?
0 / 5 - 0 ratings