apiVersion: apps/v1
kind: Deployment
metadata:
  name: rhmi-operator
  namespace: system
spec:
  selector:
    matchLabels:
      name: rhmi-operator
  replicas: 1
  template:
    metadata:
      labels:
        name: rhmi-operator
    spec:
      serviceAccountName: "rhmi-operator"
      volumes:
      - name: webhook-certs
        emptyDir: {}
      containers:
      - command:
        - rhmi-operator
        args:
        - --enable-leader-election
        image: controller:latest
        name: rhmi-operator
        ports:
          - containerPort: 8090
        imagePullPolicy: Always
        resources:
          limits:
            cpu: 150m
            memory: 1536Mi
          requests:
            cpu: 100m
            memory: 64Mi
        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"
          # this should be set for production and development via MT repo
          - name: ALERT_SMTP_FROM
            value: "default@test.com"
          - name: QUOTA
            value: "200"
      terminationGracePeriodSeconds: 10
