---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ember-csi-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: ember-csi-operator
  template:
    metadata:
      labels:
        name: ember-csi-operator
    spec:
      serviceAccountName: ember-csi-operator
      terminationGracePeriodSeconds: 120
      containers:
        - name: ember-csi-operator
          image: quay.io/embercsi/ember-csi-operator:latest
          ports:
          - containerPort: 60000
            name: metrics
          command:
          - ember-csi-operator
          args: ["-v=3"]
          imagePullPolicy: Always
          readinessProbe:
            exec:
              command:
                - stat
                - /tmp/operator-sdk-ready
            initialDelaySeconds: 4
            periodSeconds: 10
            failureThreshold: 1
          env:
              # currently supported: default, ocp-3.10, ocp-3.11, k8s-v1.10, k8s-v1.11, k8s-v1.12, k8s-v1.13, k8s-v1.14
            - name: X_EMBER_OPERATOR_CLUSTER
              value: default
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "ember-csi-operator"

