Skip to content

Commit

Permalink
refactor: re-format cluster.jsonnet's dashboard.new call
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Apr 5, 2024
1 parent 1ab98bd commit 5b77723
Showing 1 changed file with 30 additions and 29 deletions.
59 changes: 30 additions & 29 deletions dashboards/cluster.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -384,33 +384,34 @@ local nonRunningPods = common.barChartOptions + barChart.new(
) + prometheus.withLegendFormat('{{phase}}'),
]);

dashboard.new(
'Cluster Information',
) + dashboard.withTags(
['jupyterhub', 'kubernetes']
) + dashboard.withEditable(
true
) + dashboard.withVariables(
common.variables.prometheus
) + dashboard.withPanels(
grafonnet.util.grid.makeGrid([
row.new(
'Cluster Utilization'
) + row.withPanels([
userPods,
userNodes,
nodepoolMemoryCommitment,
nodepoolCPUCommitment,
]),
row.new('Cluster Health') + row.withPanels([
nonRunningPods,
nodeOOMKills,
]),
row.new('Node Stats') + row.withPanels([
nodeCPUCommit,
nodeMemoryCommit,
nodeCPUUtil,
nodeMemoryUtil,
]),
], panelWidth=12, panelHeight=8)
dashboard.new('Cluster Information')
+ dashboard.withTags(['jupyterhub', 'kubernetes'])
+ dashboard.withEditable(true)
+ dashboard.withVariables(common.variables.prometheus)
+ dashboard.withPanels(
grafonnet.util.grid.makeGrid(
[
row.new('Cluster Utilization')
+ row.withPanels([
userPods,
userNodes,
nodepoolMemoryCommitment,
nodepoolCPUCommitment,
]),
row.new('Cluster Health')
+ row.withPanels([
nonRunningPods,
nodeOOMKills,
]),
row.new('Node Stats')
+ row.withPanels([
nodeCPUCommit,
nodeMemoryCommit,
nodeCPUUtil,
nodeMemoryUtil,
]),
],
panelWidth=12,
panelHeight=8,
)
)

0 comments on commit 5b77723

Please sign in to comment.