Communities sometimes ask us to make a shared token (for example an API key) available to every user on their hub.
We set it as an environment variable in user servers, stored in a sops-encrypted values file.
Communities request this by following the user docs.
Decrypt the hub’s
enc-<name>.secret.values.yamlunderconfig/clusters/<cluster>/. Create it if it does not exist, and list it underhelm_chart_values_filesincluster.yaml. See Naming conventions for secret files.Add the variable under
jupyterhub.singleuser.extraEnv:jupyterhub: singleuser: extraEnv: MY_SERVICE_TOKEN: "<value>"Re-encrypt and open a PR. When you merge the PR, the hub change will be deployed.
Ask users to restart their server and they should see the variable.