keda.yaml 1.1 KB

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