-
Notifications
You must be signed in to change notification settings - Fork 38
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
Minor tweaks to the readme #34
Minor tweaks to the readme #34
Conversation
Woops need to make some refinements to the associated text. |
2393361
to
f7f195c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some misc changes to the README while updating this. I made some comments to spot the actual relevant changes besides some opinionated format changes aligning with black
.
This means that the cull-idle service does not need full administrative privileges anymore. | ||
This means that the configured culler service does not need full administrative privileges anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it was hard to keep track of a registered service name like idle-culler, a role name like cull-idle, and a cli name jupyterhub-idle-culler --- so I opted to name them all jupyterhub-idle-culler and mentions here "the configured culler service" to decouple from whatever name is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is always hard for me! I see both different names for each kind of thing, and using the same name for everything as sources of confusion. I like what you have here.
To me:
- Downside of different names: more names to keep track of
- Downside of the same name: it's harder to see which ones matter that they match (e.g. the role name and service name don't have to be related, but the service name does have to match the name in the services list in the role)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my main objection isn't naming them different things, but that the name cull-idle
as a service name and idle-culler
as a role name felt too arbitrary.
I have seen two practices when naming k8s resources, where the dominant have become to use the same name without adding a suffix of -<type>
, but adding a suffix have also been used for the purpose of clarifying the resource type.
Do you think it would be a better compromise to have a name for the role as jupyterhub-idle-culler-role
and a name for the service as jupyterhub-idle-culler-service
? Then, it would be quite clear I think, and it would not make me confused about what cull-idle
(service) vs idle-culler
(role) is for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed such changes to this PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually have a general preference to avoid redundant names (e.g. service hub-service, pod hub-pod, role my-role), but I think it's a fine compromise in this case, and there's no need to spend too much time picking a few strings in an example!
|
||
```bash | ||
export JUPYTERHUB_API_TOKEN=api_token_above... | ||
python3 -m jupyterhub-idle-culler [--timeout=900] [--url=http://localhost:8081/hub/api] | ||
``` | ||
|
||
The command line interface also gives a quick overview of the different options for configuration. | ||
## Command line flags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this a dedicated section, so it wasn't listed specifically for managed/unmanaged setup.
f7f195c
to
77dd6ea
Compare
@consideRatio go for it! |
Updated PR description
This PR makes some minor tweaks to the README file that I think improved it slightly.
servers
->delete:servers
scope--cull-admin-users
flag listedidle-culler
and referenced service namecull-idle
have been renamed tojupyterhub-idle-culler-service
andjupyterhub-idle-culler-role
.Outdated PR description
I note that read:hub is required, and I think we only need the delete:servers rather than read:servers but would love a confirmation on this idea.
Note that the reason we need read:hub is because we access the /hub/api/info endpoint for a version check of the jupyterhub we work against.
jupyterhub-idle-culler/jupyterhub_idle_culler/__init__.py
Lines 160 to 167 in ae59078
Related
jupyterhub/zero-to-jupyterhub-k8s#2434