Skip to content

Commit d8f0e3b

Browse files
authored
Merge pull request #1544 from consideRatio/pr/update-z2jh
Update to z2jh 2 and JupyterHub 3
2 parents 3ccfc44 + 30bdb62 commit d8f0e3b

File tree

10 files changed

+30
-17
lines changed

10 files changed

+30
-17
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
matrix:
5151
k3s-channel:
5252
# Available channels: https://github.com/k3s-io/k3s/blob/HEAD/channel.yaml
53-
- v1.24
53+
- latest
5454
test:
5555
- main
5656
- auth
@@ -64,7 +64,7 @@ jobs:
6464
- k3s-channel: v1.20
6565
helm-version: v3.5.0
6666
test: helm
67-
- k3s-channel: v1.24
67+
- k3s-channel: latest
6868
test: helm
6969
test-variation: upgrade
7070
# upgrade-from represents a release channel, see: https://jupyterhub.github.io/helm-chart/info.json

doc/authentication.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ you need to add the following into ``config.yaml``:
2626
binder:
2727
oauth_no_confirm: true
2828
oauth_redirect_uri: "https://<binderhub_url>/oauth_callback"
29-
oauth_client_id: "binder-oauth-client-test"
3029
3130
singleuser:
3231
# to make notebook servers aware of hub

helm-chart/binderhub/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
# and run "./dependencies freeze --upgrade".
1313
#
1414
- name: jupyterhub
15-
version: "1.2.0"
15+
version: "2.0.0"
1616
repository: "https://jupyterhub.github.io/helm-chart"
1717
description: |-
1818
BinderHub is like a JupyterHub that automatically builds environments for the

helm-chart/binderhub/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ spec:
118118
name: "{{ include "jupyterhub.hub.fullname" . }}"
119119
key: hub.services.binder.apiToken
120120
{{- if .Values.config.BinderHub.auth_enabled }}
121+
- name: JUPYTERHUB_SERVICE_NAME
122+
value: binder
121123
- name: JUPYTERHUB_API_URL
122124
value: {{ (print (.Values.config.BinderHub.hub_url_local | default .Values.config.BinderHub.hub_url | trimSuffix "/") "/hub/api/") }}
123125
- name: JUPYTERHUB_BASE_URL

helm-chart/binderhub/values.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,20 @@ jupyterhub:
5656
cull:
5757
enabled: true
5858
users: true
59-
rbac:
60-
enabled: true
6159
hub:
6260
config:
6361
JupyterHub:
6462
authenticator_class: nullauthenticator.NullAuthenticator
6563
BinderSpawner:
6664
auth_enabled: false
65+
loadRoles:
66+
binder:
67+
services:
68+
- binder
69+
scopes:
70+
- servers
71+
# we don't need admin:users if auth is not enabled!
72+
- "admin:users"
6773
extraConfig:
6874
0-binderspawnermixin: |
6975
"""
@@ -188,8 +194,7 @@ jupyterhub:
188194
c.JupyterHub.spawner_class = BinderSpawner
189195
services:
190196
binder:
191-
admin: true
192-
apiToken:
197+
display: false
193198
singleuser:
194199
# start notebook server with lab ui as default
195200
# *if available*

helm-chart/images/binderhub/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ google-cloud-logging==3.*
1010
# jupyterhub's major version should be matched with the JupyterHub Helm chart's
1111
# used version of JupyterHub.
1212
#
13-
jupyterhub==1.*
13+
jupyterhub==3.*
1414

1515
# https://github.com/kubernetes-client/python
1616
kubernetes==9.*

helm-chart/images/binderhub/requirements.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ cryptography==38.0.1
2626
# via pyopenssl
2727
docker==6.0.0
2828
# via -r helm-chart/images/binderhub/../../../requirements.txt
29-
entrypoints==0.4
30-
# via jupyterhub
3129
escapism==1.0.1
3230
# via -r helm-chart/images/binderhub/../../../requirements.txt
3331
google-api-core[grpc]==2.10.2
@@ -68,6 +66,8 @@ grpcio-status==1.49.1
6866
# via google-api-core
6967
idna==3.4
7068
# via requests
69+
importlib-metadata==5.0.0
70+
# via jupyterhub
7171
jinja2==3.1.2
7272
# via
7373
# -r helm-chart/images/binderhub/../../../requirements.txt
@@ -78,7 +78,7 @@ jsonschema==4.16.0
7878
# jupyter-telemetry
7979
jupyter-telemetry==0.1.0
8080
# via jupyterhub
81-
jupyterhub==1.5.0
81+
jupyterhub==3.0.0
8282
# via
8383
# -r helm-chart/images/binderhub/../../../requirements.txt
8484
# -r helm-chart/images/binderhub/requirements.in
@@ -97,7 +97,9 @@ oauthlib==3.2.1
9797
# jupyterhub
9898
# requests-oauthlib
9999
packaging==21.3
100-
# via docker
100+
# via
101+
# docker
102+
# jupyterhub
101103
pamela==1.0.0
102104
# via jupyterhub
103105
prometheus-client==0.14.1
@@ -186,6 +188,8 @@ websocket-client==1.4.1
186188
# via
187189
# docker
188190
# kubernetes
191+
zipp==3.9.0
192+
# via importlib-metadata
189193

190194
# The following packages are considered to be unsafe in a requirements file:
191195
# setuptools

testing/local-binder-k8s-hub/binderhub_config_auth_additions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@
2525
c.HubOAuth.base_url = c.BinderHub.base_url
2626
c.HubOAuth.hub_prefix = c.BinderHub.base_url + "hub/"
2727
c.HubOAuth.oauth_redirect_uri = "http://127.0.0.1:8585/oauth_callback"
28-
c.HubOAuth.oauth_client_id = "binder-oauth-client-test"
28+
c.HubOAuth.oauth_client_id = "service-binder"
29+
c.HubOAuth.access_scopes = {"access:services!service=binder"}

testing/local-binder-k8s-hub/jupyterhub-chart-config-auth-additions.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ hub:
66
binder:
77
oauth_no_confirm: true
88
oauth_redirect_uri: "http://127.0.0.1:8585/oauth_callback"
9-
oauth_client_id: "binder-oauth-client-test"
109
config:
1110
JupyterHub:
1211
authenticator_class: "dummy"
1312
DummyAuthenticator:
1413
password: "dummy"
1514
BinderSpawner:
1615
auth_enabled: true
16+
loadRoles:
17+
user:
18+
scopes:
19+
- self
20+
- "access:services"

tools/templates/lint-and-validate-values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ jupyterhub:
5353
cull:
5454
enabled: true
5555
users: true
56-
rbac:
57-
enabled: true
5856
hub:
5957
config:
6058
JupyterHub:

0 commit comments

Comments
 (0)