fluent / helm-charts

Helm Charts for Fluentd and Fluent Bit
Apache License 2.0
366 stars 438 forks source link

Conflict in UIDs of Grafana dashboard when running multiple Fluent Bit Helm Release. #499

Closed captainpro-eng closed 1 month ago

captainpro-eng commented 2 months ago

Is your feature request related to a problem? Please describe. Currently, when deploying multiple release of Fluent Bit using the Helm chart, we encounter conflicts in fixed UIDs used in grafana dashboard in the Fluent Bit helm chart. Specifically, This results in clashes when multiple release are deployed simultaneously, leading to unexpected behavior and error the same UID is used more than once.

Describe the solution you'd like Each release of Fluent Bit should should use unique UIDs to prevent conflicts.

we can extra values parameter to ignore this conflict.

patrick-stephens commented 2 months ago

This should be on the helm charts repo so moving it.

captainpro-eng commented 1 month ago

Solution:- Define in helper template:

{{- define "ffluent-bit.dashboard.uid" -}} {{- sha256sum (printf "%s/%s" .Release.Namespace .Release.Name) }} {{- end -}}

and then reference it as in fluent-bit.json:

"uid": "{{ include "fluent-bit.dashboard.uid" . }}",