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 EnvVar's with 'valueFrom' as well as with 'value' #426

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

consideRatio
Copy link
Member

@consideRatio consideRatio commented Sep 1, 2020

Background

The c.KubeSpawner.environment configuration can only accept a dictionary with keys and values being strings, because they will be passed as name and value to the name and value parameters of the EnvVar resource. But, Kubernetes EnvVar resources can have a name / valueFrom combo as well.

Due to this limitation, users ended up forced to do something very obscure like described jupyterhub/zero-to-jupyterhub-k8s#1103 (comment).

Solution

In this PR I enable users to pass other kinds of structures as well that will allow for any kind of valid k8s EnvVar structure to be passed. The format is best documented in the test currently.

References

consideRatio added a commit to consideRatio/zero-to-jupyterhub-k8s that referenced this pull request Sep 1, 2020
Note this commit relies on a KubeSpawner PR currently not merged. See
jupyterhub/kubespawner#426.
consideRatio added a commit to consideRatio/zero-to-jupyterhub-k8s that referenced this pull request Sep 1, 2020
Note this commit relies on a KubeSpawner PR currently not merged. See
jupyterhub/kubespawner#426.
@yuvipanda yuvipanda merged commit 2469553 into jupyterhub:master Sep 3, 2020
@yuvipanda
Copy link
Collaborator

The more we can just pass through to k8s, the better. Thanks for the PR, @consideRatio

@consideRatio
Copy link
Member Author

Thanks @yuvipanda! ❤️ 🎉

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.

Regarding c.KubeSpawner.environment and the EnvVar structure's valueFrom field
2 participants