---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator
    app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator
    app.kubernetes.io/name: ibm-spectrum-scale-csi-operator
    product: ibm-spectrum-scale-csi
    release: ibm-spectrum-scale-csi-operator
  name: ibm-spectrum-scale-csi-operator
  namespace: ibm-spectrum-scale-csi-driver
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: ibm-spectrum-scale-csi-operator
  template:
    metadata:
      annotations:
        productID: ibm-spectrum-scale-csi-operator
        productName: IBM Spectrum Scale CSI Operator
        productVersion: 2.5.1
      labels:
        app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator
        app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator
        app.kubernetes.io/name: ibm-spectrum-scale-csi-operator
        name: ibm-spectrum-scale-csi-operator
        product: ibm-spectrum-scale-csi
        release: ibm-spectrum-scale-csi-operator
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: kubernetes.io/arch
                    operator: In
                    values:
                    - amd64
                    - ppc64le
                    - s390x
      containers:
        - args:
          - --leaderElection=true
          env:
          - name: METRICS_BIND_ADDRESS
            value: "8383"
          - name: WATCH_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: CSI_DRIVER_IMAGE
            value: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-driver@sha256:875c3c7a3c13831664b88c000708e49c149d1fa90be3d2bd761c38456b424927
          image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator@sha256:f3645991a4eacd02a55bd2dd4c0550a6fc16e38ce893704158ab53f421b9db7a
          imagePullPolicy: IfNotPresent
          livenessProbe:
            exec:
              command:
                - ./health_check.sh
            initialDelaySeconds: 10
            periodSeconds: 30
          name: operator
          readinessProbe:
            exec:
              command:
                - ./health_check.sh
            initialDelaySeconds: 3
            periodSeconds: 1
          resources:
            limits:
              cpu: 600m
              memory: 600Mi
              ephemeral-storage: 5Gi
            requests:
              cpu: 50m
              memory: 50Mi
              ephemeral-storage: 5Gi
          #hostNetwork: false
          #hostPID: false
          #hostIPC: false
          securityContext:
            runAsNonRoot: true
            runAsUser: 1001
            readOnlyRootFilesystem: false
            allowPrivilegeEscalation: false
            privileged: false
            capabilities:
              drop:
                - ALL
      serviceAccountName: ibm-spectrum-scale-csi-operator
