Skip to content

Commit 2c14044

Browse files
authored
Merge pull request #142 from consideRatio/pr/update-grafonnet
Update grafonnet from v10.4.0 to v11.1.0, Grafana v11.1.0 is now required
2 parents 1f5fa1c + b8dc179 commit 2c14044

File tree

459 files changed

+37850
-25885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

459 files changed

+37850
-25885
lines changed

dashboards/activity.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env -S jsonnet -J ../vendor
2-
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/main.libsonnet';
2+
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v11.1.0/main.libsonnet';
33
local dashboard = grafonnet.dashboard;
44
local ts = grafonnet.panel.timeSeries;
55
local prometheus = grafonnet.query.prometheus;

dashboards/cluster.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env -S jsonnet -J ../vendor
22
// Deploys a dashboard showing cluster-wide information
3-
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/main.libsonnet';
3+
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v11.1.0/main.libsonnet';
44
local dashboard = grafonnet.dashboard;
55
local ts = grafonnet.panel.timeSeries;
66
local barChart = grafonnet.panel.barChart;

dashboards/common.libsonnet

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/main.libsonnet';
1+
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v11.1.0/main.libsonnet';
22
local ts = grafonnet.panel.timeSeries;
33
local barChart = grafonnet.panel.barChart;
44
local barGauge = grafonnet.panel.barGauge;
@@ -14,10 +14,10 @@ local var = grafonnet.dashboard.variable;
1414
* - Y axes to start from 0 -- withMin(0)
1515
* - Legend tooltip to show all values -- withTooltip({mode: 'multi'})
1616
*
17-
* ref: https://grafana.com/docs/grafana/v10.4/panels-visualizations/configure-panel-options/
17+
* ref: https://grafana.com/docs/grafana/v11.1/panels-visualizations/configure-panel-options/
1818
*/
1919

20-
// grafana ref: https://grafana.com/docs/grafana/v10.4/panels-visualizations/visualizations/time-series/
20+
// grafana ref: https://grafana.com/docs/grafana/v11.1/panels-visualizations/visualizations/time-series/
2121
// grafonnet ref: https://grafana.github.io/grafonnet/API/panel/timeSeries/index.html
2222
tsOptions:
2323
ts.standardOptions.withMin(0)
@@ -26,20 +26,20 @@ local var = grafonnet.dashboard.variable;
2626
+ ts.fieldConfig.defaults.custom.withFillOpacity(10)
2727
,
2828

29-
// grafana ref: https://grafana.com/docs/grafana/v10.4/panels-visualizations/visualizations/bar-chart/
29+
// grafana ref: https://grafana.com/docs/grafana/v11.1/panels-visualizations/visualizations/bar-chart/
3030
// grafonnet ref: https://grafana.github.io/grafonnet/API/panel/barChart/index.html
3131
barChartOptions:
3232
barChart.standardOptions.withMin(0)
3333
+ barChart.options.withTooltip({ mode: 'multi' })
3434
,
3535

36-
// grafana ref: https://grafana.com/docs/grafana/v10.4/panels-visualizations/visualizations/bar-gauge/
36+
// grafana ref: https://grafana.com/docs/grafana/v11.1/panels-visualizations/visualizations/bar-gauge/
3737
// grafonnet ref: https://grafana.github.io/grafonnet/API/panel/barGauge/index.html
3838
barGaugeOptions:
3939
barGauge.standardOptions.withMin(0)
4040
,
4141

42-
// grafana ref: https://grafana.com/docs/grafana/v10.4/panels-visualizations/visualizations/heatmap/
42+
// grafana ref: https://grafana.com/docs/grafana/v11.1/panels-visualizations/visualizations/heatmap/
4343
// grafonnet ref: https://grafana.github.io/grafonnet/API/panel/heatmap/index.html
4444
heatmapOptions:
4545
heatmap.options.withCalculate(true)

dashboards/homedirs.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env -S jsonnet -J ../vendor
2-
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/main.libsonnet';
2+
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v11.1.0/main.libsonnet';
33
local dashboard = grafonnet.dashboard;
44
local prometheus = grafonnet.query.prometheus;
55
local table = grafonnet.panel.table;

dashboards/jupyterhub.jsonnet

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env -S jsonnet -J ../vendor
22
// Deploys one dashboard - "JupyterHub dashboard",
33
// with useful stats about usage & diagnostics.
4-
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/main.libsonnet';
4+
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v11.1.0/main.libsonnet';
55
local dashboard = grafonnet.dashboard;
66
local ts = grafonnet.panel.timeSeries;
77
local prometheus = grafonnet.query.prometheus;
@@ -16,7 +16,7 @@ local userMemoryDistribution =
1616
common.heatmapOptions
1717
+ heatmap.new('User memory usage distribution')
1818
+ heatmap.options.yAxis.withUnit('bytes')
19-
+ heatmap.options.color.HeatmapColorOptions.withScheme('Viridis')
19+
+ heatmap.options.color.withScheme('Viridis')
2020
+ heatmap.options.calculation.xBuckets.withMode('size')
2121
+ heatmap.options.calculation.xBuckets.withValue('600s') // must align with interval
2222
+ heatmap.queryOptions.withInterval('600s') // must align with xBuckets value
@@ -41,7 +41,7 @@ local userCPUDistribution =
4141
common.heatmapOptions
4242
+ heatmap.new('User CPU usage distribution')
4343
+ heatmap.options.yAxis.withUnit('percentunit')
44-
+ heatmap.options.color.HeatmapColorOptions.withScheme('Viridis')
44+
+ heatmap.options.color.withScheme('Viridis')
4545
+ heatmap.options.calculation.xBuckets.withMode('size')
4646
+ heatmap.options.calculation.xBuckets.withValue('600s') // must align with interval
4747
+ heatmap.queryOptions.withInterval('600s') // must align with xBuckets value
@@ -66,7 +66,7 @@ local userAgeDistribution =
6666
common.heatmapOptions
6767
+ heatmap.new('User active age distribution')
6868
+ heatmap.options.yAxis.withUnit('s')
69-
+ heatmap.options.color.HeatmapColorOptions.withScheme('Viridis')
69+
+ heatmap.options.color.withScheme('Viridis')
7070
+ heatmap.options.calculation.xBuckets.withMode('size')
7171
+ heatmap.options.calculation.xBuckets.withValue('600s') // must align with interval
7272
+ heatmap.queryOptions.withInterval('600s') // must align with xBuckets value

dashboards/jupyterhub.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/main.libsonnet';
1+
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v11.1.0/main.libsonnet';
22
local ts = grafonnet.panel.timeSeries;
33
local prometheus = grafonnet.query.prometheus;
44

dashboards/support.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env -S jsonnet -J ../vendor
22
// Deploys a dashboard showing information about support resources
3-
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/main.libsonnet';
3+
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v11.1.0/main.libsonnet';
44
local dashboard = grafonnet.dashboard;
55
local ts = grafonnet.panel.timeSeries;
66
local prometheus = grafonnet.query.prometheus;

dashboards/usage-report.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env -S jsonnet -J ../vendor
2-
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/main.libsonnet';
2+
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v11.1.0/main.libsonnet';
33
local dashboard = grafonnet.dashboard;
44
local barGauge = grafonnet.panel.barGauge;
55
local prometheus = grafonnet.query.prometheus;

dashboards/user.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env -S jsonnet -J ../vendor
2-
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/main.libsonnet';
2+
local grafonnet = import 'github.com/grafana/grafonnet/gen/grafonnet-v11.1.0/main.libsonnet';
33
local dashboard = grafonnet.dashboard;
44
local ts = grafonnet.panel.timeSeries;
55
local prometheus = grafonnet.query.prometheus;

docs/contributing.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,15 @@ with `jsonnet`, you can deploy dashboards to a Grafana instance like this:
5757

5858
### Upgrading the grafonnet version
5959

60-
The grafonnet jsonnet library is bundled here with [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler).
61-
Just running `jb update` in the git repo root dir after installing jsonnet-bunder should bring
62-
you up to speed.
60+
The grafonnet jsonnet library is bundled here with [jsonnet-bundler]. The
61+
upgrade procedure looks looks like this:
62+
63+
1. Install jsonnet-bunder
64+
2. Update `jsonnetfile.json` to reference the new version
65+
3. Run `jb update` in the git repo root dir
66+
4. Search and replace remaining old version references with the new version
67+
68+
[jsonnet-bundler]: https://github.com/jsonnet-bundler/jsonnet-bundler
6369

6470
### Metrics guidelines
6571

docs/tutorials/deploy.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Deploying the dashboards
33

44
```{warning}
5-
ANY CHANGES YOU MAKE VIA THE GRAFANA UI WILL BE OVERWRITTEN NEXT TIME YOU RUN deploy.bash.
5+
ANY CHANGES YOU MAKE VIA THE GRAFANA UI WILL BE OVERWRITTEN NEXT TIME YOU RUN `deploy.py`.
66
TO MAKE CHANGES, EDIT THE JSONNET FILE AND DEPLOY AGAIN
77
```
88

@@ -43,7 +43,8 @@ TO MAKE CHANGES, EDIT THE JSONNET FILE AND DEPLOY AGAIN
4343
Make sure this is indented correctly where it should be!
4444
```
4545

46-
4. A recent version of Grafana, with a prometheus data source already added.
46+
4. A recent version of Grafana (v11.1.0 or higher), with a prometheus data
47+
source already added.
4748

4849
5. An API key with 'admin' permissions. This is per-organization, and you can make a new one
4950
by going to the configuration pane for your Grafana (the gear icon on the left bar), and

jsonnetfile.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": {
77
"git": {
88
"remote": "https://github.com/grafana/grafonnet.git",
9-
"subdir": "gen/grafonnet-v10.4.0"
9+
"subdir": "gen/grafonnet-v11.1.0"
1010
}
1111
},
1212
"version": "main"

jsonnetfile.lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"source": {
66
"git": {
77
"remote": "https://github.com/grafana/grafonnet.git",
8-
"subdir": "gen/grafonnet-v10.4.0"
8+
"subdir": "gen/grafonnet-v11.1.0"
99
}
1010
},
11-
"version": "6ac1593ca787638da223380ff4a3fd0f96e953e1",
12-
"sum": "ZSmDT7i/qU9P8ggmuPuJT+jonq1ZEsBRCXycW/H5L/A=",
11+
"version": "1ce5aec95ce32336fe47c8881361847c475b5254",
12+
"sum": "41w7p/rwrNsITqNHMXtGSJAfAyKmnflg6rFhKBduUxM=",
1313
"name": "grafonnet"
1414
},
1515
{

vendor/github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/clean/alerting/contactPoint.libsonnet

Lines changed: 0 additions & 19 deletions
This file was deleted.

vendor/github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/clean/alerting/messageTemplate.libsonnet

Lines changed: 0 additions & 8 deletions
This file was deleted.

vendor/github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/clean/alerting/muteTiming.libsonnet

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)