@@ -48,6 +48,10 @@ jupyterhub:
4848 allowed_organizations :
4949 - 2i2c-org:hub-access-for-2i2c-staff
5050 - nucleus-eng:hub-access
51+ - nucleus-eng:nucleus-eng-hub-access
52+ - nucleus-eng:devcells-all-nodes
53+ - nucleus-eng:devcells-chicago-node
54+ - nucleus-eng:devcells-london-node
5155 Authenticator :
5256 admin_users :
5357 - antonjs
@@ -59,6 +63,92 @@ jupyterhub:
5963 - servers!server
6064 - read:users:name
6165 - list:users
66+ extraConfig :
67+ 000-volumes-and-volume-mounts-as-dict : |
68+ # The base jupyterhub config in zero-to-jupyterhub defines
69+ # volumes and volume_mounts as lists.
70+ # But we can't add new volumes or volume_mounts to the list
71+ # as that replaces the entire list.
72+ # So we convert them to dictionaries, which allows us to
73+ # add new volumes and volume_mounts as needed.
74+ if isinstance(c.KubeSpawner.volumes, list):
75+ existing_volumes = c.KubeSpawner.volumes
76+ c.KubeSpawner.volumes = {}
77+ for volume in existing_volumes:
78+ c.KubeSpawner.volumes[volume["name"]] = volume
79+ if isinstance(c.KubeSpawner.volume_mounts, list):
80+ existing_volume_mounts = c.KubeSpawner.volume_mounts
81+ c.KubeSpawner.volume_mounts = {}
82+ for idx, volume_mount in enumerate(existing_volume_mounts):
83+ c.KubeSpawner.volume_mounts[f"{idx}-{volume_mount['name']}"] = volume_mount
84+ 001-group-shared-directories : |
85+ c.KubeSpawner.group_overrides = {
86+ "00-group-hub-access-for-2i2c-staff": {
87+ "groups": ["2i2c-org:hub-access-for-2i2c-staff"],
88+ "spawner_override": {
89+ "volume_mounts": {
90+ "00-group-hub-access-for-2i2c-staff": {
91+ "name": "home",
92+ "mountPath": "/home/jovyan/shared-group-projects/hub-access-for-2i2c-staff",
93+ "subPath": "_shared-group-projects/hub-access-for-2i2c-staff",
94+ "readOnly": False
95+ },
96+ }
97+ },
98+ },
99+ "01-group-nucleus-hub-access": {
100+ "groups": ["nucleus-eng:nucleus-eng-hub-access"],
101+ "spawner_override": {
102+ "volume_mounts": {
103+ "00-group-hub-access-for-nucleus-eng-hub-access": {
104+ "name": "home",
105+ "mountPath": "/home/jovyan/shared-group-projects/nucleus-eng-hub-access",
106+ "subPath": "_shared-group-projects/nucleus-eng-hub-access",
107+ "readOnly": False
108+ },
109+ }
110+ },
111+ },
112+ "02-group-nucleus-devcells-london-node": {
113+ "groups": ["nucleus-eng:devcells-london-node"],
114+ "spawner_override": {
115+ "volume_mounts": {
116+ "00-group-hub-access-for-devcells-london-node": {
117+ "name": "home",
118+ "mountPath": "/home/jovyan/shared-group-projects/devcells-london-node",
119+ "subPath": "_shared-group-projects/devcells-london-node",
120+ "readOnly": False
121+ },
122+ }
123+ },
124+ },
125+ "03-group-nucleus-devcells-chicago-node": {
126+ "groups": ["nucleus-eng:devcells-chicago-node"],
127+ "spawner_override": {
128+ "volume_mounts": {
129+ "00-group-hub-access-for-devcells-chicago-node": {
130+ "name": "home",
131+ "mountPath": "/home/jovyan/shared-group-projects/devcells-chicago-node",
132+ "subPath": "_shared-group-projects/devcells-chicago-node",
133+ "readOnly": False
134+ },
135+ }
136+ },
137+ },
138+ "04-group-nucleus-devcells-all-nodes": {
139+ "groups": ["nucleus-eng:devcells-all-nodes"],
140+ "spawner_override": {
141+ "volume_mounts": {
142+ "00-group-hub-access-for-devcells-all-nodes": {
143+ "name": "home",
144+ "mountPath": "/home/jovyan/shared-group-projects/devcells-all-nodes",
145+ "subPath": "_shared-group-projects/devcells-all-nodes",
146+ "readOnly": False
147+ },
148+ }
149+ },
150+ },
151+ }
62152 scheduling :
63153 userScheduler :
64154 enabled : true
0 commit comments