jupyterhub / zero-to-jupyterhub-k8s

Helm Chart & Documentation for deploying JupyterHub on Kubernetes
https://zero-to-jupyterhub.readthedocs.io
Other
1.56k stars 799 forks source link

/bin/sh default when using extraContainers: #3465

Open BuckinghamIO opened 3 months ago

BuckinghamIO commented 3 months ago

Bug description

When adding an extra containers for the single user environment the image-puller has a hardcoded command that it trys to execute to feedback if the process has been completed.

command:
  - /bin/sh
  - -c
  - echo "Pulling complete"

A issue arrises where when a extra container may not have bash and this causes an error preventing the startup of a container.

How to reproduce

Add any container that does not have /bin/bash to the singleUser environment, in my experience I was trying to add cloud-sql-proxy.

Expected behaviour

The image should run as expected and not be prevented by a JupyterHub requirement that all extra containers should have bash installed.

Actual behaviour

Error within the image-puller daemon set.

Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unab │ │ le to start container process: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown

manics commented 3 months ago

Running a minimal command means we can pre-pull an image by running it as a daemonset.

Do you have a suggestion for a better way to pre-pull images? Would you be happy if the command was configurable for each pulled image?

BuckinghamIO commented 3 months ago

Well the issue with this command or even I guess the requirement for a command is some images are distroless which this clearly wont work with.

A configurable command may allow more options for sure, although Im not sure in my case it would be a solution either.