# Configuration file for the Jupyter UI.
#
# Each Jupyter UI option is configured by two keys: 'value' and 'readOnly'
# - The 'value' key contains the default value
# - The 'readOnly' key determines if the option will be available to users
#
# If the 'readOnly' key is present and set to 'true', the respective option
# will be disabled for users and only set by the admin. Also when a
# Notebook is POSTED to the API if a necessary field is not present then
# the value from the config will be used.
#
# If the 'readOnly' key is missing (defaults to 'false'), the respective option
# will be available for users to edit.
#
# Note that some values can be templated. Such values are the names of the
# Volumes as well as their StorageClass
spawnerFormDefaults:
  image:
    # The container Image for the user's Jupyter Notebook
    value: kubeflownotebookswg/jupyter-scipy:v1.7.0
    # The list of available standard container Images
    options:
    - kubeflownotebookswg/jupyter-scipy:v1.7.0
    - kubeflownotebookswg/jupyter-pytorch-full:v1.7.0
    - kubeflownotebookswg/jupyter-pytorch-cuda-full:v1.7.0
    - kubeflownotebookswg/jupyter-tensorflow-full:v1.7.0
    - kubeflownotebookswg/jupyter-tensorflow-cuda-full:v1.7.0
  imageGroupOne:
    # The container Image for the user's Group One Server
    # The annotation `notebooks.kubeflow.org/http-rewrite-uri: /`
    # is applied to notebook in this group, configuring
    # the Istio rewrite for containers that host their web UI at `/`
    value: kubeflownotebookswg/codeserver-python:v1.7.0
    # The list of available standard container Images
    options:
    - kubeflownotebookswg/codeserver-python:v1.7.0
  imageGroupTwo:
    # The container Image for the user's Group Two Server
    # The annotation `notebooks.kubeflow.org/http-rewrite-uri: /`
    # is applied to notebook in this group, configuring
    # the Istio rewrite for containers that host their web UI at `/`
    # The annotation `notebooks.kubeflow.org/http-headers-request-set`
    # is applied to notebook in this group, configuring Istio
    # to add the `X-RStudio-Root-Path` header to requests
    value: kubeflownotebookswg/rstudio-tidyverse:v1.7.0
    # The list of available standard container Images
    options:
    - kubeflownotebookswg/rstudio-tidyverse:v1.7.0
  # If true, hide registry and/or tag name in the image selection dropdown
  hideRegistry: true
  hideTag: false
  allowCustomImage: true
  # If true, users can input custom images
  # If false, users can only select from the images in this config
  imagePullPolicy:
    # Supported values: Always, IfNotPresent, Never
    value: IfNotPresent
    readOnly: false
  cpu:
    # CPU for user's Notebook
    value: '0.5'
    # Factor by with to multiply request to calculate limit
    # if no limit is set, to disable set "none"
    limitFactor: "1.2"
    readOnly: false
  memory:
    # Memory for user's Notebook
    value: 1.0Gi
    # Factor by with to multiply request to calculate limit
    # if no limit is set, to disable set "none"
    limitFactor: "1.2"
    readOnly: false
  environment:
    value: {}
    readOnly: false
  workspaceVolume:
    # Workspace Volume to be attached to user's Notebook
    # If you don't want a workspace volume then delete the 'value' key
    value:
      mount: /home/jovyan
      newPvc:
        metadata:
          name: '{notebook-name}-workspace'
        spec:
          resources:
            requests:
              storage: 10Gi
          accessModes:
          - ReadWriteOnce
    readOnly: false
  dataVolumes:
    # List of additional Data Volumes to be attached to the user's Notebook
    value: []
    # For example, a list with 2 Data Volumes:
    # value:
    #   - mount: /home/jovyan/datavol-1
    #     newPvc:
    #       metadata:
    #         name: '{notebook-name}-datavol-1'
    #       spec:
    #         resources:
    #           requests:
    #             storage: 5Gi
    #         accessModes:
    #           - ReadWriteOnce
    #   - mount: /home/jovyan/datavol-1
    #     existingSource:
    #       persistentVolumeClaim:
    #         claimName: test-pvc
    readOnly: false
  gpus:
    # Number of GPUs to be assigned to the Notebook Container
    value:
      # values: "none", "1", "2", "4", "8"
      num: "none"
      # Determines what the UI will show and send to the backend
      vendors:
      - limitsKey: "nvidia.com/gpu"
        uiName: "NVIDIA"
      - limitsKey: "amd.com/gpu"
        uiName: "AMD"
      # Values: "" or a `limits-key` from the vendors list
      vendor: ""
    readOnly: false
  affinityConfig:
    # If readonly, the default value will be the only option
    # value is a list of `configKey`s that we want to be selected by default
    value: ""
    # The list of available affinity configs
    options: []
    #options:
    #  - configKey: "exclusive__n1-standard-2"
    #    displayName: "Exclusive: n1-standard-2"
    #    affinity:
    #      # (Require) Node having label: `node_pool=notebook-n1-standard-2`
    #      nodeAffinity:
    #        requiredDuringSchedulingIgnoredDuringExecution:
    #          nodeSelectorTerms:
    #            - matchExpressions:
    #                - key: "node_pool"
    #                  operator: "In"
    #                  values:
    #                   - "notebook-n1-standard-2"
    #      # (Require) Node WITHOUT existing Pod having label: `notebook-name`
    #      podAntiAffinity:
    #        requiredDuringSchedulingIgnoredDuringExecution:
    #          - labelSelector:
    #              matchExpressions:
    #                - key: "notebook-name"
    #                  operator: "Exists"
    #            namespaces: []
    #            topologyKey: "kubernetes.io/hostname"
    #readOnly: false
  tolerationGroup:
    # The default `groupKey` from the options list
    # If readonly, the default value will be the only option
    value: ""
    # The list of available tolerationGroup configs
    options: []
    #options:
    #  - groupKey: "group_1"
    #    displayName: "Group 1: description"
    #    tolerations:
    #      - key: "key1"
    #        operator: "Equal"
    #        value: "value1"
    #        effect: "NoSchedule"
    #      - key: "key2"
    #        operator: "Equal"
    #        value: "value2"
    #        effect: "NoSchedule"
    readOnly: false
  shm:
    value: true
    readOnly: false
  configurations:
    # List of labels to be selected, these are the labels from PodDefaults
    # value:
    #   - add-gcp-secret
    #   - default-editor
    value: []
    readOnly: false
