apiVersion: apps/v1
kind: Deployment
metadata:
  name: rhmi-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: rhmi-operator
  template:
    metadata:
      labels:
        name: rhmi-operator
    spec:
      serviceAccountName: rhmi-operator
      volumes:
      - name: webhook-certs
        emptyDir: {}
      containers:
        - name: rhmi-operator
          # Replace this with the built image name
          image: quay.io/integreatly/integreatly-operator:master
          ports:
            - containerPort: 8090
          command:
          - rhmi-operator
          imagePullPolicy: Always
          resources:
            limits:
              memory: 1536Mi
              cpu: 150m
            requests:
              memory: 64Mi
              cpu: 100m
          volumeMounts:
          - name: webhook-certs
            mountPath: "/etc/ssl/certs/webhook"
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "rhmi-operator"
            - name: USE_CLUSTER_STORAGE
              value: "true"
            - name: LOG_LEVEL
              value: "info"
            - name: INSTALLATION_TYPE
              value: "managed"
            - name: REBALANCE_PODS
              value: "true"
