# HorizontalPodAutoscaler for EDDI
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: eddi
  labels:
    app.kubernetes.io/name: eddi
    app.kubernetes.io/part-of: eddi
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: eddi
  minReplicas: 2
  maxReplicas: 10
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 70
    - type: Resource
      resource:
        name: memory
        target:
          type: Utilization
          averageUtilization: 80
  behavior:
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
        - type: Pods
          value: 1
          periodSeconds: 120
    scaleUp:
      stabilizationWindowSeconds: 60
      policies:
        - type: Pods
          value: 2
          periodSeconds: 60
