apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: openshift-cluster-storage-operator
  name: csi-snapshot-controller-operator
  labels:
    app: csi-snapshot-controller-operator
  annotations:
    config.openshift.io/inject-proxy: operator
    exclude.release.openshift.io/internal-openshift-hosted: "true"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: csi-snapshot-controller-operator
  template:
    metadata:
      name: csi-snapshot-controller-operator
      labels:
        app: csi-snapshot-controller-operator
    spec:
      serviceAccountName: csi-snapshot-controller-operator
      containers:
      - name: operator
        image: quay.io/openshift/origin-cluster-csi-snapshot-controller-operator:latest
        imagePullPolicy: IfNotPresent
        resources:
          requests:
            memory: 50Mi
            cpu: 10m
        args: [ "start", "-v", "5" , "--config=/var/run/configmaps/config/operator-config.yaml"]
        env:
        - name: OPERAND_IMAGE
          value: quay.io/openshift/origin-csi-snapshot-controller
        - name: OPERATOR_IMAGE_VERSION
          value: "0.0.1-snapshot"
        - name: OPERAND_IMAGE_VERSION
          value: "0.0.1-snapshot"
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        terminationMessagePolicy: FallbackToLogsOnError
        volumeMounts:
        - mountPath: /var/run/configmaps/config
          name: config
      volumes:
      - name: config
        configMap:
          defaultMode: 440
          name: csi-snapshot-controller-operator-config
      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"
