apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: celery
  namespace: saleor
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: celery
  minReplicas: 1
  maxReplicas: 3
  metrics:
    - type: Object
      object:
        describedObject:
          apiVersion: apps/v1
          kind: Deployment
          name: celery
        metric:
          name: celery_queue_length
        target:
          type: Value
          value: 3
