From 2de916588f52b0aefa51eabe86c276000712d70d Mon Sep 17 00:00:00 2001 From: Michael McLeroy Date: Tue, 23 May 2023 14:05:35 -0400 Subject: [PATCH 1/2] feat(fluentd): add annotations for configs and dashbaords Signed-off-by: Michael McLeroy --- charts/fluentd/templates/configmap-dashboards.yaml | 4 ++++ charts/fluentd/templates/files.conf/prometheus.yaml | 4 ++++ charts/fluentd/templates/files.conf/systemd.yaml | 4 ++++ charts/fluentd/templates/fluentd-configurations-cm.yaml | 8 ++++++++ charts/fluentd/values.yaml | 6 ++++++ 5 files changed, 26 insertions(+) diff --git a/charts/fluentd/templates/configmap-dashboards.yaml b/charts/fluentd/templates/configmap-dashboards.yaml index de0d5cf1..e43b5e0d 100644 --- a/charts/fluentd/templates/configmap-dashboards.yaml +++ b/charts/fluentd/templates/configmap-dashboards.yaml @@ -10,6 +10,10 @@ metadata: {{- range $key, $val := $.Values.dashboards.labels }} {{ $key }}: {{ $val }} {{- end }} + {{- with $.Values.dashboards.annotations }} + annotations: + {{- toYaml . | nindent 4 -}} + {{- end }} data: {{ base $path }}: |- {{- $.Files.Get $path | nindent 4 }} diff --git a/charts/fluentd/templates/files.conf/prometheus.yaml b/charts/fluentd/templates/files.conf/prometheus.yaml index e063d106..9fcfa2fa 100644 --- a/charts/fluentd/templates/files.conf/prometheus.yaml +++ b/charts/fluentd/templates/files.conf/prometheus.yaml @@ -4,6 +4,10 @@ metadata: labels: {{- include "fluentd.labels" . | nindent 4 }} name: fluentd-prometheus-conf-{{ include "fluentd.shortReleaseName" . }} + {{- with .Values.configs.annotations }} + annotations: + {{- toYaml . | nindent 4 -}} + {{- end }} data: prometheus.conf: |- diff --git a/charts/fluentd/templates/files.conf/systemd.yaml b/charts/fluentd/templates/files.conf/systemd.yaml index aedf3451..fd5b664c 100644 --- a/charts/fluentd/templates/files.conf/systemd.yaml +++ b/charts/fluentd/templates/files.conf/systemd.yaml @@ -4,6 +4,10 @@ metadata: labels: {{- include "fluentd.labels" . | nindent 4 }} name: fluentd-systemd-conf-{{ include "fluentd.shortReleaseName" . }} + {{- with .Values.configs.annotations }} + annotations: + {{- toYaml . | nindent 4 -}} + {{- end }} data: systemd.conf: |- diff --git a/charts/fluentd/templates/fluentd-configurations-cm.yaml b/charts/fluentd/templates/fluentd-configurations-cm.yaml index 289af6be..49826650 100644 --- a/charts/fluentd/templates/fluentd-configurations-cm.yaml +++ b/charts/fluentd/templates/fluentd-configurations-cm.yaml @@ -6,6 +6,10 @@ metadata: name: fluentd-config-{{ include "fluentd.shortReleaseName" . }} labels: {{- include "fluentd.labels" . | nindent 4 }} + {{- with .Values.configs.annotations }} + annotations: + {{- toYaml . | nindent 4 -}} + {{- end }} data: {{- range $key, $value := .Values.fileConfigs }} {{$key }}: |- @@ -21,6 +25,10 @@ metadata: name: fluentd-main-{{ include "fluentd.shortReleaseName" . }} labels: {{- include "fluentd.labels" . | nindent 4 }} + {{- with .Values.configs.annotations }} + annotations: + {{- toYaml . | nindent 4 -}} + {{- end }} data: fluent.conf: |- # do not collect fluentd logs to avoid infinite loops. diff --git a/charts/fluentd/values.yaml b/charts/fluentd/values.yaml index b9ac8d98..c65a91f6 100644 --- a/charts/fluentd/values.yaml +++ b/charts/fluentd/values.yaml @@ -272,12 +272,18 @@ dashboards: namespace: "" labels: grafana_dashboard: '"1"' + annotations: {} ## Fluentd list of plugins to install ## plugins: [] # - fluent-plugin-out-http +## Settings for configMapConfigs and fileConfigs +## +configs: + annotations: {} + ## Add fluentd config files from K8s configMaps ## configMapConfigs: [] From 1e7375859a716df632074389f8f4d05fcdf860d3 Mon Sep 17 00:00:00 2001 From: Michael McLeroy Date: Tue, 23 May 2023 14:09:59 -0400 Subject: [PATCH 2/2] chore(fluentd): bump chart version Signed-off-by: Michael McLeroy --- charts/fluentd/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/fluentd/Chart.yaml b/charts/fluentd/Chart.yaml index e3a6fa6a..f19fa1a5 100644 --- a/charts/fluentd/Chart.yaml +++ b/charts/fluentd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: fluentd description: A Helm chart for Kubernetes # type: application -version: 0.4.3 +version: 0.4.4 appVersion: v1.15.2 icon: https://www.fluentd.org/images/miscellany/fluentd-logo_2x.png home: https://www.fluentd.org/