kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta1
metadata:
  name: consumer-scaler
spec:
  scaleTargetRef:
    apiVersion: apps/v1beta1
    kind: Deployment
    name: queue-consumer
  minReplicas: 1
  maxReplicas: 5
  metrics:
  - type: External
    external:
      metricName: rabbitmq-length
      targetValue: 3

