---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: puppetboard-vpa
  namespace: puppet
  # NOTE: this workload also has an HPA. updateMode Off is recommendation-only
  # and does not act, so there is no HPA/VPA conflict today. Do not flip to Auto/
  # Initial without first moving the HPA off CPU/memory (VPA owns those under Auto).
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: puppetboard
  updatePolicy:
    updateMode: "Off"
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: puppetdb-vpa
  namespace: puppet
  # NOTE: this workload also has an HPA. updateMode Off is recommendation-only
  # and does not act, so there is no HPA/VPA conflict today. Do not flip to Auto/
  # Initial without first moving the HPA off CPU/memory (VPA owns those under Auto).
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: puppetdb
  updatePolicy:
    updateMode: "Off"
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: puppetserver-compiler-vpa
  namespace: puppet
  # NOTE: this workload also has an HPA. updateMode Off is recommendation-only
  # and does not act, so there is no HPA/VPA conflict today. Do not flip to Auto/
  # Initial without first moving the HPA off CPU/memory (VPA owns those under Auto).
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: puppetserver-compiler
  updatePolicy:
    updateMode: "Off"
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: puppetserver-master-vpa
  namespace: puppet
  # NOTE: the master is a pinned single replica (Recreate, no HPA) so the CA/master
  # never coexists. updateMode Off keeps this recommendation-only; do not flip to
  # Auto/Initial, which would evict and briefly recreate the singleton pod.
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: puppetserver-master
  updatePolicy:
    updateMode: "Off"
