keda.yaml 673 B

12345678910111213141516171819202122
  1. apiVersion: keda.sh/v1alpha1
  2. kind: ScaledObject
  3. metadata:
  4. name: podinfo-scaledobject
  5. namespace: podinfo
  6. labels:
  7. deploymentName: podinfo
  8. spec:
  9. maxReplicaCount: 2
  10. minReplicaCount: 0
  11. pollingInterval: 3 # Optional. Default: 30 seconds
  12. cooldownPeriod: 5 # Optional. Default: 300 seconds
  13. scaleTargetRef:
  14. name: podinfo
  15. triggers:
  16. - type: prometheus
  17. metadata:
  18. serverAddress: http://kube-prometheus-stack-prometheus.monitoring:9090
  19. metricName: nginx_ingress_controller_request_duration_seconds_count
  20. threshold: "0.5"
  21. query: max(irate(nginx_ingress_controller_request_duration_seconds_count{host="podinfo.home.wugi.info"}[5m]))