kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta2
metadata:
  name: sample-app
spec:
  scaleTargetRef:
    # point the HPA at the sample application
    # you created above
    apiVersion: apps/v1
    kind: Deployment
    name: sample-app
  # autoscale between 1 and 10 replicas
  minReplicas: 1
  maxReplicas: 10
  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: 1
        # # use the metric that you used above: pods/http_requests
        # metricName: smarttuning_http_requests
        # # target 500 milli-requests per second,
        # # which is 1 request every two seconds
        # targetAverageValue: 1
