apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: custom-hpa-client
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: custom-hpa-client
  minReplicas: 1
  maxReplicas: 10
  behavior:
    scaleDown:
      stabilizationWindowSeconds: 0
      policies:
        - type: Pods
          value: 1
          periodSeconds: 30          
  metrics:
    - type: External
      external:
        metric:
          name: testservice_generated_queue_item
        target:
          type: AverageValue
          averageValue: 150
