---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: vertical-pod-autoscaler-operator
  namespace: openshift-vertical-pod-autoscaler
  labels:
    k8s-app: vertical-pod-autoscaler-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: vertical-pod-autoscaler-operator
  template:
    metadata:
      labels:
        k8s-app: vertical-pod-autoscaler-operator
    spec:
      priorityClassName: system-node-critical
      serviceAccountName: vertical-pod-autoscaler-operator
      containers:
      - name: vertical-pod-autoscaler-operator
        image: VPA_OPERATOR_IMAGE
        command:
        - vertical-pod-autoscaler-operator
        args:
        - -alsologtostderr
        env:
        - name: RELEASE_VERSION
          value: "0.0.1-snapshot"
        - name: WATCH_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: VERTICAL_POD_AUTOSCALER_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: VERTICAL_POD_AUTOSCALER_IMAGE
          value: VPA_OPERAND_IMAGE
        ports:
        - containerPort: 8443
        resources:
          requests:
            cpu: 20m
            memory: 50Mi
      nodeSelector:
        node-role.kubernetes.io/master: ""
      restartPolicy: Always
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
      tolerations:
      - key: "node-role.kubernetes.io/master"
        operator: "Exists"
        effect: "NoSchedule"
