Skip to content

Automatically create VPA for every deployment

Notifications You must be signed in to change notification settings

OpusCapita/autovpa

 
 

Repository files navigation

Automatically creates Vertical Pod Autoscalers (VPA) for all deployments in a namespace

Example custom resource:

apiVersion: autoscaling.k8s.io/v1
kind: AutoVPA
metadata:
  # Hardcoded name. Only one config per namespace is allowed
  name: autoautovpa-operator-config
  namespace: default
spec:
  updatePolicy:
    # "Off", "Initial", "Recreate", and "Auto".
    updateMode: Off
    minReplicas: 1
  resourcePolicy:
    mode: Auto
    minAllowed:
      cpu: 15m
      memory: 100Mi
    maxAllowed:
      cpu: 1
      memory: 20Gi
    controlledResources:
      - cpu
      - memory
    # "RequestsOnly", "RequestsAndLimits"
    controlledValues: "RequestsOnly"
  excludedDeployments:
    - "exclude-this-deployment"

Example annotation for deployment to exclude it from AutoVPA. If you don't have this annotation set, or set it to true, you will get a VPA for the deployment.

annotations:
  autovpa.autoscaling.k8s.io/enabled: "false"

About

Automatically create VPA for every deployment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.4%
  • Dockerfile 1.6%