---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: hpe-csi-operator
  namespace: hpe-csi
  labels:
    product: hpe-csi-driver
    csi: hpe
    app.kubernetes.io/name: hpe-csi-operator
    app.kubernetes.io/instance: hpe-csi-operator
    app.kubernetes.io/managed-by: hpe-csi-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: hpe-csi-operator
  template:
    metadata:
      labels:
        name: hpe-csi-operator
        product: hpe-csi-driver
        csi: hpe
        app.kubernetes.io/name: hpe-csi-operator
        app.kubernetes.io/instance: hpe-csi-operator
        app.kubernetes.io/managed-by: hpe-csi-operator
    spec:
      serviceAccountName: hpe-csi-operator-sa
      containers:
        - name: hpe-csi-operator
          # Replace this with the built image name
          image: quay.io/hpestorage/csi-driver-operator:v2.0.0-beta
          ports:
          - containerPort: 60000
            name: metrics
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: hpe-csi-operator
