Skip to content

Commit

Permalink
feat(fluentd): add annotations for configs and dashbaords
Browse files Browse the repository at this point in the history
Signed-off-by: Michael McLeroy <[email protected]>
  • Loading branch information
Boojapho committed May 23, 2023
1 parent 7f319a4 commit 2de9165
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/fluentd/templates/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/fluentd/templates/files.conf/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
<source>
Expand Down
4 changes: 4 additions & 0 deletions charts/fluentd/templates/files.conf/systemd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
<source>
Expand Down
8 changes: 8 additions & 0 deletions charts/fluentd/templates/fluentd-configurations-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}: |-
Expand All @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions charts/fluentd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Expand Down

0 comments on commit 2de9165

Please sign in to comment.