apiVersion: apps/v1
kind: Deployment
metadata:
  name: shared-resource-csi-driver-operator
  namespace: openshift-cluster-csi-drivers
spec:
  replicas: 1
  selector:
    matchLabels:
      name: shared-resource-csi-driver-operator
  strategy: {}
  template:
    metadata:
      annotations:
        target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
      labels:
        name: shared-resource-csi-driver-operator
    spec:
      containers:
      - args:
        - start
        - -v=${LOG_LEVEL}
        env:
        - name: DRIVER_IMAGE
          value: ${DRIVER_IMAGE}
        - name: NODE_DRIVER_REGISTRAR_IMAGE
          value: ${NODE_DRIVER_REGISTRAR_IMAGE}
        - name: WEBHOOK_IMAGE
          value: ${WEBHOOK_IMAGE}
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        image: ${OPERATOR_IMAGE}
        imagePullPolicy: IfNotPresent
        name: shared-resource-csi-driver-operator
        resources:
          requests:
            memory: 50Mi
            cpu: 10m
        ports:
        - name: provisioner-m
          containerPort: 6000
          protocol: TCP
        volumeMounts:
        - mountPath: /etc/secrets
          name: shared-resource-csi-driver-operator-metrics-serving-cert
      priorityClassName: system-cluster-critical
      serviceAccountName: shared-resource-csi-driver-operator
      nodeSelector:
        node-role.kubernetes.io/master: ""
      tolerations:
      - key: CriticalAddonsOnly
        operator: Exists
      - key: node-role.kubernetes.io/master
        operator: Exists
        effect: "NoSchedule"
      volumes:
      - name: shared-resource-csi-driver-operator-metrics-serving-cert
        secret:
          defaultMode: 420
          secretName: shared-resource-csi-driver-operator-metrics-serving-cert
