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

BREAKING: singleuser.cmd defaults to Docker image default #2138

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

Here you can find upgrade changes in between releases and upgrade instructions.

## [UNRELEASED]

#### Breaking changes

- **`singleuser.cmd` does not default to `jupyterhub-singleuser` - [#2138](https://github.com/jupyterhub/zero-to-jupyterhub-k8s/pull/2138)**

Previous versions of Z2JH ignored the command (`CMD`) configured in the singleuser image by default.
This is no longer the case, when a singleuser pod is started the `CMD` from the container image will be used.
If you want to revert to the previous behaviour set `singleuser.cmd=jupyterhub-singleuser`.

This change was made to make it easier to support custom startup scripts such as those used in [`docker-stacks`](https://github.com/jupyter/docker-stacks),
as well as alternatives to jupyter-notebook including [Jupyterlab](https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html) and other applications based on [jupyter-server](https://jupyter-server.readthedocs.io/).

## [0.11]

### [0.11.1] - 2021-01-15
Expand Down
14 changes: 14 additions & 0 deletions doc/source/jupyterhub/customizing/user-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ If you'd like users to select an environment from **multiple docker images**,
see {ref}`multiple-profiles`.
```

The Docker image will be started with the [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#entrypoint) and [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd) defined in the image.
You can override `CMD`, by setting `singleuser.cmd`.

````{note}
In versions of Z2JH prior to 1.0.0 the image's default was overridden.
To restore this behaviour:

```yaml
singleuser:
cmd: jupyterhub-singleuser
```

````

manics marked this conversation as resolved.
Show resolved Hide resolved
(jupyterlab-by-default)=

## Use JupyterLab by default
Expand Down
13 changes: 12 additions & 1 deletion jupyterhub/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,18 @@ properties:
type: string
cmd:
type: [array, string, "null"]
description: *kubespawner-native-config-description
description: |
The command and arguments passed to the container.
This is the equivalent of the `CMD` Dockerfile instruction.
If not set the default from the container image will be used.

Note that in versions of Z2JH prior to 1.0.0 this was set to
`jupyterhub-singleuser` instead of using the image's default.

See the [KubeSpawner
documentation](https://jupyterhub-kubespawner.readthedocs.io/en/latest/spawner.html)
for more information.

defaultUrl:
type: [string, "null"]
description: *kubespawner-native-config-description
Expand Down
2 changes: 1 addition & 1 deletion jupyterhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ singleuser:
extraResource:
limits: {}
guarantees: {}
cmd: jupyterhub-singleuser
cmd:
defaultUrl:
extraPodConfig: {}
profileList: []
Expand Down