apiVersion: apps/v1
kind: Deployment
metadata:
  name: notebook
  labels:
    app: notebook
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      deployment: notebook
  template:
    metadata:
      labels:
        deployment: notebook
    spec:
      containers:
      - name: notebook
        image: jupyter/minimal-notebook:latest
        args:
        - start-notebook.sh
        - --config
        - /var/run/jupyter/jupyter_notebook_config.json
        - --ip=0.0.0.0
        - --port=8888
        ports:
        - name: 8888-tcp
          containerPort: 8888
          protocol: TCP
        resources:
          limits:
            memory: 512Mi
          requests:
            memory: 512Mi
        env:
        - name: JUPYTER_ENABLE_LAB
          value: "true"
        volumeMounts:
        - name: config
          mountPath: /var/run/jupyter
        - name: data
          mountPath: /home/jovyan
      volumes:
      - name: config
        configMap:
          name: notebook
      - name: data
        persistentVolumeClaim:
          claimName: notebook
