# Prepuller for images used by notebooks
# Should be synced with jupyterhub-config
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: jupyterhub-prepuller
  labels:
    app: jupyterhub-prepuller
spec:
  selector:
    matchLabels:
        app: jupyterhub-prepuller
  template:
    metadata:
      labels:
        app: jupyterhub-prepuller
    spec:
      tolerations:
      - key: "role"
        operator: "Equal"
        value: "jupyter"
        effect: "NoSchedule"
      nodeSelector:
        role: jupyter
      terminationGracePeriodSeconds: 0
      automountServiceAccountToken: false
      containers:
      - name: pause
        image: gcr.io/google_containers/pause-amd64:3.1
      initContainers:
      - name: image-pull-minimal
        image: jupyter/minimal-notebook:d29a0f617484
        imagePullPolicy: IfNotPresent
        command:
          - /bin/sh
          - -c
          - echo "Pulling complete"
