---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: vpa-recommender
  namespace: vpa-system
  labels:
    app.kubernetes.io/name: vpa-recommender
    app.kubernetes.io/component: recommender
    app.kubernetes.io/version: "1.7.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: vpa-recommender
  template:
    metadata:
      labels:
        app.kubernetes.io/name: vpa-recommender
        app.kubernetes.io/component: recommender
    spec:
      serviceAccountName: vpa-recommender
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
      containers:
        - name: recommender
          image: registry.k8s.io/autoscaling/vpa-recommender:1.7.0
          args:
            - --pod-recommendation-min-cpu-millicores=15
            - --pod-recommendation-min-memory-mb=100
            - --v=2
          ports:
            - containerPort: 8942
              name: metrics
          livenessProbe:
            httpGet:
              path: /health-check
              port: metrics
            initialDelaySeconds: 15
            periodSeconds: 20
          readinessProbe:
            httpGet:
              path: /health-check
              port: metrics
            initialDelaySeconds: 5
            periodSeconds: 10
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            capabilities:
              drop: ["ALL"]
          resources:
            requests:
              cpu: 50m
              memory: 500Mi
            limits:
              cpu: 500m
              memory: 1000Mi
