Skip to content

Commit 37478cc

Browse files
authored
Merge pull request #3557 from minrk/upgrade-4
v4 upgrade doc, changelog for 4.0
2 parents b23d7b8 + 8691aec commit 37478cc

File tree

3 files changed

+142
-97
lines changed

3 files changed

+142
-97
lines changed

docs/source/administrator/upgrading/upgrade-3-to-4.md

Lines changed: 98 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,101 @@
22

33
# Major upgrade: 3.\* to 4.\*
44

5-
This is currently just a placeholder file for until we have written upgrade docs.
5+
zero-to-jupyterhub 4.0 is a major upgrade that may require some changes to your configuration,
6+
depending on what features you may use.
7+
This mostly comes in the form of some upgraded packages, described below.
8+
9+
:::{seealso}
10+
11+
- the [general upgrade documentation](upgrading-major-upgrades) for upgrade steps to take every time you do a major chart update
12+
- the [changelog](changelog-4.0) for details of upgraded packages
13+
14+
:::
15+
16+
## JupyterHub 5
17+
18+
zero-to-jupyterhub 4.0 upgrades the JupyterHub version from 4.1.6 to 5.2.1.
19+
20+
:::{seealso}
21+
22+
For more detailed changes in JupyterHub, see JupyterHub's own documentation on upgrading to version 5:
23+
24+
Especially if you use features like per-user subdomains or custom page templates.
25+
26+
- [jupyterhub changelog](https://jupyterhub.readthedocs.io/en/5.2.1/reference/changelog.html)
27+
- [Upgrading to JupyterHub 5](https://jupyterhub.readthedocs.io/en/5.2.1/howto/upgrading-v5.html)
28+
29+
:::
30+
31+
### Allowing users
32+
33+
JupyterHub 5 promotes the `allow_all` and `allow_existing_users` configuration used on OAuthenticator to all other Authenticators.
34+
If you have not explicitly allowed users, the default is to allow no users (this was already the default if you were using OAuth).
35+
If you are using an Authenticator where all users who can successfully authenticate should have access, set:
36+
37+
```yaml
38+
hub:
39+
config:
40+
Authenticator:
41+
allow_all: true
42+
```
43+
44+
to explicitly opt in to this behavior that was previously the default for some authenticators.
45+
46+
## KubeSpawner 7
47+
48+
zero-to-jupyterhub 4.0 upgrades the KubeSpawner version from 6 to 7.
49+
The main relevant change here is the "slug scheme" used to compute names of resources such as pods and PVC (user storage) is changed.
50+
51+
The new scheme is called "safe" and is the default, whereas the old scheme is called "escape".
52+
If you do not have any custom templated fields, it is _unlikely_ that anything should change for you and everything should work.
53+
If, however, you specify custom templated fields such as volume mounts or environment variables,
54+
especially those that have the `{username}` or `{servername}` fields,
55+
those values are likely to change under the new scheme for some usernames.
56+
In particular, there are new fields that should make things easier:
57+
58+
- `{user_server}` combines the username and server name, and is equivalent to `{username}{servername}` in the old escape scheme.
59+
It is the recommended value when a string should be unique per named server, as opposed to per user.
60+
- `{pod_name}`, `{pvc_name}` are now available to reference the fully resolved names of these objects
61+
and can be used to avoid duplicating templates.
62+
63+
You can opt in globally to keep the kubespawner 6 behavior with:
64+
65+
```yaml
66+
hub:
67+
config:
68+
KubeSpawner:
69+
slug_scheme: escape
70+
```
71+
72+
which _should_ result in no changes for you from previous behavior.
73+
74+
One user-facing place where a default template may require administrator action is if you are using:
75+
76+
```yaml
77+
singleuser:
78+
storage:
79+
type: static
80+
```
81+
82+
The default value for `subPath` is `{username}` which may resolve to a different value for some usernames, which could appear like a 'lost' home directory because the mount path changes.
83+
The data is not lost, but the mount location has changed.
84+
To ensure this value doesn't change, you can use:
85+
86+
```yaml
87+
singleuser:
88+
storage:
89+
type: static
90+
static:
91+
subPath: "{escaped_username}"
92+
```
93+
94+
which applies the previous 'escape' scheme to the subPath.
95+
Alternatively, you can keep the new scheme, and perform a one-time migration to move files for the affected usernames.
96+
97+
:::{seealso}
98+
99+
- [KubeSpawner changelog](https://jupyterhub-kubespawner.readthedocs.io/en/latest/changelog.html)
100+
- [KubeSpawner docs on templated fields](https://jupyterhub-kubespawner.readthedocs.io/en/latest/templates.html#fields)
101+
102+
:::

0 commit comments

Comments
 (0)