apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
  name: digdag-worker-hpa
  namespace: default
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: digdag-worker
  minReplicas: 2
  maxReplicas: 5
  metrics:
  - type: Object
    object:
      target:
        kind: Service
        name: postgres-exporter
      metricName: queued_tasks
      targetValue: 1
