apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: scale-marketplace
  namespace: marketplace
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: marketplace-cmd
  minReplicas: 1
  maxReplicas: 10
  metrics:
    - type: External
      external:
        metric:
          name: rpm
          selector:
            matchLabels:
              appName: marketplace-prod
        target:
          type: AverageValue
          averageValue: 100
