jupyter-server / enterprise_gateway

A lightweight, multi-tenant, scalable and secure gateway that enables Jupyter Notebooks to share resources across distributed clusters such as Apache Spark, Kubernetes and others.
https://jupyter-enterprise-gateway.readthedocs.io/en/latest/
Other
615 stars 221 forks source link

Only KERNEL_-prefixed envs are flowed to CRD-based kernels #1224

Closed kevin-bates closed 1 year ago

kevin-bates commented 1 year ago

While reviewing #1223, it became evident that only the KERNEL_-prefixed environment variables are flowed to the CRD pod. This bypasses those envs defined in the kernel.json env: stanza, along with any defined in the inherited_envs (derived from the EG process itself) and client_envs (that are derived from the kernel start request's payload). Something similar to what is done in the kubernetes launcher is what is needed. (Please note that the envs in os.environ should constitute what should be conveyed to the pod since, at that point, this is the intended environment of the kernel process.