apiVersion: apps/v1
kind: Deployment
metadata:
  name: storageos-cluster-operator
  namespace: storageos-operator
  labels:
    app.kubernetes.io/name: storageos-operator
    app.kubernetes.io/instance: storageos-cluster-operator
    app.kubernetes.io/component: operator
    app.kubernetes.io/part-of: storageos
spec:
  replicas: 1
  selector:
    matchLabels:
      name: storageos-cluster-operator
  template:
    metadata:
      labels:
        name: storageos-cluster-operator
    spec:
      serviceAccountName: storageoscluster-operator-sa
      containers:
        - name: storageos-cluster-operator
          image: storageos/cluster-operator:test
          ports:
          - containerPort: 8383
            name: metrics
          - containerPort: 8686
            name: operatormetrics
          command:
          - cluster-operator
          imagePullPolicy: IfNotPresent
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: OPERATOR_NAME
              value: "storageos-cluster-operator"
