kind: ConfigMap
apiVersion: v1
metadata:
  name: jupyter-singleuser-profiles
data:
  jupyterhub-singleuser-profiles.yaml: |
    profiles:
      - name: globals
        env:
        - name: THIS_IS_GLOBAL
          value: "This will appear in all singleuser pods"
        - name: MYAPP_SECRET_TOKEN
          valueFrom:
            secretKeyRef:
              key: SECRET_TOKEN
              name: testing-secret-token
        - name: MY_CONFIGMAP_VALUE
          valueFrom:
            configMapKeyRef:
              name: myconfigmap
              key: mykey
        resources:
          requests:
            memory: "500Mi"
            cpu: "250m"
          limits:
            memory: "1Gi"
            cpu: "500m"
      - name: Special Nodes
        users:
        - acorvin
        # Set OpenShift node tolerations for a notebook pod. See https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ for more information.
        node_tolerations:
          - key: some_node_label
            operator: Equal
            value: label_target_value
            effect: NoSchedule
        # Set OpenShift node affinity for a notebook pod. See https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ for more information.
        node_affinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                - key: some_node_label
                  operator: In
                  values:
                  - label_target_value_1
                  - label_target_value_2
      - name: Thoth Notebooks
        images:
        - 's2i-thoth-notebook:3.6'
        users:
        - vpavlin
        - fpokorny
        env:
        - name: THOTH_DEPLOYMENT_NAME
          value: thoth-test-core
        - name: THOTH_CEPH_BUCKET
          value: DH-DEV-DATA
        - name: THOTH_CEPH_BUCKET_PREFIX
          value: data/thoth
        - name: THOTH_JANUSGRAPH_PORT
          value: '80'
        resources:
          requests:
            memory: "1Gi"
            cpu: "500m"
          limits:
            memory: "2Gi"
            cpu: "1"
      - name: Spark Notebook
        images:
        - 's2i-spark-notebook:3.6'
        services:
          spark:
            resources:
            - name: spark-cluster-template
              path: sparkClusterTemplate
            configuration:
              worker_instances: 1
              worker_memory_limit: 4Gi
              master_memory_limit: 1Gi
            labels:
              opendatahub.io/component: jupyterhub
            return:
              SPARK_CLUSTER: 'metadata.name'
          airflow:
            resources:
            - name: jupyter-services-template
              path: airflowCluster
            - name: jupyter-services-template
              path: airflowBase
    sizes:
      - name: Small
        resources:
          requests:
            memory: "1Gi"
            cpu: "1"
          limits:
            memory: "2Gi"
            cpu: "2"
      - name: Medium
        resources:
          requests:
            memory: "2Gi"
            cpu: "2"
          limits:
            memory: "4Gi"
            cpu: "4"
      - name: Large
        resources:
          requests:
            memory: "4Gi"
            cpu: "4"
          limits:
            memory: "8Gi"
            cpu: "8"
