---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: vpa-recommender
  namespace: kube-system
spec:
  replicas: 1
  selector:
    matchLabels:
      app: vpa-recommender
  template:
    metadata:
      labels:
        app: vpa-recommender
    spec:
      serviceAccountName: vpa-recommender
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534 # nobody
      containers:
      - name: recommender
        image: localhost:5001/vpa-recommender-amd64:latest
        imagePullPolicy: Never
        args:
          - /recommender-amd64
          - --use-external-metrics=true
          - --external-metrics-cpu-metric=cpu
          - --external-metrics-memory-metric=mem
          - --v=4
        resources:
          limits:
            cpu: 200m
            memory: 1000Mi
          requests:
            cpu: 50m
            memory: 500Mi
        ports:
        - name: prometheus
          containerPort: 8942
        - name: delve
          containerPort: 40000
