Pip dependency via Helm chart?

I’m attempting to build the ZTJH cluster, but with the LTIAuthenticator activated for auth via LTI1.3

However, it’s unclear how to pip install jupyterhub-ltiauthenticator as part of the Helm set up. As of now, my hub is failing with

[C 2024-09-13 01:44:46.594 JupyterHub application:89] Bad config encountered during initialization: The 'authenticator_class' trait of <jupyterhub.app.JupyterHub object at 0x7f07f08220d0> instance must be a type, but 'ltiauthenticator.lti13.auth.LTI13Authenticator' could not be imported

…which I take to mean it’s not pip installed and therefore can’t be imported.

My current helm chart:


# This file can update the JupyterHub Helm chart's default configuration values.
#
# For reference see the configuration reference and default values, but make
# sure to refer to the Helm chart version of interest to you!
#
# Introduction to YAML:     https://www.youtube.com/watch?v=cdLNKUoMc6c
# Chart config reference:   https://zero-to-jupyterhub.readthedocs.io/en/stable/resources/reference.html
# Chart default values:     https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/22c397dd80e865941386f0aa85799e094038657f/jupyterhub/values.yaml
# Available chart versions: https://hub.jupyter.org/helm-chart/
#
# Custom config for JupyterHub's helm chart

debug:
  enabled: true

scheduling:
  userScheduler:
    enabled: false

hub:
  config:
    JupyterHub:
      authenticator_class: ltiauthenticator.lti13.auth.LTI13Authenticator
      log_level: DEBUG
    LTI13Authenticator:
      # Use an LTI 1.3 claim to set the username. You can use and LTI 1.3 claim that
      # identifies the user, such as email, last_name, etc.
      username_key: "username"
      # The issuer identifier of the platform
      issuer: "https://(my LMS domain)/"
      # The LTI 1.3 authorization url
      authorize_url: "https://(my LMS domain)/lti/authorize_redirect"
      # The platform's JWKS endpoint url providing public key sets used to verify the ID token
      jwks_endpoint: "https://(my LMS domain)/lti/security/jwks"
      # The external tool's client id as represented within the platform (LMS)
      # Typically created by the platform when registering the tool.
      client_id:
        # DMcQ: by conventions I'm setting this to 1 in the LMS for my experiment.
        - "1" 
  networkPolicy:
    egress:
      - ports:
          - port: 6443
          - port: 443


singleuser: 

  # Setting a global start_timeout instead of 'per profile'
  startTimeout: 3600

Which version of the chart are you using?

hi @manics

I (think) I’m using the latest per this command when building the helm chart:

helm upgrade --cleanup-on-fail \
  --install helm-jh-test jupyterhub/jupyterhub --version 4.0.0-0.dev.git.6717.h61ab116 \
  --namespace my-jh-test \
  --create-namespace \
  --version=1 \
  --values config.yaml

You’ve got two conflicting version arguments in your command --version 4.0.0-0.dev.git.6717.h61ab116 and --version=1, maybe the wrong version is being installed?

1 Like

Thanks @manics I went through so many iterations I was blind to that :grimacing: