Skip to content

Commit

Permalink
Change names of groups in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed May 30, 2024
1 parent 5100c60 commit 300f49d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions jupyterhub/spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,23 +330,23 @@ def _default_access_scopes(self):
The following example config will:
1. Add the environment variable "AM_I_USER" to everyone in the "user" group
2. Add the environment variable "AM_I_ADMIN" to everyone in the "admin" group.
If a user is part of both "user" and "admin", they will get *both* these env
1. Add the environment variable "AM_I_GROUP_ALPHA" to everyone in the "group-alpha" group
2. Add the environment variable "AM_I_GROUP_BETA" to everyone in the "group-beta" group.
If a user is part of both "group-beta" and "group-alpha", they will get *both* these env
vars, due to the dictionary merging functionality.
3. Add a higher memory limit for everyone in the "admin" group.
3. Add a higher memory limit for everyone in the "group-beta" group.
c.Spawner.group_overrides = {
"01-admin-env-add": {
"groups": ["admin"],
"spawner_override": {"environment": {"AM_I_ADMIN": "yes"}},
"01-group-alpha-env-add": {
"groups": ["group-alpha"],
"spawner_override": {"environment": {"AM_I_GROUP_ALPHA": "yes"}},
},
"02-user-env-add": {
"groups": ["user"],
"spawner_override": {"environment": {"AM_I_USER": "yes"}},
"02-group-beta-env-add": {
"groups": ["group-beta"],
"spawner_override": {"environment": {"AM_I_GROUP_BETA": "yes"}},
},
"03-admin-mem-limit": {
"groups": ["admin"],
"03-group-beta-mem-limit": {
"groups": ["group-beta"],
"spawner_override": {"mem_limit": "2G"}
}
}
Expand Down

0 comments on commit 300f49d

Please sign in to comment.