---
kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta2
metadata:
  name: mock
spec:
  scaleTargetRef:
    # point the HPA at the sample application
    # you created above
    apiVersion: apps/v1
    kind: Deployment
    name: mock
  # autoscale between 1 and 10 replicas
  minReplicas: 1
  maxReplicas: 2
  metrics:
    # use a "Pods" metric, which takes the average of the
    # given metric across all pods controlled by the autoscaling target
    - type: Pods
      pods:
        metric:
          name: smarttuning_http_requests
        target:
          type: AverageValue
          averageValue: 10000m
          # # use the metric that you used above: pods/http_requests
          # metricName: smarttuning_http_requests
          # # target 500 milli-requests pr second,
          # # which is 1 request every two seconds
          # targetAverageValue: 1

