File tree Expand file tree Collapse file tree
resource_customizations/keda.sh/ScaledObject Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ if obj.status ~= nil then
1717 hs .message = condition .message
1818 suspended = true
1919 end
20+ if condition .status == " True" and condition .type == " Fallback" then
21+ hs .message = condition .message
22+ degraded = true
23+ end
2024 end
2125 end
2226end
@@ -32,4 +36,4 @@ elseif healthy == true and suspended == true then
3236end
3337hs .status = " Progressing"
3438hs .message = " Creating HorizontalPodAutoscaler Object"
35- return hs
39+ return hs
Original file line number Diff line number Diff line change 1919 status : Suspended
2020 message : " ScaledObject is paused"
2121 inputPath : testdata/keda-suspended.yaml
22+ - healthStatus :
23+ status : Degraded
24+ message : " At least one trigger is falling back on this scaled object"
25+ inputPath : testdata/keda-fallback.yaml
Original file line number Diff line number Diff line change 1+ apiVersion : keda.sh/v1alpha1
2+ kind : ScaledObject
3+ metadata :
4+ annotations :
5+ finalizers :
6+ - finalizer.keda.sh
7+ labels :
8+ argocd.argoproj.io/instance : keda-default
9+ name : keda-with-fallback
10+ namespace : keda
11+ resourceVersion : ' 160591443'
12+ uid : 83ee438a-f383-43f3-9346-b901d9773f5c
13+ spec :
14+ maxReplicaCount : 10
15+ minReplicaCount : 1
16+ fallback :
17+ failureThreshold : 3
18+ replicas : 5
19+ scaleTargetRef :
20+ name : keda-service
21+ triggers :
22+ - type : prometheus
23+ metadata :
24+ serverAddress : http://prometheus-server.monitoring.svc.cluster.local
25+ metricName : http_requests_total
26+ threshold : ' 100'
27+ query : sum(rate(http_requests_total{app="keda-service"}[2m]))
28+ status :
29+ conditions :
30+ - message : ScaledObject is defined correctly and is ready for scaling
31+ reason : ScaledObjectReady
32+ status : ' True'
33+ type : Ready
34+ - message : Scaling is performed because triggers are active
35+ reason : ScalerActive
36+ status : ' True'
37+ type : Active
38+ - message : At least one trigger is falling back on this scaled object
39+ reason : FallbackExists
40+ status : ' True'
41+ type : Fallback
42+ - status : ' False'
43+ type : Paused
44+ externalMetricNames :
45+ - s0-prometheus
46+ health :
47+ " prometheus " :
48+ numberOfFailures : 4
49+ status : Failing
50+ hpaName : keda-with-fallback-hpa
51+ lastActiveTime : ' 2023-12-19T10:35:22Z'
52+ originalReplicaCount : 1
53+ scaleTargetGVKR :
54+ group : apps
55+ kind : Deployment
56+ resource : deployments
57+ version : v1
58+ scaleTargetKind : apps/v1.Deployment
You can’t perform that action at this time.
0 commit comments