Skip to content

Commit

Permalink
Jsonnet: fix config drift w/ Grafana Labs
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Pracucci <[email protected]>
  • Loading branch information
pracucci committed May 27, 2024
1 parent 04df05d commit 1c87174
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1998,11 +1998,11 @@ spec:
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="alertmanager", namespace="default", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="alertmanager", namespace="default", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="alertmanager", namespace="default"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="alertmanager", namespace="default"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="alertmanager", namespace="default", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="alertmanager", namespace="default", reason="OOMKilled"})
or vector(0)
)
and
Expand Down Expand Up @@ -2076,11 +2076,11 @@ spec:
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="distributor", namespace="default", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="distributor", namespace="default", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="distributor", namespace="default"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="distributor", namespace="default"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="distributor", namespace="default", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="distributor", namespace="default", reason="OOMKilled"})
or vector(0)
)
and
Expand Down Expand Up @@ -2207,11 +2207,11 @@ spec:
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="query-frontend", namespace="default", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="query-frontend", namespace="default", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="query-frontend", namespace="default"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="query-frontend", namespace="default"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="query-frontend", namespace="default", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="query-frontend", namespace="default", reason="OOMKilled"})
or vector(0)
)
and
Expand Down Expand Up @@ -2285,11 +2285,11 @@ spec:
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="ruler", namespace="default", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="ruler", namespace="default", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="ruler", namespace="default"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="ruler", namespace="default"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="ruler", namespace="default", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="ruler", namespace="default", reason="OOMKilled"})
or vector(0)
)
and
Expand Down Expand Up @@ -2363,11 +2363,11 @@ spec:
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="ruler-querier", namespace="default", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="ruler-querier", namespace="default", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="ruler-querier", namespace="default"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="ruler-querier", namespace="default"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="ruler-querier", namespace="default", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="ruler-querier", namespace="default", reason="OOMKilled"})
or vector(0)
)
and
Expand Down Expand Up @@ -2449,11 +2449,11 @@ spec:
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="ruler-query-frontend", namespace="default", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="ruler-query-frontend", namespace="default", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="ruler-query-frontend", namespace="default"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="ruler-query-frontend", namespace="default"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="ruler-query-frontend", namespace="default", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="ruler-query-frontend", namespace="default", reason="OOMKilled"})
or vector(0)
)
and
Expand Down
36 changes: 18 additions & 18 deletions operations/mimir-tests/test-autoscaling-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1998,11 +1998,11 @@ spec:
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="alertmanager", namespace="default", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="alertmanager", namespace="default", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="alertmanager", namespace="default"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="alertmanager", namespace="default"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="alertmanager", namespace="default", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="alertmanager", namespace="default", reason="OOMKilled"})
or vector(0)
)
and
Expand Down Expand Up @@ -2076,11 +2076,11 @@ spec:
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="distributor", namespace="default", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="distributor", namespace="default", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="distributor", namespace="default"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="distributor", namespace="default"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="distributor", namespace="default", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="distributor", namespace="default", reason="OOMKilled"})
or vector(0)
)
and
Expand Down Expand Up @@ -2207,11 +2207,11 @@ spec:
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="query-frontend", namespace="default", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="query-frontend", namespace="default", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="query-frontend", namespace="default"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="query-frontend", namespace="default"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="query-frontend", namespace="default", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="query-frontend", namespace="default", reason="OOMKilled"})
or vector(0)
)
and
Expand Down Expand Up @@ -2285,11 +2285,11 @@ spec:
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="ruler", namespace="default", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="ruler", namespace="default", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="ruler", namespace="default"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="ruler", namespace="default"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="ruler", namespace="default", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="ruler", namespace="default", reason="OOMKilled"})
or vector(0)
)
and
Expand Down Expand Up @@ -2363,11 +2363,11 @@ spec:
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="ruler-querier", namespace="default", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="ruler-querier", namespace="default", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="ruler-querier", namespace="default"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="ruler-querier", namespace="default"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="ruler-querier", namespace="default", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="ruler-querier", namespace="default", reason="OOMKilled"})
or vector(0)
)
and
Expand Down Expand Up @@ -2449,11 +2449,11 @@ spec:
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="ruler-query-frontend", namespace="default", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="ruler-query-frontend", namespace="default", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="ruler-query-frontend", namespace="default"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="ruler-query-frontend", namespace="default"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="ruler-query-frontend", namespace="default", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="ruler-query-frontend", namespace="default", reason="OOMKilled"})
or vector(0)
)
and
Expand Down
6 changes: 3 additions & 3 deletions operations/mimir/autoscaling.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,11 @@
)
+
sum(
sum by (pod) (max_over_time(kube_pod_container_resource_requests{container="%(container)s", namespace="%(namespace)s", resource="memory"}[15m]))
sum by (pod)(max_over_time(kube_pod_container_resource_requests{container="%(container)s", namespace="%(namespace)s", resource="memory"}[15m]))
and
max by (pod) (changes(kube_pod_container_status_restarts_total{container="%(container)s", namespace="%(namespace)s"}[15m]) > 0)
max by (pod)(changes(kube_pod_container_status_restarts_total{container="%(container)s", namespace="%(namespace)s"}[15m]) > 0)
and
max by (pod) (kube_pod_container_status_last_terminated_reason{container="%(container)s", namespace="%(namespace)s", reason="OOMKilled"})
max by (pod)(kube_pod_container_status_last_terminated_reason{container="%(container)s", namespace="%(namespace)s", reason="OOMKilled"})
or vector(0)
)
and
Expand Down

0 comments on commit 1c87174

Please sign in to comment.