# 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/HEAD/jupyterhub/values.yaml
# Available chart versions: https://jupyterhub.github.io/helm-chart/
#

hub:
  config:
    CILogonOAuthenticator:
      client_id: $CILOGON_ID
      client_secret: $CILOGON_SECRET
      oauth_callback_url: https://csusb-jupyter.nrp-nautilus.io/hub/oauth_callback
      username_claim: "email"
    JupyterHub:
      admin_access: true
      admin_users: ["dvu@csusb.edu", "000065181@csusb.edu", "youngsu.kim@csusb.edu", "006501270@csusb.edu"]
      authenticator_class: cilogon
  service:
    type: ClusterIP
    annotations: {}
    ports:
      nodePort: 
    loadBalancerIP:
  deploymentStrategy:
    type: Recreate
  db:
    type: sqlite-pvc
    pvc:
      accessModes:
        - ReadWriteOnce
      storage: 5Gi
      storageClassName: rook-ceph-block
  resources:
    limits:
      cpu: "2"
      memory: 4Gi
    requests:
      cpu: "2"
      memory: 4Gi
  networkPolicy:
    enabled: false
proxy:
  secretToken: '$SECRET_TOKEN'
  service:
    type: ClusterIP
  chp:
    resources:
      limits:
        cpu: "2"
        memory: 8Gi
      requests:
        cpu: "2"
        memory: 8Gi
singleuser:
  extraNodeAffinity:
    required:
      - matchExpressions:
        - 'key': 'topology.kubernetes.io/region'
          'operator': 'In'
          'values': ["us-west"]
  cloudMetadata:
    blockWithIptables: false
  networkPolicy:
    enabled: false
  storage:
    type: dynamic
    extraLabels: {}
    extraVolumes: []
    extraVolumeMounts: []
    capacity: 50Gi
    homeMountPath: /home/jovyan
    dynamic:
      storageClass: rook-ceph-block
      pvcNameTemplate: claim-{username}{servername}
      volumeNameTemplate: volume-{username}{servername}
      storageAccessModes: [ReadWriteOnce]
    extraVolumes:
      - name: jupyterhub-shared
        persistentVolumeClaim:
          claimName: csusb-jupyterhub-share-cephfs
    extraVolumeMounts:
      - name: jupyterhub-shared
        mountPath: /home/shared        
  image:
    name: localhost:30081/prp/jupyter-stack/prp
    tag: latest
  startTimeout: 600
  cpu:
    limit: 4
    guarantee: 4
  memory:
    limit: 64G
    guarantee: 8G
  extraResource:
    limits: {}
    guarantees: {}
  cmd: jupyterhub-singleuser
  defaultUrl: "/lab"
  profileList:
  - display_name: Stack Minimal
    default: true    
    kubespawner_override:
      image_spec: localhost:30081/prp/jupyter-stack/minimal
  - display_name: Stack Minimal + Desktop GUI + Relion
    kubespawner_override:
      image_spec: localhost:30081/prp/jupyter-stack/relion-desktop
  - display_name: Stack All Spark
    kubespawner_override:
      image_spec: localhost:30081/prp/jupyter-stack/all-spark
      extra_resource_limits:
        nvidia.com/gpu: "1"
  - display_name: Stack Datascience
    kubespawner_override:
      image_spec: localhost:30081/prp/jupyter-stack/datascience
      extra_resource_limits:
        nvidia.com/gpu: "1"
  - display_name: Stack Tensorflow + PRP libraries
    kubespawner_override:
      image_spec: localhost:30081/prp/jupyter-stack/prp
      extra_resource_limits:
        nvidia.com/gpu: "2"
  - display_name: Stack R-Studio
    kubespawner_override:
      image_spec: localhost:30081/prp/jupyter-stack/r-studio
  - display_name: Stack Pyspark
    kubespawner_override:
      image_spec: localhost:30081/prp/jupyter-stack/pyspark
      extra_resource_limits:
        nvidia.com/gpu: "2"
  - display_name: Stack SageMath
    kubespawner_override:
      image_spec: sharptrick/sage-notebook
#  lifecycleHooks:
#    postStart:
#      exec:
#        command:
#          - "sh"
#          - "-c"
#          - >
#            ln -s /home/shared ~/shared
scheduling:
  userScheduler:
    enabled: false
# prePuller relates to the hook|continuous-image-puller DaemonsSets
prePuller:
  hook:
    enabled: false
  continuous:
    enabled: false

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: haproxy
  hosts: ["csusb-jupyter.nrp-nautilus.io"]
  pathSuffix: ''
  tls:
    - hosts:
      - csusb-jupyter.nrp-nautilus.io

cull:
  enabled: true
  users: false
  removeNamedServers: false
  timeout: 3600
  every: 600
  concurrency: 50
  maxAge: 0
