Prometheus should print appropriate error if threshold
is not specifed #2793
Closed
Description
Report
threshold
field is mandatory for Prometheus scaler, but we don't check that has been correctly specified.
Expected Behavior
Error message stating that threshold
is not specified.
Actual Behavior
│ 1.64797501084928e+09 ERROR controller.scaledobject Reconciler error {"reconciler group": "keda.sh", "reconciler kind": "ScaledObject", "name": "besu-non-val-node-scaledobject", "namespace" │
│ : "besu-non-val-node", "error": "HorizontalPodAutoscaler.autoscaling \"keda-hpa-besu-non-val-node-scaledobject\" is invalid: spec.metrics[0].external.target.averageValue: Invalid value: resource.Quant │
│ ity{i:resource.int64Amount{value:0, scale:0}, d:resource.infDecAmount{Dec:(*inf.Dec)(nil)}, s:\"0\", Format:\"DecimalSI\"}: must be positive"}
Steps to Reproduce the Problem
- Deploy ScaledObject with Prometheus scaler that is missing
threshold
filed
Logs from KEDA operator
example
KEDA Version
2.6.1
Kubernetes Version
No response
Platform
No response
Scaler Details
Prometheus
Anything else?
No response
Metadata
Assignees
Labels
Type
Projects
Status
Done