From da71989e09dea5a0190398d4bbba6dac1e151f2f Mon Sep 17 00:00:00 2001 From: Ayoub NASR Date: Tue, 3 Sep 2024 14:17:23 +0200 Subject: [PATCH] Make UID of grafana Fluent Bit dashboard configurable in values (#532) * Make UID of grafana Fluent Bit dashboard a sha1sum of name and namespace Signed-off-by: Ayoub Nasr * Bump version, add release notes Signed-off-by: Ayoub Nasr --------- Signed-off-by: Ayoub Nasr --- charts/fluent-bit/Chart.yaml | 4 ++-- charts/fluent-bit/ci/ci-values.yaml | 1 + charts/fluent-bit/dashboards/fluent-bit.json | 2 +- charts/fluent-bit/values.yaml | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/charts/fluent-bit/Chart.yaml b/charts/fluent-bit/Chart.yaml index 6ec9b829..6e948cf0 100644 --- a/charts/fluent-bit/Chart.yaml +++ b/charts/fluent-bit/Chart.yaml @@ -5,7 +5,7 @@ keywords: - logging - fluent-bit - fluentd -version: 0.47.8 +version: 0.47.9 appVersion: 3.1.7 icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/fluentd/fluentbit/icon/fluentbit-icon-color.svg home: https://fluentbit.io/ @@ -23,4 +23,4 @@ maintainers: annotations: artifacthub.io/changes: | - kind: changed - description: "Updated Fluent Bit OCI image to v3.1.7." + description: "Made fluent-bit grafana dashboard uid configurable" diff --git a/charts/fluent-bit/ci/ci-values.yaml b/charts/fluent-bit/ci/ci-values.yaml index 9e230d2a..bafd568a 100644 --- a/charts/fluent-bit/ci/ci-values.yaml +++ b/charts/fluent-bit/ci/ci-values.yaml @@ -5,3 +5,4 @@ logLevel: debug dashboards: enabled: true + deterministicUid: true diff --git a/charts/fluent-bit/dashboards/fluent-bit.json b/charts/fluent-bit/dashboards/fluent-bit.json index 803014fd..584a8c94 100644 --- a/charts/fluent-bit/dashboards/fluent-bit.json +++ b/charts/fluent-bit/dashboards/fluent-bit.json @@ -1559,7 +1559,7 @@ }, "timezone": "", "title": "{{ include "fluent-bit.fullname" . }}", - "uid": null, + "uid": {{ ternary (printf "\"%s\"" (sha1sum (printf "%s-%s" .Release.Namespace (include "fluent-bit.fullname" .)))) "null" .Values.dashboards.deterministicUid }}, "version": 7, "weekStart": "" } diff --git a/charts/fluent-bit/values.yaml b/charts/fluent-bit/values.yaml index ae242086..d84ab662 100644 --- a/charts/fluent-bit/values.yaml +++ b/charts/fluent-bit/values.yaml @@ -182,6 +182,7 @@ dashboards: labelValue: 1 annotations: {} namespace: "" + deterministicUid: false lifecycle: {} # preStop: