scaledobject.yaml 979 B

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