apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
  name: camera-trap-detection-sync-autoscaler
  namespace: default
spec:
  scaleTargetRef:
    apiVersion: extensions/v1beta1
    kind: Deployment
    name: camera-trap-detection-sync
  minReplicas: 1
  maxReplicas: 3
  metrics:
  - type: Resource
    resource:
      name: cpu
      targetAverageUtilization: 80
#  - type: Pods
#    pods:
#      metricName: camera-trap-detection-sync-appinsights-metric-detect
#      targetAverageValue: 1