Skip to content

Conversation

@mikkeloscar
Copy link
Contributor

The Scheduled Scaling VPA defines a Vertical Pod Autoscaler (zVPA) resource which is an enriched version of the upstream VPA that adds the ability to change scaling based on Scaling Schedules.

An example zVPA looks like this:

apiVersion: zalando.org/v1
kind: VerticalPodAutoscaler
metadata:
  name: scheduled-scaling-vpa-test
spec:
  resourcePolicy:
    containerPolicies:
    - containerName: main
      minAllowed:
        cpu: 0
        memory: 500Mi
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: scheduled-scaling-vpa-test
  updatePolicy:
    updateMode: Auto
  # above this line looks like a normal VPA
  # below this line are references to scaling schedules and the resourcePolicy
  # overwrite.
  schedules:
  - name: "scheduling-event"
    preStartMinutes: 10
    resourcePolicy:
      containerPolicies:
      - containerName: main
        minAllowed:
          cpu: 0
          memory: 1Gi

The resource is combined with a simple controller that can read zVPA resources and generate/update VPA resources. If a referenced schedule is active it will use the resourcePolicy of the respective schedule, otherwise it will use the default resourcePolicy.


This PR showcases how to use this for Prometheus to scale based on central events.

@mikkeloscar mikkeloscar added the minor Minor changes, e.g. low risk config updates, changes that do not introduce a new API call. label Oct 24, 2025
@mikkeloscar mikkeloscar force-pushed the prometheus-scheduled-scaling-example branch 2 times, most recently from 21335a2 to ef727a1 Compare October 24, 2025 17:44
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
@mikkeloscar mikkeloscar force-pushed the prometheus-scheduled-scaling-example branch from ef727a1 to 91a24a5 Compare October 27, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge minor Minor changes, e.g. low risk config updates, changes that do not introduce a new API call.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants