--- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: rspamd-hpa namespace: mailgateway spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: rspamd minReplicas: 2 maxReplicas: 6 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 70 behavior: scaleUp: stabilizationWindowSeconds: 0 selectPolicy: Max policies: - type: Percent value: 100 periodSeconds: 30 - type: Pods value: 4 periodSeconds: 30 scaleDown: stabilizationWindowSeconds: 300 selectPolicy: Min policies: - type: Percent value: 30 periodSeconds: 60