Skip to content

Commit

Permalink
Make UID of grafana Fluent Bit dashboard configurable in values
Browse files Browse the repository at this point in the history
Signed-off-by: Ayoub Nasr <[email protected]>
  • Loading branch information
eg-ayoub committed Jul 16, 2024
1 parent 642a959 commit d13009a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions charts/fluent-bit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- logging
- fluent-bit
- fluentd
version: 0.47.2
version: 0.47.3
appVersion: 3.1.2
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/fluentd/fluentbit/icon/fluentbit-icon-color.svg
home: https://fluentbit.io/
Expand All @@ -23,4 +23,4 @@ maintainers:
annotations:
artifacthub.io/changes: |
- kind: changed
description: "Updated Fluent Bit OCI image to v3.1.2."
description: "Make uid for grafana fluent-bit chart configurable."
2 changes: 1 addition & 1 deletion charts/fluent-bit/dashboards/fluent-bit.json
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@
},
"timezone": "",
"title": "{{ include "fluent-bit.fullname" . }}",
"uid": null,
"uid": {{ include "fluent-bit.dashboard.uid" . }},
"version": 7,
"weekStart": ""
}
10 changes: 10 additions & 0 deletions charts/fluent-bit/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,13 @@ Create the name of OpenShift SecurityContextConstraints to use
{{- printf "%s" (default (include "fluent-bit.fullname" .) .Values.openShift.securityContextConstraints.name) -}}
{{- end -}}
{{- end -}}
{{/*
Define the uid for grafana fluent-bit dashboard
*/}}
{{- define "fluent-bit.dashboard.uid" -}}
{{- if not .Values.dashboards.uids.fluent_bit }}
{{- printf "null" }}
{{- else }}
{{- printf "\"%s\"" .Values.dashboards.uids.fluent_bit }}
{{- end -}}
{{- end -}}
2 changes: 2 additions & 0 deletions charts/fluent-bit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ dashboards:
labelValue: 1
annotations: {}
namespace: ""
uids:
fluent_bit: null

lifecycle: {}
# preStop:
Expand Down

0 comments on commit d13009a

Please sign in to comment.