apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: status-worker-autoscaler
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: status-worker
  minReplicas: 1
  maxReplicas: 50
  metrics:
  - type: Object
    object:
      metric:
        name: rabbitmq_queue_messages_status_workers
      describedObject:
        apiVersion: v1
        kind: Service
        name: rabbitmq-cluster-app
      target:
        type: Value
        value: 10