kind: Deployment
apiVersion: apps/v1
metadata:
  name: csi-snapshot-controller
  namespace: openshift-cluster-storage-operator
spec:
  serviceName: "csi-snapshot-controller"
  replicas: 1
  selector:
    matchLabels:
      app: csi-snapshot-controller
  template:
    metadata:
      labels:
        app: csi-snapshot-controller
    spec:
      serviceAccount: csi-snapshot-controller
      containers:
        - name: snapshot-controller
          image: quay.io/k8scsi/snapshot-controller:v2.2.0-rc1
          args:
            - "--v=5"
            - "--leader-election=true"
          imagePullPolicy: IfNotPresent
          resources:
            requests:
              # TODO: measure on a real cluster
              cpu: 10m
              memory: 50Mi
      priorityClassName: "system-cluster-critical"
      nodeSelector:
        node-role.kubernetes.io/master: ""
      tolerations:
      - key: "node.kubernetes.io/unreachable"
        operator: "Exists"
        effect: "NoExecute"
        tolerationSeconds: 120
      - key: "node.kubernetes.io/not-ready"
        operator: "Exists"
        effect: "NoExecute"
        tolerationSeconds: 120
      - key: node-role.kubernetes.io/master
        operator: Exists
        effect: "NoSchedule"
