From e3b1abcffbf4c9517d48a204bbf705991dc2ec9f Mon Sep 17 00:00:00 2001 From: "R.Sicart" Date: Tue, 14 May 2024 12:09:31 +0200 Subject: [PATCH] feat: hpa scale max should not alert when min and max are the same Signed-off-by: R.Sicart --- _data/rules.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_data/rules.yml b/_data/rules.yml index 61425a5..5df20fb 100644 --- a/_data/rules.yml +++ b/_data/rules.yml @@ -1990,7 +1990,7 @@ groups: severity: warning - name: Kubernetes HPA scale maximum description: HPA {{ $labels.namespace }}/{{ $labels.horizontalpodautoscaler }} has hit maximum number of desired pods - query: "kube_horizontalpodautoscaler_status_desired_replicas >= kube_horizontalpodautoscaler_spec_max_replicas" + query: '(kube_horizontalpodautoscaler_status_desired_replicas >= kube_horizontalpodautoscaler_spec_max_replicas) and (kube_horizontalpodautoscaler_spec_max_replicas > 1) and (kube_horizontalpodautoscaler_spec_min_replicas != kube_horizontalpodautoscaler_spec_max_replicas)' severity: info for: 2m - name: Kubernetes HPA underutilized