From ebcce32b38bb71aa9485c050c4bae88f591883c2 Mon Sep 17 00:00:00 2001 From: Attila Szakacs Date: Fri, 11 Aug 2023 10:50:58 +0200 Subject: [PATCH 1/4] collector: add opentelemetry() parser Signed-off-by: Attila Szakacs --- charts/axosyslog-collector/templates/config.yaml | 5 +++++ charts/axosyslog-collector/values.yaml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/charts/axosyslog-collector/templates/config.yaml b/charts/axosyslog-collector/templates/config.yaml index 730b9bc..230c29d 100644 --- a/charts/axosyslog-collector/templates/config.yaml +++ b/charts/axosyslog-collector/templates/config.yaml @@ -31,6 +31,11 @@ data: ); }; {{- end }} +{{- if .Values.config.parsers.opentelemetry.enabled }} + parser { + opentelemetry(); + }; +{{- end }} {{- range .Values.config.destinations.network }} destination { network( diff --git a/charts/axosyslog-collector/values.yaml b/charts/axosyslog-collector/values.yaml index e238cdf..abd03a6 100644 --- a/charts/axosyslog-collector/values.yaml +++ b/charts/axosyslog-collector/values.yaml @@ -48,6 +48,9 @@ config: opentelemetry: [] # E.g.: # - port: 4317 + parsers: + opentelemetry: + enabled: false destinations: network: [] # E.g.: From b502ad96ed830ba0f6ff19fca0cdf6e4ccc4f86d Mon Sep 17 00:00:00 2001 From: Attila Szakacs Date: Fri, 11 Aug 2023 10:51:19 +0200 Subject: [PATCH 2/4] collector: add file() destination Signed-off-by: Attila Szakacs --- charts/axosyslog-collector/templates/config.yaml | 10 ++++++++++ charts/axosyslog-collector/values.yaml | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/charts/axosyslog-collector/templates/config.yaml b/charts/axosyslog-collector/templates/config.yaml index 230c29d..591ecf0 100644 --- a/charts/axosyslog-collector/templates/config.yaml +++ b/charts/axosyslog-collector/templates/config.yaml @@ -36,6 +36,16 @@ data: opentelemetry(); }; {{- end }} +{{- range .Values.config.destinations.file }} + destination { + file( + {{ .path | quote }} + {{- if .template }} + template({{ .template | quote }}) + {{- end }} + ); + }; +{{- end }} {{- range .Values.config.destinations.network }} destination { network( diff --git a/charts/axosyslog-collector/values.yaml b/charts/axosyslog-collector/values.yaml index abd03a6..f1ec730 100644 --- a/charts/axosyslog-collector/values.yaml +++ b/charts/axosyslog-collector/values.yaml @@ -52,6 +52,10 @@ config: opentelemetry: enabled: false destinations: + file: [] +# E.g.: +# - path: "/dev/stdout" +# template: "$(format-json .*)" network: [] # E.g.: # - transport: tcp From d3b5af7d89706aed6fba45e5be2b6050cc6cd825 Mon Sep 17 00:00:00 2001 From: Attila Szakacs Date: Fri, 11 Aug 2023 12:40:09 +0200 Subject: [PATCH 3/4] collector: add extraOptionsRaw for destinations Signed-off-by: Attila Szakacs --- charts/axosyslog-collector/templates/config.yaml | 12 ++++++++++++ charts/axosyslog-collector/values.yaml | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/charts/axosyslog-collector/templates/config.yaml b/charts/axosyslog-collector/templates/config.yaml index 591ecf0..6f045b4 100644 --- a/charts/axosyslog-collector/templates/config.yaml +++ b/charts/axosyslog-collector/templates/config.yaml @@ -42,6 +42,9 @@ data: {{ .path | quote }} {{- if .template }} template({{ .template | quote }}) + {{- end }} + {{- if .extraOptionsRaw }} + {{ .extraOptionsRaw }} {{- end }} ); }; @@ -54,6 +57,9 @@ data: transport({{ .transport }}) {{- if .template }} template({{ .template | quote }}) + {{- end }} + {{- if .extraOptionsRaw }} + {{ .extraOptionsRaw }} {{- end }} ); }; @@ -93,6 +99,9 @@ data: peer-verify(no) {{- end }} ) + {{- end }} + {{- if .extraOptionsRaw }} + {{ .extraOptionsRaw }} {{- end }} ); }; @@ -101,6 +110,9 @@ data: destination { opentelemetry( url({{ tpl .url $ | quote }}) + {{- if .extraOptionsRaw }} + {{ .extraOptionsRaw }} + {{- end }} ); }; {{- end }} diff --git a/charts/axosyslog-collector/values.yaml b/charts/axosyslog-collector/values.yaml index f1ec730..d3f3917 100644 --- a/charts/axosyslog-collector/values.yaml +++ b/charts/axosyslog-collector/values.yaml @@ -56,12 +56,14 @@ config: # E.g.: # - path: "/dev/stdout" # template: "$(format-json .*)" +# extraOptionsRaw: "create-dirs(yes)" network: [] # E.g.: # - transport: tcp # address: localhost # port: 12345 # template: "$(format-json .*)" +# extraOptionsRaw: "time-reopen(10)" opensearch: [] # E.g.: # - address: 10.104.232.94 @@ -75,9 +77,11 @@ config: # Key: "/path/to/Key.pem" # peerVerify: false # template: "$(format-json .*)" +# extraOptionsRaw: "time-reopen(10)" opentelemetry: [] # E.g.: # - url: "10.104.232.95:4317" +# extraOptionsRaw: "time-reopen(10)" rbac: create: true From 77deb8088da22c8c63af42852a4ff349b7f20b54 Mon Sep 17 00:00:00 2001 From: Attila Szakacs Date: Fri, 11 Aug 2023 11:42:26 +0200 Subject: [PATCH 4/4] collector: bump version to 0.5.0 Signed-off-by: Attila Szakacs --- charts/axosyslog-collector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/axosyslog-collector/Chart.yaml b/charts/axosyslog-collector/Chart.yaml index 90fc179..5cfa543 100644 --- a/charts/axosyslog-collector/Chart.yaml +++ b/charts/axosyslog-collector/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: axosyslog-collector description: AxoSyslog Kubernetes log collector type: application -version: 0.4.0 +version: 0.5.0 appVersion: "4.3.1"