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

Rewrite help for Kubespawner.cmd #502

Merged
merged 3 commits into from
May 2, 2021
Merged

Conversation

manics
Copy link
Member

@manics manics commented Apr 30, 2021

Whilst working on jupyterhub/zero-to-jupyterhub-k8s#2138 I noticed the current description for cmd is mostly copied from the parent class and is a bit confusing. I've attempted to simplify it.

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
@manics
Copy link
Member Author

manics commented May 1, 2021

FYI I picked the original Cmd/Entrypoint casing from https://github.com/opencontainers/image-spec/blob/master/config.md

Most, including the default, do not. Consult the documentation for your spawner to verify!

If set to `None`, Kubernetes will start the `CMD` that is specified in the Docker image being started.
`cmd` will be passed to the image's `ENTRYPOINT`.
Copy link
Member

@consideRatio consideRatio May 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmd will be passed to the image's ENTRYPOINT.

I think it is a problematic statement for two reasons.

  1. It only influence the k8s Pod rather than the Dockerfile or similarly.
  2. It actually configures the k8s container's args (like Dockerfile's CMD) rather than command (like Dockerfile's ENTRYPOINT).

A related confusion is described in #493.

I think we can make small progressions and I find this change PR mergable if we just update this to reference that it implies setting the k8s Pod's container's args where the command won't be set. This also implies that any Dockerfile's ENTRYPOINT will always be respected as kubespawner never sets command. Here is related documentation about that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THANK YOU FOR YOUR WORK ON THIS @manics!! ❤️

I forgot to convey that part before!

kubespawner/spawner.py Outdated Show resolved Hide resolved
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
@consideRatio consideRatio merged commit c82b354 into jupyterhub:master May 2, 2021
@consideRatio
Copy link
Member

I'll go for a merge on this as it is and work on an entrypoint traitlet PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants