apiVersion: v1
kind: Namespace
metadata:
  labels:
    control-plane: controller-manager
  name: operator
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller-manager
  namespace: operator
  labels:
    control-plane: controller-manager
spec:
  selector:
    matchLabels:
      control-plane: controller-manager
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: controller-manager
    spec:
      containers:
      - command:
        - /home/costmanagement-metrics-operator/bin/costmanagement-metrics-operator
        args:
        - --enable-leader-election
        image: controller:latest
        name: manager
        env:
        - name: IN_CLUSTER
          value: "true"
        - name: WATCH_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        resources:
          limits:
            cpu: 500m
            memory: 500Mi
          requests:
            cpu: 100m
            memory: 20Mi
        terminationMessagePolicy: FallbackToLogsOnError
        volumeMounts:
        - mountPath: /tmp/costmanagement-metrics-operator-reports
          name: costmanagement-metrics-operator-reports
      serviceAccountName: costmanagement-metrics-manager-role
      terminationGracePeriodSeconds: 10
      volumes:
        - name: costmanagement-metrics-operator-reports
