You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #1087, this commit refactors the KubeCPUQuotaOvercommit and
KubeMemoryQuotaOvercommit alerting rules to reduce duplication.
Signed-off-by: Simon Pasquier <[email protected]>
Copy file name to clipboardExpand all lines: alerts/resource_alerts.libsonnet
+31-46Lines changed: 31 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,27 @@ local utils = import '../lib/utils.libsonnet';
56
56
)
57
57
||| % $._config { resource: resource },
58
58
59
+
local kubeQuotaOvercommitExpression(resource) = if $._config.showMultiCluster then
60
+
|||
61
+
sum by(%(clusterLabel)s) (
62
+
min without(resource) (kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="hard", resource=~"(%(resource)s|requests.%(resource)s)"})
min without(resource) (kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="hard", resource=~"(%(resource)s|requests.%(resource)s)"})
0 commit comments