Inconsistency in values.yaml vs in z2jh


here is the way that in z2jh parses the values.yaml (zero-to-jupyterhub-k8s/jupyterhub/files/hub/ at 30a68f15a6c8f2f3968c4acee5afb487f26b23bb · jupyterhub/zero-to-jupyterhub-k8s · GitHub)

c.JupyterHub.cookie_secret = get_secret_value("hub.config.JupyterHub.cookie_secret")

But here is the way the values are set (zero-to-jupyterhub-k8s/jupyterhub/values.yaml at 30a68f15a6c8f2f3968c4acee5afb487f26b23bb · jupyterhub/zero-to-jupyterhub-k8s · GitHub):

  cookieSecret: xxxxxx

I’m quite confused how to set cookie_secret in z2jh

You shouldn’t need to set the cookieSecret, it’s autogenerated:

What happens when you try this?

Thanks for your response. It doesn’t crash or give error. But how can I make sure it’s running with this value as cookieSecret?

You can see the cookie_secret that the hub will use from the secret with:

kubectl get secret hub -o json | jq -r '.data["hub.config.JupyterHub.cookie_secret"]' | base64 --decode

Or you can try dumping the full configuration that JupyterHub loads from everywhere, with:

kubectl exec -it hub-... -- jupyterhub -f /usr/local/etc/jupyterhub/ --show-config
1 Like

Thanks. It shows that it’s using the cookieSecret correctly:

 $grep "cookieSecret" nbgrader-chart/values.yaml
    cookieSecret: "04f580cb92b0274bb14eb4ea3ce4ccf3e1d39079545c4751b97957beddb9704a"
$ kubectl get secret hub -o jsonpath='{.data.hub\.config\.JupyterHub\.cookie_secret}' | base64 --decode
1 Like