Skip to content
Snippets Groups Projects
values.template.yaml 9.11 KiB
Newer Older
# 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/
#

Dung Vu's avatar
Dung Vu committed
hub:
  config:
    CILogonOAuthenticator:
      client_id: $CILOGON_ID
      client_secret: $CILOGON_SECRET
Dung Vu's avatar
Dung Vu committed
      oauth_callback_url: https://csusb-hub-dev.nrp-nautilus.io/hub/oauth_callback
Dung Vu's avatar
Dung Vu committed
#      username_claim: "email"
      admin_users: ["dvu@csusb.edu", "000065181@csusb.edu", "youngsu.kim@csusb.edu", "006501270@csusb.edu"]
Dung Vu's avatar
Dung Vu committed
      allowed_idps:
        https://idp.csusb.edu/idp/shibboleth:
          username_derivation:
              username_claim: "email"
          allowed_domains:
          - csusb.edu
        urn:mace:incommon:ucr.edu:
          username_derivation:
            username_claim: "email"
          allowed_domains:
          - ucr.edu
          - email.ucr.edu
Dung Vu's avatar
Dung Vu committed
      allow_all: false
      allowed_users:
Dung Vu's avatar
Dung Vu committed
        - dmishin@ucsd.edu
Dung Vu's avatar
Dung Vu committed
        - dung.vu@email.ucr.edu
        
Dung Vu's avatar
Dung Vu committed
      blocked_users:
        - brandon.le7991@coyote.csusb.edu
        # CSE faculty
        # IDS faculty
    JupyterHub:
      admin_access: true
      authenticator_class: cilogon

  extraConfig:
    templates: |
      c.JupyterHub.template_paths = ['/etc/jupyterhub/custom']
youngsuKim-CSUSB's avatar
youngsuKim-CSUSB committed
  # https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/1990
Youngsu Kim's avatar
Youngsu Kim committed
  # To use these .gitlab-ci.yml needs to be updated accordingly
  extraFiles:
    image_select_idp:
      mountPath: /usr/local/share/jupyterhub/static/select_idp_cilogon.png

    # Files in /usr/local/etc/jupyterhub/jupyterhub_config.d are
    # automatically loaded in alphabetical order of the final file
    # name when JupyterHub starts.

    # for dynamic resource allocation 
youngsuKim-CSUSB's avatar
youngsuKim-CSUSB committed
    custom_spawner:
      mountPath: /usr/local/etc/jupyterhub/jupyterhub_config.d/my_spawner.py
    # Custom profiles list for the spawner above
    custom_spawner_profile:
      mountPath: /etc/jupyterhub/custom/my_spawner.html

Youngsu Kim's avatar
Youngsu Kim committed
    # Additional custom html files
    custom_login_html:
      mountPath: /etc/jupyterhub/custom/login.html
    custom_page_html:
      mountPath: /etc/jupyterhub/custom/page.html
    custom_spawn_pending_html:
      mountPath: /etc/jupyterhub/custom/spawn_pending.html

Dung Vu's avatar
Dung Vu committed
#.  JupyterHub Start with event log redirection; & cannot be passed in yaml files
Dung Vu's avatar
Dung Vu committed
#    jupyterhub_event_log:
#      mountPath: /etc/jupyterhub/custom/event_command.sh
#      stringData: |
#        #! /bin/bash
#        /usr/local/bin/jupyterhub --config /usr/local/etc/jupyterhub/jupyterhub_config.py --upgrade-db &>> /srv/jupyterhub/event.log
#      mode: 0777
#  
#  args: [ "/etc/jupyterhub/custom/event_command.sh" ]
Youngsu Kim's avatar
Youngsu Kim committed
  image:
    name: jupyterhub/k8s-hub
Dung Vu's avatar
Dung Vu committed
    tag: '3.3.7'
Youngsu Kim's avatar
Youngsu Kim committed
    pullPolicy: ''
    pullSecrets: []

  livenessProbe:
    # The livenessProbe's aim to give JupyterHub sufficient time to startup but
    # be able to restart if it becomes unresponsive for ~5 min.
    enabled: true
    initialDelaySeconds: 300
    periodSeconds: 10
Dung Vu's avatar
Dung Vu committed
    failureThreshold: 300
Youngsu Kim's avatar
Youngsu Kim committed
    timeoutSeconds: 3
  readinessProbe:
    # The readinessProbe's aim is to provide a successful startup indication,
    # but following that never become unready before its livenessProbe fail and
    # restarts it if needed. To become unready following startup serves no
    # purpose as there are no other pod to fallback to in our non-HA deployment.
    enabled: true
Dung Vu's avatar
Dung Vu committed
    initialDelaySeconds: 60
Youngsu Kim's avatar
Youngsu Kim committed
    periodSeconds: 2
    failureThreshold: 1000
    timeoutSeconds: 1


Dung Vu's avatar
Dung Vu committed
  service:
    type: ClusterIP
    annotations: {}
    ports:
      nodePort: 
Dung Vu's avatar
Dung Vu committed
    loadBalancerIP:
Dung Vu's avatar
Dung Vu committed
  nodeSelector:
Dung Vu's avatar
Dung Vu committed
    topology.kubernetes.io/region: "us-west"
#    kubernetes.io/hostname: "node-2-6.sdsc.optiputer.net"
Dung Vu's avatar
Dung Vu committed
#    env: system
Dung Vu's avatar
Dung Vu committed
#  tolerations:
Dung Vu's avatar
Dung Vu committed
#  - key: nautilus.io/csusb
#    operator: Exists
#    effect: NoSchedule  
#  - key: "nautilus.io/rynode"
#    operator: "Exists"
#    effect: "NoSchedule"
Dung Vu's avatar
Dung Vu committed
#  - key: "nautilus.io/csu-tide"
#    operator: "Exists"
#    effect: "NoSchedule"
#  - key: "nautilus.io/sdsu-fix"
#    operator: "Exists"
#    effect: "NoSchedule"
Dung Vu's avatar
Dung Vu committed
  deploymentStrategy:
    type: Recreate
  db:
    type: sqlite-pvc
    pvc:
      accessModes:
        - ReadWriteOnce
      storage: 5Gi
Dung Vu's avatar
Dung Vu committed
      storageClassName: rook-ceph-block-tide
Dung Vu's avatar
Dung Vu committed
  resources:
    limits:
      cpu: "2"
      memory: 4Gi
Dung Vu's avatar
Dung Vu committed
    requests:
      cpu: "2"
      memory: 4Gi
Dung Vu's avatar
Dung Vu committed
  networkPolicy:
    enabled: false
proxy:
  secretToken: '$SECRET_TOKEN'
Dung Vu's avatar
Dung Vu committed
  service:
    type: ClusterIP
  chp:
Dung Vu's avatar
Dung Vu committed
    nodeSelector:
Dung Vu's avatar
Dung Vu committed
      topology.kubernetes.io/region: "us-west"
Dung Vu's avatar
Dung Vu committed
#      topology.kubernetes.io/hostname: "node-2-6.sdsc.optiputer.net"
Dung Vu's avatar
Dung Vu committed
#      env: system
Dung Vu's avatar
Dung Vu committed
#    tolerations:
#    - key: "nautilus.io/csu-tide"
#      operator: "Exists"
#      effect: "NoSchedule"

#    - key: "nautilus.io/sdsu-fix"
#      operator: "Exists"
#      effect: "NoSchedule"
Dung Vu's avatar
Dung Vu committed

#    - key: nautilus.io/csusb
#      operator: Exists
#      effect: NoSchedule
#    - key: "nautilus.io/rynode"
#      operator: "Exists"
#      effect: "NoSchedule"
Dung Vu's avatar
Dung Vu committed
    resources:
      limits:
        cpu: "2"
        memory: 4Gi
Dung Vu's avatar
Dung Vu committed
      requests:
        cpu: "2"
        memory: 4Gi
Dung Vu's avatar
Dung Vu committed
singleuser:
Dung Vu's avatar
Dung Vu committed
  extraPodConfig:
    securityContext:
        fsGroupChangePolicy: "OnRootMismatch"
Dung Vu's avatar
Dung Vu committed
        fsGroup: 100
#        runAsUser: 1099
#        runAsGroup: 1099
#        fsGroup: 1099
Dung Vu's avatar
Dung Vu committed
  allowPrivilegeEscalation: true
Dung Vu's avatar
Dung Vu committed
  extraTolerations: 
Dung Vu's avatar
Dung Vu committed
  - key: "nautilus.io/csu-tide"
Dung Vu's avatar
Dung Vu committed
    operator: "Exists"
    effect: "NoSchedule"
Dung Vu's avatar
Dung Vu committed
  - key: "nautilus.io/sdsu-fix"
Dung Vu's avatar
Dung Vu committed
    operator: "Exists"
    effect: "NoSchedule"

Dung Vu's avatar
Dung Vu committed
#  - key: "nautilus.io/csusb"
#    operator: "Exists"
#    effect: "NoSchedule"
#  - key: "nautilus.io/rynode"
#    operator: "Exists"
#    effect: "NoSchedule"
#  - key: "nautilus.io/testing"
#    operator: "Exists"
#    effect: "NoSchedule"

Dung Vu's avatar
Dung Vu committed
#  extraNodeAffinity:
#    required:
#      - matchExpressions:
#        - 'key': 'topology.kubernetes.io/region'
#          'operator': 'In'
#          'values': ["us-west"]
Dung Vu's avatar
Dung Vu committed
  cloudMetadata:
    blockWithIptables: false
  networkPolicy:
    enabled: false
  storage:
    type: dynamic
    extraLabels: {}
    extraVolumes: []
    extraVolumeMounts: []
Dung Vu's avatar
Dung Vu committed
    capacity: 50Gi
Dung Vu's avatar
Dung Vu committed
#    homeMountPath: /home/jovyan
    homeMountPath: /home/{username}
Dung Vu's avatar
Dung Vu committed
    dynamic:
Dung Vu's avatar
Dung Vu committed
      storageClass: rook-ceph-block-tide
Dung Vu's avatar
Dung Vu committed
      pvcNameTemplate: claim-{username}{servername}
      volumeNameTemplate: volume-{username}{servername}
      storageAccessModes: [ReadWriteOnce]
Youngsu Kim's avatar
Youngsu Kim committed
    # extraVolumes(Mounts) are overriden by the custom spawner -> extraFiles/my_spawner.py
Dung Vu's avatar
Dung Vu committed
    extraVolumes:
Dung Vu's avatar
Dung Vu committed
#      - name: csusb-hpc-share
#        persistentVolumeClaim:
#          claimName: csusb-hub-dev-share-south-east
Dung Vu's avatar
Dung Vu committed
      - name: csusb-cvmfs
        persistentVolumeClaim:
Dung Vu's avatar
Dung Vu committed
          claimName: csusb-cvmfs
Dung Vu's avatar
Dung Vu committed
      - name: scratch
Dung Vu's avatar
Dung Vu committed
        emptyDir: {}
Dung Vu's avatar
Dung Vu committed
# bypass this  
#       - name: mkshare-script
#        configMap:
#          name: mkshare-script
#          defaultMode: 0777
#          optional: true

Dung Vu's avatar
Dung Vu committed
      - name: shm-volume
        emptyDir:
          medium: Memory
Dung Vu's avatar
Dung Vu committed
    extraVolumeMounts:
Dung Vu's avatar
Dung Vu committed
#      - name: csusb-hpc-share
#        mountPath: /home/jovyan/shared        
Dung Vu's avatar
Dung Vu committed
#      - name: csusb-cvmfs
#        mountPath: /csusb-cvmfs
Dung Vu's avatar
Dung Vu committed
# C VMFS automount volumes must be mounted with HostToContainer mount propagation.
Dung Vu's avatar
Dung Vu committed
#        mountPropagation: HostToContainer
Dung Vu's avatar
Dung Vu committed
# bypass this  
#      - name: mkshare-script
#        mountPath: /usr/local/bin/before-notebook.d/mkshare.sh
#        subPath: mkshare.sh  
Dung Vu's avatar
Dung Vu committed
      - name: shm-volume
        mountPath: /dev/shm          
Dung Vu's avatar
Dung Vu committed
      - name: scratch
        mountPath: /home/jovyan/scratch-drive
#      - name: csusb-cvmfs
Dung Vu's avatar
Dung Vu committed
         # It is possible to mount a single CVMFS repository by specifying subPath.
#        subPath: sdsc-nrp-osdf-origin.osgstorage.org/nrp/csusb/software
#        mountPath: /home/jovyan/.software
#        mountPropagation: HostToContainer
Dung Vu's avatar
Dung Vu committed
  image:
Dung Vu's avatar
Dung Vu committed
#    name: gitlab-registry.nrp-nautilus.io/vutiendung/jupyter-stack/minimal
Dung Vu's avatar
Dung Vu committed
    name: gitlab-registry.nrp-nautilus.io/prp/jupyter-stack/minimal
Dung Vu's avatar
Dung Vu committed
    tag: v1.3
#    tag: latest
Dung Vu's avatar
Dung Vu committed
  startTimeout: 600
Dung Vu's avatar
Dung Vu committed
  cpu:
    limit: 16
youngsuKim-CSUSB's avatar
youngsuKim-CSUSB committed
    guarantee: 4
Dung Vu's avatar
Dung Vu committed
  memory:
youngsuKim-CSUSB's avatar
youngsuKim-CSUSB committed
    limit: 16G
    guarantee: 8G
Dung Vu's avatar
Dung Vu committed
  extraResource:
    limits: {}
    guarantees: {}
Dung Vu's avatar
Dung Vu committed
#  cmd: start-notebook.sh    
  cmd: jupyterhub-singleuser    
Dung Vu's avatar
Dung Vu committed
  defaultUrl: "/lab"
youngsuKim-CSUSB's avatar
youngsuKim-CSUSB committed
#   profileList:
#   - display_name: Stack Minimal
#     default: true    
#     kubespawner_override:
#       image_spec: localhost:30081/prp/jupyter-stack/minimal
Dung Vu's avatar
Dung Vu committed
scheduling:
Dung Vu's avatar
Dung Vu committed
  userPlaceholder:
    enabled: false
Dung Vu's avatar
Dung Vu committed
  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
Dung Vu's avatar
Dung Vu committed
  hosts: ["csusb-hub-dev.nrp-nautilus.io"]
Dung Vu's avatar
Dung Vu committed
  pathSuffix: ''
  tls:
    - hosts:
Dung Vu's avatar
Dung Vu committed
      - csusb-hub-dev.nrp-nautilus.io
Dung Vu's avatar
Dung Vu committed
cull:
  enabled: false
Dung Vu's avatar
Dung Vu committed
  users: false
  removeNamedServers: false
  timeout: 3600
  every: 600
Dung Vu's avatar
Dung Vu committed
  concurrency: 10
youngsuKim-CSUSB's avatar
youngsuKim-CSUSB committed
  maxAge: 0