Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 7, 2023
1 parent 111a58f commit 562aa75
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 52 deletions.
48 changes: 24 additions & 24 deletions dashboards/cluster.jsonnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Deploys a dashboard showing cluster-wide information
local grafonnet = import "github.com/grafana/grafonnet/gen/grafonnet-v10.0.0/main.libsonnet";
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v10.0.0/main.libsonnet';
local dashboard = grafonnet.dashboard;
local ts = grafonnet.panel.timeSeries;
local prometheus = grafonnet.query.prometheus;
Expand All @@ -19,30 +19,30 @@ local variables = [
local userNodes = ts.new(
'Node Count'
) + ts.panelOptions.withDescription(
"Number of nodes in each nodepool in this cluster"
'Number of nodes in each nodepool in this cluster'
) + ts.standardOptions.withMin(
0
) + ts.queryOptions.withTargets([
prometheus.new(
'$PROMETHEUS_DS',
|||
# sum up all nodes by nodepool
sum(
# kube_pod_labels comes from
# https://github.com/kubernetes/kube-state-metrics, and there is a particular
# label (kubernetes_node) that lists the node on which the kube-state-metrics pod
# s running! So that's totally irrelevant to these queries, but when a nodepool
# is rotated it caused there to exist two metrics with the same node value (which
# we care about) but different kubernetes_node values (because kube-state-metrics
# was running in a different node, even though we don't care about that). This
# group really just drops all labels except the two we care about to
# avoid messing things up.
group(
kube_node_labels
) by (node, label_cloud_google_com_gke_nodepool)
) by (label_cloud_google_com_gke_nodepool)
|||
) + prometheus.withLegendFormat('{{label_cloud_google_com_gke_nodepool}}')
prometheus.new(
'$PROMETHEUS_DS',
|||
# sum up all nodes by nodepool
sum(
# kube_pod_labels comes from
# https://github.com/kubernetes/kube-state-metrics, and there is a particular
# label (kubernetes_node) that lists the node on which the kube-state-metrics pod
# s running! So that's totally irrelevant to these queries, but when a nodepool
# is rotated it caused there to exist two metrics with the same node value (which
# we care about) but different kubernetes_node values (because kube-state-metrics
# was running in a different node, even though we don't care about that). This
# group really just drops all labels except the two we care about to
# avoid messing things up.
group(
kube_node_labels
) by (node, label_cloud_google_com_gke_nodepool)
) by (label_cloud_google_com_gke_nodepool)
|||
) + prometheus.withLegendFormat('{{label_cloud_google_com_gke_nodepool}}'),
]);

// local userPods = graphPanel.new(
Expand Down Expand Up @@ -356,9 +356,9 @@ dashboard.new(
// userPods,
// clusterMemoryCommitment,
// clusterCPUCommitment,
userNodes
userNodes,
])
]),
// nonRunningPods,
// row.new('Node Stats'),
// nodeCPUUtil,
Expand Down
2 changes: 1 addition & 1 deletion dashboards/jupyterhub.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local grafonnet = import "github.com/grafana/grafonnet/gen/grafonnet-v10.0.0/main.libsonnet";
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v10.0.0/main.libsonnet';
local graphPanel = grafonnet.graphPanel;
local prometheus = grafonnet.prometheus;

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 562aa75

Please sign in to comment.