apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: cop-worker-stateful
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: StatefulSet
    name: cop-worker-sts
  minReplicas: 1
  maxReplicas: 100
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 55
  behavior:
    scaleDown:
      stabilizationWindowSeconds: 180
    scaleUp:
      stabilizationWindowSeconds: 60
