---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: work-placement-controller
  name: work-placement-controller
spec:
  replicas: 2
  selector:
    matchLabels:
      name: work-placement-controller
  template:
    metadata:
      labels:
        name: work-placement-controller
    spec:
      serviceAccountName: work-placement
      containers:
      - image: quay.io/jpacker/work-placement-controller:latest
        name: work-placement-controller
        command: ["./manager", "--leader-elect"]
        imagePullPolicy: Always
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        resources:
          #limits:
          #  cpu: "20m"
          #  memory: "256Mi"
          requests:
            cpu: "2m"                     # Runs < 10m most of the time and idels at about 3m
            memory: "2Mi"                # Runs between 25-28Mi
