-
Notifications
You must be signed in to change notification settings - Fork 792
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
Added proxy.chp.extraEnv and proxy.traefik.extraEnv configuration #1784
Added proxy.chp.extraEnv and proxy.traefik.extraEnv configuration #1784
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
The travisCI build failed because CoreDNS was unable to start up:
Any way to restart the build? |
This is great, @agrahamlincoln! Thank you. Do you think you can add an entry documenting this to https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/master/jupyterhub/schema.yaml? I see extraEnv is documented for hub & user pods, but not for proxy. That would make the config option easier to discover for others. |
Thanks @agrahamlincoln! @yuvipanda would you say we want this to be nested under proxy.chp.extraEnv rather than proxy.extraEnv? I'm not 100% but I think that makes the most sense. We both have proxy.chp and proxy.traefik, where chp is the jupyterhub's controlled proxy, and proxy.traefik refers to the TLS termination proxy, and setting extra env should be specific to the pod rather than generic. Hmm yes I think we should configure those separately! @agrahamlincoln could you implement that change? If you want, feel free to add proxy.traefik.extraEnv to the autohttps deployment pod running traefik as well. |
Sure, though it seems like schema.yaml does not currently validate against the existing values.yaml 🙃 Initially I was concerned with adding it because jsonschema does not allow specification of multiple possible types, which is the case for
I agree with you here since it is effectively modifying only the chp pod. I can also add this to the traefik pod as well. |
jupyterhub/schema.yaml
Outdated
Provide extra environment variables to the chp pod. Can be provided as an array or | ||
as an object. | ||
|
||
as an array: | ||
```yaml | ||
- name: MY_ENVVAR | ||
value: MY_ENVVAR_VALUE | ||
``` | ||
|
||
as an object: | ||
```yaml | ||
MY_ENVVAR: MY_ENVVAR_VALUE | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for excellent work and documenting these in schema.yaml!
I'm a bit worried that the examples provided may indicate that its the only way to specify something, which could exclude the ability to define an environment variable in a k8s native syntax for example. The examples in hub.extraEnv
and singleuser.extraEnv
are more complete, perhaps you could copy paste from them, reference them, or extend your examples to cover the various options?
Feel free to update those examples as well if you like to change something for cohesiveness.
Thank you for your work on this @agrahamlincoln !!
Ah, yes we have not maintained the validate.py script well =/ I'm not familiar with it myself actually. I tried
Wieee thank you! |
I honestly didn't see the examples for extraEnv elsewhere, and they're pretty good so I copied them in and modified them. Let me know if you disagree with any of the "usual use-cases" for modifying the environment variables in schema.yaml The initial commit message is no longer correct now that we're enabling Feel free to adjust this how you like, but if I were to rebase/squash this whole branch now, I'd name the commit as follows
|
LGTM @agrahamlincoln! Thank you for your thorough work on this! I'll go ahead and merge this as it is. I think since the chain of commits are associated under the merge its fine to have a commit that is a bit off. 🎉 ❤️! |
the values.yaml implies that this option is available, but it is not. this change adds the template to the proxy deployment so
.Values.proxy.extraEnv
is available