Skip to content

Commit f0abe75

Browse files
authored
Merge branch 'master' into sk/refactor-pod-namespace
2 parents 19eec4d + 053fc1e commit f0abe75

File tree

7 files changed

+64
-59
lines changed

7 files changed

+64
-59
lines changed

.pint.hcl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
checks {
2+
# promql/impossible can't deal with label_join or label_replace
3+
# https://github.com/cloudflare/pint/issues/1631
4+
disabled = ["promql/impossible"]
5+
}

dashboards/network-usage/cluster-total.libsonnet

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ local var = g.dashboard.variable;
7272
* on (%(clusterLabel)s,namespace,pod) group_left ()
7373
topk by (%(clusterLabel)s,namespace,pod) (
7474
1,
75-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
75+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
7676
)
7777
)
7878
||| % $._config
@@ -90,7 +90,7 @@ local var = g.dashboard.variable;
9090
* on (%(clusterLabel)s,namespace,pod) group_left ()
9191
topk by (%(clusterLabel)s,namespace,pod) (
9292
1,
93-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
93+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
9494
)
9595
)
9696
||| % $._config
@@ -107,7 +107,7 @@ local var = g.dashboard.variable;
107107
* on (%(clusterLabel)s,namespace,pod) group_left ()
108108
topk by (%(clusterLabel)s,namespace,pod) (
109109
1,
110-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
110+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
111111
)
112112
)
113113
||| % $._config)
@@ -120,7 +120,7 @@ local var = g.dashboard.variable;
120120
* on (%(clusterLabel)s,namespace,pod) group_left ()
121121
topk by (%(clusterLabel)s,namespace,pod) (
122122
1,
123-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
123+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
124124
)
125125
)
126126
||| % $._config)
@@ -133,7 +133,7 @@ local var = g.dashboard.variable;
133133
* on (%(clusterLabel)s,namespace,pod) group_left ()
134134
topk by (%(clusterLabel)s,namespace,pod) (
135135
1,
136-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
136+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
137137
)
138138
)
139139
||| % $._config)
@@ -146,7 +146,7 @@ local var = g.dashboard.variable;
146146
* on (%(clusterLabel)s,namespace,pod) group_left ()
147147
topk by (%(clusterLabel)s,namespace,pod) (
148148
1,
149-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
149+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
150150
)
151151
)
152152
||| % $._config)
@@ -159,7 +159,7 @@ local var = g.dashboard.variable;
159159
* on (%(clusterLabel)s,namespace,pod) group_left ()
160160
topk by (%(clusterLabel)s,namespace,pod) (
161161
1,
162-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
162+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
163163
)
164164
)
165165
||| % $._config)
@@ -172,7 +172,7 @@ local var = g.dashboard.variable;
172172
* on (%(clusterLabel)s,namespace,pod) group_left ()
173173
topk by (%(clusterLabel)s,namespace,pod) (
174174
1,
175-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
175+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
176176
)
177177
)
178178
||| % $._config)
@@ -185,7 +185,7 @@ local var = g.dashboard.variable;
185185
* on (%(clusterLabel)s,namespace,pod) group_left ()
186186
topk by (%(clusterLabel)s,namespace,pod) (
187187
1,
188-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
188+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
189189
)
190190
)
191191
||| % $._config)
@@ -198,7 +198,7 @@ local var = g.dashboard.variable;
198198
* on (%(clusterLabel)s,namespace,pod) group_left ()
199199
topk by (%(clusterLabel)s,namespace,pod) (
200200
1,
201-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
201+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
202202
)
203203
)
204204
||| % $._config)
@@ -307,7 +307,7 @@ local var = g.dashboard.variable;
307307
* on (%(clusterLabel)s,namespace,pod) group_left ()
308308
topk by (%(clusterLabel)s,namespace,pod) (
309309
1,
310-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
310+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
311311
)
312312
)
313313
||| % $._config
@@ -325,7 +325,7 @@ local var = g.dashboard.variable;
325325
* on (%(clusterLabel)s,namespace,pod) group_left ()
326326
topk by (%(clusterLabel)s,namespace,pod) (
327327
1,
328-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
328+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
329329
)
330330
)
331331
||| % $._config
@@ -343,7 +343,7 @@ local var = g.dashboard.variable;
343343
* on (%(clusterLabel)s,namespace,pod) group_left ()
344344
topk by (%(clusterLabel)s,namespace,pod) (
345345
1,
346-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
346+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
347347
)
348348
)
349349
||| % $._config
@@ -361,7 +361,7 @@ local var = g.dashboard.variable;
361361
* on (%(clusterLabel)s,namespace,pod) group_left ()
362362
topk by (%(clusterLabel)s,namespace,pod) (
363363
1,
364-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
364+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
365365
)
366366
)
367367
||| % $._config
@@ -378,7 +378,7 @@ local var = g.dashboard.variable;
378378
* on (%(clusterLabel)s,namespace,pod) group_left ()
379379
topk by (%(clusterLabel)s,namespace,pod) (
380380
1,
381-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
381+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
382382
)
383383
)
384384
||| % $._config)
@@ -394,7 +394,7 @@ local var = g.dashboard.variable;
394394
* on (%(clusterLabel)s,namespace,pod) group_left ()
395395
topk by (%(clusterLabel)s,namespace,pod) (
396396
1,
397-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
397+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
398398
)
399399
)
400400
||| % $._config)
@@ -410,7 +410,7 @@ local var = g.dashboard.variable;
410410
* on (%(clusterLabel)s,namespace,pod) group_left ()
411411
topk by (%(clusterLabel)s,namespace,pod) (
412412
1,
413-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
413+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
414414
)
415415
)
416416
||| % $._config)
@@ -426,7 +426,7 @@ local var = g.dashboard.variable;
426426
* on (%(clusterLabel)s,namespace,pod) group_left ()
427427
topk by (%(clusterLabel)s,namespace,pod) (
428428
1,
429-
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false"})
429+
max by (%(clusterLabel)s,namespace,pod) (kube_pod_info{host_network="false",%(clusterLabel)s="$cluster"})
430430
)
431431
)
432432
||| % $._config)

dashboards/scheduler.libsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ local var = g.dashboard.variable;
8989
prometheus.new('${datasource}', 'sum(rate(scheduler_scheduling_attempt_duration_seconds_count{%(clusterLabel)s="$cluster", %(kubeSchedulerSelector)s, instance=~"$instance"}[%(grafanaIntervalVar)s])) by (%(clusterLabel)s, instance)' % $._config)
9090
+ prometheus.withLegendFormat('{{%(clusterLabel)s}} {{instance}} e2e' % $._config),
9191

92-
prometheus.new('${datasource}', 'sum(rate(scheduler_binding_duration_seconds_count{%(clusterLabel)s="$cluster", %(kubeSchedulerSelector)s, instance=~"$instance"}[%(grafanaIntervalVar)s])) by (%(clusterLabel)s, instance)' % $._config)
92+
prometheus.new('${datasource}', 'sum(rate(scheduler_pod_scheduling_sli_duration_seconds_count{%(clusterLabel)s="$cluster", %(kubeSchedulerSelector)s, instance=~"$instance"}[%(grafanaIntervalVar)s])) by (%(clusterLabel)s, instance)' % $._config)
9393
+ prometheus.withLegendFormat('{{%(clusterLabel)s}} {{instance}} binding' % $._config),
9494

9595
prometheus.new('${datasource}', 'sum(rate(scheduler_scheduling_algorithm_duration_seconds_count{%(clusterLabel)s="$cluster", %(kubeSchedulerSelector)s, instance=~"$instance"}[%(grafanaIntervalVar)s])) by (%(clusterLabel)s, instance)' % $._config)
@@ -106,7 +106,7 @@ local var = g.dashboard.variable;
106106
prometheus.new('${datasource}', 'histogram_quantile(0.99, sum(rate(scheduler_scheduling_attempt_duration_seconds_bucket{%(clusterLabel)s="$cluster", %(kubeSchedulerSelector)s,instance=~"$instance"}[%(grafanaIntervalVar)s])) by (%(clusterLabel)s, instance, le))' % $._config)
107107
+ prometheus.withLegendFormat('{{%(clusterLabel)s}} {{instance}} e2e' % $._config),
108108

109-
prometheus.new('${datasource}', 'histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{%(clusterLabel)s="$cluster", %(kubeSchedulerSelector)s,instance=~"$instance"}[%(grafanaIntervalVar)s])) by (%(clusterLabel)s, instance, le))' % $._config)
109+
prometheus.new('${datasource}', 'histogram_quantile(0.99, sum(rate(scheduler_pod_scheduling_sli_duration_seconds_bucket{%(clusterLabel)s="$cluster", %(kubeSchedulerSelector)s,instance=~"$instance"}[%(grafanaIntervalVar)s])) by (%(clusterLabel)s, instance, le))' % $._config)
110110
+ prometheus.withLegendFormat('{{%(clusterLabel)s}} {{instance}} binding' % $._config),
111111

112112
prometheus.new('${datasource}', 'histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{%(clusterLabel)s="$cluster", %(kubeSchedulerSelector)s,instance=~"$instance"}[%(grafanaIntervalVar)s])) by (%(clusterLabel)s, instance, le))' % $._config)

rules/kube_scheduler.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
for metric in [
2323
'scheduler_scheduling_attempt_duration_seconds',
2424
'scheduler_scheduling_algorithm_duration_seconds',
25-
'scheduler_binding_duration_seconds',
25+
'scheduler_pod_scheduling_sli_duration_seconds',
2626
]
2727
],
2828
},

scripts/go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.25.3
44

55
require (
66
github.com/Kunde21/markdownfmt/v3 v3.1.0
7-
github.com/cloudflare/pint v0.76.1
7+
github.com/cloudflare/pint v0.77.1
88
github.com/errata-ai/vale/v3 v3.13.0
99
github.com/google/go-jsonnet v0.21.0
1010
github.com/grafana/dashboard-linter v0.0.0-20231114210226-c458893a5731
@@ -16,7 +16,7 @@ require (
1616
atomicgo.dev/cursor v0.2.0 // indirect
1717
atomicgo.dev/keyboard v0.2.9 // indirect
1818
atomicgo.dev/schedule v0.1.0 // indirect
19-
cel.dev/expr v0.24.0 // indirect
19+
cel.dev/expr v0.25.0 // indirect
2020
cloud.google.com/go v0.120.0 // indirect
2121
cloud.google.com/go/auth v0.16.5 // indirect
2222
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
@@ -119,7 +119,7 @@ require (
119119
github.com/golang/snappy v1.0.0 // indirect
120120
github.com/google/gnostic-models v0.7.0 // indirect
121121
github.com/google/go-cmp v0.7.0 // indirect
122-
github.com/google/go-github/v75 v75.0.0 // indirect
122+
github.com/google/go-github/v78 v78.0.0 // indirect
123123
github.com/google/go-querystring v1.1.0 // indirect
124124
github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 // indirect
125125
github.com/google/s2a-go v0.1.9 // indirect
@@ -203,7 +203,7 @@ require (
203203
github.com/prometheus/alertmanager v0.28.1 // indirect
204204
github.com/prometheus/client_golang v1.23.2 // indirect
205205
github.com/prometheus/client_model v0.6.2 // indirect
206-
github.com/prometheus/common v0.67.1 // indirect
206+
github.com/prometheus/common v0.67.2 // indirect
207207
github.com/prometheus/exporter-toolkit v0.14.1 // indirect
208208
github.com/prometheus/otlptranslator v1.0.0 // indirect
209209
github.com/prometheus/procfs v0.16.1 // indirect
@@ -227,7 +227,7 @@ require (
227227
github.com/stretchr/testify v1.11.1 // indirect
228228
github.com/subosito/gotenv v1.4.2 // indirect
229229
github.com/tomwright/dasel/v2 v2.8.1 // indirect
230-
github.com/urfave/cli/v3 v3.5.0 // indirect
230+
github.com/urfave/cli/v3 v3.6.0 // indirect
231231
github.com/vultr/govultr/v2 v2.17.2 // indirect
232232
github.com/x448/float16 v0.8.4 // indirect
233233
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
@@ -239,7 +239,7 @@ require (
239239
github.com/zclconf/go-cty v1.17.0 // indirect
240240
github.com/zeebo/errs v1.4.0 // indirect
241241
github.com/zeitlinger/conflate v0.0.0-20230622100834-279724abda8c // indirect
242-
gitlab.com/gitlab-org/api/client-go v0.157.0 // indirect
242+
gitlab.com/gitlab-org/api/client-go v0.159.0 // indirect
243243
go.mongodb.org/mongo-driver v1.17.4 // indirect
244244
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
245245
go.opentelemetry.io/collector/component v1.42.0 // indirect
@@ -275,7 +275,7 @@ require (
275275
golang.org/x/exp v0.0.0-20250808145144-a408d31f581a // indirect
276276
golang.org/x/mod v0.29.0 // indirect
277277
golang.org/x/net v0.47.0 // indirect
278-
golang.org/x/oauth2 v0.32.0 // indirect
278+
golang.org/x/oauth2 v0.33.0 // indirect
279279
golang.org/x/sync v0.18.0 // indirect
280280
golang.org/x/sys v0.38.0 // indirect
281281
golang.org/x/term v0.37.0 // indirect

0 commit comments

Comments
 (0)