From 871c25588a2030659140adaa1b7af2e26c249764 Mon Sep 17 00:00:00 2001 From: Steve Hipwell Date: Tue, 3 Sep 2024 10:30:30 +0100 Subject: [PATCH] feat: Added deterministic Grafana dashboard uids (#1035) Signed-off-by: Steve Hipwell --- charts/fluent-bit-aggregator/CHANGELOG.md | 4 ++++ .../dashboards/fluent-bit-aggregator.json | 2 +- charts/fluent-bit-collector/CHANGELOG.md | 4 ++++ .../fluent-bit-collector/dashboards/fluent-bit-collector.json | 2 +- charts/fluentd-aggregator/CHANGELOG.md | 4 ++++ charts/fluentd-aggregator/dashboards/fluentd-aggregator.json | 2 +- 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/charts/fluent-bit-aggregator/CHANGELOG.md b/charts/fluent-bit-aggregator/CHANGELOG.md index aabad32e..5df64949 100644 --- a/charts/fluent-bit-aggregator/CHANGELOG.md +++ b/charts/fluent-bit-aggregator/CHANGELOG.md @@ -14,6 +14,10 @@ ## [UNRELEASED] +### Added + +- Added deterministic _Grafana_ dashboard `uid` based on the chart namespace and fullname. + ## [v0.15.6] - 2024-08-15 ### Added diff --git a/charts/fluent-bit-aggregator/dashboards/fluent-bit-aggregator.json b/charts/fluent-bit-aggregator/dashboards/fluent-bit-aggregator.json index 5ebb5a3c..23afc9ea 100644 --- a/charts/fluent-bit-aggregator/dashboards/fluent-bit-aggregator.json +++ b/charts/fluent-bit-aggregator/dashboards/fluent-bit-aggregator.json @@ -1537,7 +1537,7 @@ }, "timezone": "", "title": "{{ include "fluent-bit-aggregator.fullname" . }}", - "uid": null, + "uid": "{{ sha1sum (printf "%s-%s" .Release.Namespace (include "fluent-bit-aggregator.fullname" .)) }}", "version": 0, "weekStart": "" } diff --git a/charts/fluent-bit-collector/CHANGELOG.md b/charts/fluent-bit-collector/CHANGELOG.md index 847c724f..5f0b1d38 100644 --- a/charts/fluent-bit-collector/CHANGELOG.md +++ b/charts/fluent-bit-collector/CHANGELOG.md @@ -14,6 +14,10 @@ ## [UNRELEASED] +### Added + +- Added deterministic _Grafana_ dashboard `uid` based on the chart namespace and fullname. + ## [v0.12.6] - 2024-08-15 ### Changed diff --git a/charts/fluent-bit-collector/dashboards/fluent-bit-collector.json b/charts/fluent-bit-collector/dashboards/fluent-bit-collector.json index 9b1ae03a..37329d9a 100644 --- a/charts/fluent-bit-collector/dashboards/fluent-bit-collector.json +++ b/charts/fluent-bit-collector/dashboards/fluent-bit-collector.json @@ -1559,7 +1559,7 @@ }, "timezone": "", "title": "{{ include "fluent-bit-collector.fullname" . }}", - "uid": null, + "uid": "{{ sha1sum (printf "%s-%s" .Release.Namespace (include "fluent-bit-collector.fullname" .)) }}", "version": 7, "weekStart": "" } diff --git a/charts/fluentd-aggregator/CHANGELOG.md b/charts/fluentd-aggregator/CHANGELOG.md index 791a0df4..4420cb0a 100644 --- a/charts/fluentd-aggregator/CHANGELOG.md +++ b/charts/fluentd-aggregator/CHANGELOG.md @@ -14,6 +14,10 @@ ## [UNRELEASED] +### Added + +- Added deterministic _Grafana_ dashboard `uid` based on the chart namespace and fullname. + ## [v4.8.2] - 2024-08-29 ### Changed diff --git a/charts/fluentd-aggregator/dashboards/fluentd-aggregator.json b/charts/fluentd-aggregator/dashboards/fluentd-aggregator.json index fd78d3b2..c458fab2 100644 --- a/charts/fluentd-aggregator/dashboards/fluentd-aggregator.json +++ b/charts/fluentd-aggregator/dashboards/fluentd-aggregator.json @@ -2648,7 +2648,7 @@ }, "timezone": "utc", "title": "{{ include "fluentd-aggregator.fullname" . }}", - "uid": null, + "uid": "{{ sha1sum (printf "%s-%s" .Release.Namespace (include "fluentd-aggregator.fullname" .)) }}", "version": 4, "weekStart": "" }