apiVersion: apps/v1
kind: Deployment
metadata:
  name: ibm-block-csi-operator
  namespace: default
  labels:
    product: ibm-block-csi-driver
    csi: ibm
    app.kubernetes.io/name: ibm-block-csi-operator
    app.kubernetes.io/instance: ibm-block-csi-operator
    app.kubernetes.io/managed-by: ibm-block-csi-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: ibm-block-csi-operator
  template:
    metadata:
      labels:
        app.kubernetes.io/name: ibm-block-csi-operator
        app.kubernetes.io/instance: ibm-block-csi-operator
        app.kubernetes.io/managed-by: ibm-block-csi-operator
        product: ibm-block-csi-driver
        csi: ibm
      annotations:
        productName: "IBM Block CSI Driver"
        productID: "5027566ef6c54de49028be7df25119e1"
        productVersion: "1.7.0"
        productMetric: "FREE"
    spec:
      serviceAccountName: ibm-block-csi-operator
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: kubernetes.io/arch
                    operator: In
                    values:
                      - amd64
                      - s390x
                      - ppc64le
      containers:
      - name: ibm-block-csi-operator
        resources:
          requests:
            memory: 100Mi
            cpu: 50m
          limits:
            memory: 200Mi
            cpu: 100m
        readinessProbe:
          exec:
            command: ["./health_check.sh"]
          initialDelaySeconds: 3
          periodSeconds: 1
        livenessProbe:
          exec:
            command: ["./health_check.sh"]
          initialDelaySeconds: 10
          periodSeconds: 30
        securityContext:
          capabilities:
            drop:
            - ALL
        image: ibmcom/ibm-block-csi-operator:1.7.0
        imagePullPolicy: IfNotPresent
        command:
        - ibm-block-csi-operator
        args:
        - --zap-encoder
        - console
        env:
        - name: WATCH_NAMESPACE
          value: ""
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: OPERATOR_NAME
          value: "ibm-block-csi-operator"
        #- name: ENDPOINT
        #  value: "unix:///storage/storage.sock:10086"
        #- name: ISCSI_AGENT_PORT
        #  value: "10086"
        #volumeMounts:
        #- name: socket-dir
        #  mountPath: /storage/
      #- name: ibm-storage-agent
        #image: ibmcom/ibm-storage-agent:0.0.4
        #imagePullPolicy: IfNotPresent
        #env:
        #- name: ENDPOINT
        #  value: "unix:///storage/storage.sock:10086"
        #volumeMounts:
        #- name: socket-dir
        #  mountPath: /storage/

      #volumes:
      #- name: socket-dir
        #emptyDir: {}
