Skip to content
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

Update our hub-health service to properly set roles #1974

Open
sgibson91 opened this issue Dec 5, 2022 · 2 comments
Open

Update our hub-health service to properly set roles #1974

sgibson91 opened this issue Dec 5, 2022 · 2 comments

Comments

@sgibson91
Copy link
Member

Context

Warning in the JupyterHub logs:

[W 2022-12-05 10:49:52.801 JupyterHub app:2312] Service hub-health sets `admin: True`, which is deprecated in JupyterHub 2.0. You can assign now assign roles via `JupyterHub.load_roles` configuration. If you specify services in the admin role configuration, the Service admin flag will be ignored.

We should update our helm chart accordingly.

Proposal

No response

Updates and actions

No response

@sgibson91
Copy link
Member Author

Needs investigation to see if this is still the case or if it has resolved itself

@consideRatio
Copy link
Contributor

The permissions for the health check should still should be narrowed to the relevant permissions only:

# hub-health service helps us run health checks from the deployer script.
# The JupyterHub Helm chart will automatically generate an API token for
# services and expose it in a k8s Secret named `hub`. When we run health
# tests against a hub, we read this token from the k8s Secret to acquire
# the credentials needed to interacting with the JupyterHub API.
#
hub-health:
# FIXME: With JupyterHub 2 we can define a role for this service with
# more tightly scoped permissions based on our needs.
#
admin: true

Action points

  • Identify required JupyterHub RBAC permissions
  • Declare an entry for hub.loadRoles with the permissions (scopes) in basehub, applying it to the hub-health jupyterhub service.
    jupyterhub:
      hub:
        loadRoles:
          hub-health:
            # scopes should at least include permissions to start the
            # user server for the user "deployment-service-check"
            scopes: [???]
            services: [hub-health]

Btw a bug to be aware about is that changes to hub.loadRoles doesn't yet trigger a restart of the hub pod as it should, see jupyterhub/zero-to-jupyterhub-k8s#3251.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Needs Shaping / Refinement
Development

No branches or pull requests

2 participants