-
Notifications
You must be signed in to change notification settings - Fork 222
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
Enable ability to not filter kernels in container deployments #1131
Enable ability to not filter kernels in container deployments #1131
Conversation
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.
thanks for doing this! this directly improves my deployment of EG. 👍
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.
one change requested for readability
allowed_kernels_option="--KernelSpecManager.whitelist=[${EG_KERNEL_WHITELIST}]" | ||
if [ "${EG_KERNEL_WHITELIST}" == 'null' ]; then | ||
allowed_kernels_option="" | ||
fi |
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.
I think it makes more sense to have allowed_kernels_option
default to "". Then change the if to check if "${EG_KERNEL_WHITELIST}" != 'null' and set the flag inside the if.
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.
Good idea. I also switched the default value to null
since I found that the docker-compose.yaml
script includes the Docker-based kernel specs.
As discussed in #1127, there is currently no way to easily enable dynamic kernelspec additions to containerized deployments because the deployment scripts always specific kernelspec entries. Since dynamic kernelspec additions are default behaviors (when kernelspecs are not explicitly listed in the configuration), we should enable similar support in containerized deployments. This pull request enables that functionality.
The
start-enterprise-gateway.sh
that is theCMD
in the enterprise-gateway image has been modified to detect if theEG_KERNEL_WHITELIST
env has a value ofnull
. When that value is detected, the--KernelSpecManager.whitelist
command-line option is omitted, thereby exposing all kernelspecs configured into the image. It is presumed that deployments wishing to dynamically add kernelspec definitions have mounted the/usr/local/share/jupyter/kernels
directory (or otherwise made its update available). Updates made to that directory will be automatically picked up when kernelspecs are refreshed.A value of
null
was used forEG_KERNEL_WHITELIST
to make this determination because that is the value Helm will set when thewhitelist:
entry of thevalues.yaml
has no entries. This allows operators to easily remove (or comment out) all existing kernelspec entries to enable this functionality.Resolves: #1127