From 172f7928fc744ca4da6b80245a1f9acb231ca393 Mon Sep 17 00:00:00 2001 From: Sam Song Date: Thu, 2 Apr 2020 19:05:44 -0700 Subject: [PATCH 1/2] expose override raw conf for container log pipeline --- .../helm/sumologic/conf/logs/logs.source.containers.conf | 7 ++++++- deploy/helm/sumologic/conf/logs/logs.source.systemd.conf | 6 +++++- deploy/helm/sumologic/values.yaml | 5 +++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/deploy/helm/sumologic/conf/logs/logs.source.containers.conf b/deploy/helm/sumologic/conf/logs/logs.source.containers.conf index d0a1dc9641..6f2c4c7501 100644 --- a/deploy/helm/sumologic/conf/logs/logs.source.containers.conf +++ b/deploy/helm/sumologic/conf/logs/logs.source.containers.conf @@ -1,3 +1,6 @@ +{{ if .Values.fluentd.logs.containers.overrideRawConfig }} +{{ .Values.fluentd.logs.containers.overrideRawConfig }} +{{- else}} @type record_transformer enable_ruby @@ -14,7 +17,8 @@ @label @NORMAL +{{- end}} diff --git a/deploy/helm/sumologic/conf/logs/logs.source.systemd.conf b/deploy/helm/sumologic/conf/logs/logs.source.systemd.conf index 2c02ddb09e..295b00d888 100644 --- a/deploy/helm/sumologic/conf/logs/logs.source.systemd.conf +++ b/deploy/helm/sumologic/conf/logs/logs.source.systemd.conf @@ -1,3 +1,4 @@ +{{ if .Values.fluentd.logs.kubelet.enabled }} @type relabel @label @KUBELET @@ -29,6 +30,8 @@ +{{- end}} +{{ if .Values.fluentd.logs.systemd.enabled }} @type relabel @label @SYSTEMD @@ -64,4 +67,5 @@ @include buffer.output.conf - \ No newline at end of file + +{{- end}} \ No newline at end of file diff --git a/deploy/helm/sumologic/values.yaml b/deploy/helm/sumologic/values.yaml index 3c0a27320e..c0fcecaeae 100644 --- a/deploy/helm/sumologic/values.yaml +++ b/deploy/helm/sumologic/values.yaml @@ -211,6 +211,9 @@ fluentd: ## Container log configuration containers: + ## To override the contents of logs.source.containers.conf file. Leave empty for the default pipeline + overrideRawConfig: |- + outputConf: |- @include logs.output.conf ## Set the _sourceName metadata field in Sumo Logic. @@ -257,6 +260,7 @@ fluentd: ## Kubelet log configuration kubelet: + enabled: true outputConf: |- @include logs.output.conf ## Set the _sourceName metadata field in Sumo Logic. @@ -283,6 +287,7 @@ fluentd: ## Systemd log configuration systemd: + enabled: true outputConf: |- @include logs.output.conf ## Set the _sourceCategory metadata field in Sumo Logic. From a16f034f9cf4b7124dbce3cb638f7b7d88d6e7a6 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 3 Apr 2020 02:22:37 +0000 Subject: [PATCH 2/2] Generate new 'fluentd-sumologic.yaml.tmpl' --- deploy/kubernetes/fluentd-sumologic.yaml.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy/kubernetes/fluentd-sumologic.yaml.tmpl b/deploy/kubernetes/fluentd-sumologic.yaml.tmpl index c197d26eda..67221685cf 100644 --- a/deploy/kubernetes/fluentd-sumologic.yaml.tmpl +++ b/deploy/kubernetes/fluentd-sumologic.yaml.tmpl @@ -230,6 +230,7 @@ data: proxy_uri "" logs.source.containers.conf: | + @type record_transformer enable_ruby @@ -246,7 +247,8 @@ data: @label @NORMAL + @type relabel @label @SYSTEMD