apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
  name: airflow-worker-hpa
  namespace: composer-1-8-2-airflow-1-10-3-ee6c0b6a
spec:                                                                           
  minReplicas: 1
  maxReplicas: 5
  metrics:
  - external:
      metricName: composer.googleapis.com|environment|task_queue_length
      metricSelector:   
        matchLabels:
          resource.labels.environment_name: mushanga
      targetAverageValue: "8"               
    type: External
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment             
    name: airflow-worker