From a54a567734285f63df9c2edf7af99eeb9a9089da Mon Sep 17 00:00:00 2001 From: srkoster <89455157+srkoster@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:18:23 +0100 Subject: [PATCH 1/5] Update lint-test.yaml --- .github/workflows/lint-test.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 715c335..fe9be6e 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -4,10 +4,6 @@ on: pull_request: branches: - main - paths: - - 'charts/crowdsec/values.yaml' - - 'charts/crowdsec/Chart.yaml' - - 'charts/crowdsec/templates/**.yaml' jobs: kind: From f5c1ce98cb87623a71e3cef9f755585c16e4751f Mon Sep 17 00:00:00 2001 From: srkoster <89455157+srkoster@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:30:47 +0100 Subject: [PATCH 2/5] Put paths back --- .github/workflows/lint-test.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index fe9be6e..715c335 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -4,6 +4,10 @@ on: pull_request: branches: - main + paths: + - 'charts/crowdsec/values.yaml' + - 'charts/crowdsec/Chart.yaml' + - 'charts/crowdsec/templates/**.yaml' jobs: kind: From efe502ce69676d84912d2eeb2d450782102b3c3a Mon Sep 17 00:00:00 2001 From: srkoster <89455157+srkoster@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:36:25 +0100 Subject: [PATCH 3/5] Added kubernetes audit datasource --- charts/crowdsec/values.schema.json | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/charts/crowdsec/values.schema.json b/charts/crowdsec/values.schema.json index abac55e..87b2483 100644 --- a/charts/crowdsec/values.schema.json +++ b/charts/crowdsec/values.schema.json @@ -64,6 +64,9 @@ }, { "$ref": "#/definitions/HttpSource" + }, + { + "$ref": "#/definitions/KubernetesSource" } ] } @@ -815,6 +818,37 @@ } }, "required": ["source", "url", "query"] + }, + "KubernetesSource": { + "type": "object", + "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/kubernetes_audit", + "additionalProperties": false, + "properties": { + "source": { + "const": "k8s-audit" + }, + "labels": { + "$ref": "#/definitions/Labels" + }, + "listen_addr": { + "type": "string", + "default": "127.0.0.1", + "description": "Address on which the syslog will listen." + }, + "listen_port": { + "type": "number", + "default": 9876, + "description": "The port on which the datasource will listen." + }, + "webhook_path": { + "type": "string", + "default": "/webhook", + "description": "The path on which the datasource will accept requests from kubernetes." + } + }, + "required": [ + "source" + ] } } } From 93bca3d0ae5e003244bdc4fb9d70498848f4ff65 Mon Sep 17 00:00:00 2001 From: srkoster <89455157+srkoster@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:39:34 +0100 Subject: [PATCH 4/5] Updated data sources descriptions The path was missing /log_processor/ --- charts/crowdsec/values.schema.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/charts/crowdsec/values.schema.json b/charts/crowdsec/values.schema.json index 87b2483..f8c3960 100644 --- a/charts/crowdsec/values.schema.json +++ b/charts/crowdsec/values.schema.json @@ -164,7 +164,7 @@ }, "FileSource": { "type": "object", - "description": "https://docs.crowdsec.net/docs/next/data_sources/file/", + "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/file/", "additionalProperties": false, "properties": { "source": { @@ -213,7 +213,7 @@ }, "JournaldSource": { "type": "object", - "description": "https://docs.crowdsec.net/docs/next/data_sources/journald/", + "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/journald/", "additionalProperties": false, "properties": { "source": { @@ -237,7 +237,7 @@ }, "CloudwatchSource": { "type": "object", - "description": "https://docs.crowdsec.net/docs/next/data_sources/cloudwatch/", + "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/cloudwatch/", "additionalProperties": false, "properties": { "source": { @@ -302,7 +302,7 @@ }, "DockerSource": { "type": "object", - "description": "https://docs.crowdsec.net/docs/next/data_sources/docker/", + "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/docker/", "additionalProperties": false, "properties": { "source": { @@ -397,7 +397,7 @@ }, "KinesisSource": { "type": "object", - "description": "https://docs.crowdsec.net/docs/next/data_sources/kinesis/", + "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/kinesis/", "additionalProperties": false, "allOf": [ { @@ -493,7 +493,7 @@ }, "SyslogSource": { "type": "object", - "description": "https://docs.crowdsec.net/docs/next/data_sources/syslog/", + "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/syslog/", "additionalProperties": false, "properties": { "source": { @@ -524,7 +524,7 @@ }, "HttpSource": { "type": "object", - "description": "https://docs.crowdsec.net/docs/next/data_sources/http/", + "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/http/", "additionalProperties": false, "properties": { "source": { @@ -617,7 +617,7 @@ }, "KafkaSource": { "type": "object", - "description": "https://docs.crowdsec.net/docs/next/data_sources/kafka/", + "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/kafka", "additionalProperties": false, "properties": { "source": { @@ -670,7 +670,7 @@ }, "WinEventLogSource": { "type": "object", - "description": "https://docs.crowdsec.net/docs/next/data_sources/windows_evt_log/", + "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/windows_evt_log/", "additionalProperties": false, "allOf": [ { @@ -761,7 +761,7 @@ }, "LokiSource": { "type": "object", - "description": "https://docs.crowdsec.net/docs/next/data_sources/loki", + "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/loki/", "properties": { "source": { "const": "loki" @@ -821,7 +821,7 @@ }, "KubernetesSource": { "type": "object", - "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/kubernetes_audit", + "description": "https://docs.crowdsec.net/docs/next/log_processor/data_sources/kubernetes_audit/", "additionalProperties": false, "properties": { "source": { From 22017d55cf202efa8904cbad0520401b914c01e2 Mon Sep 17 00:00:00 2001 From: Stefan Koster Date: Tue, 24 Dec 2024 10:42:01 +0100 Subject: [PATCH 5/5] Added listen_addr, listen_port, webhook_path to required fields for kubernetesSource --- charts/crowdsec/values.schema.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/crowdsec/values.schema.json b/charts/crowdsec/values.schema.json index f8c3960..8765da7 100644 --- a/charts/crowdsec/values.schema.json +++ b/charts/crowdsec/values.schema.json @@ -847,7 +847,10 @@ } }, "required": [ - "source" + "source", + "listen_addr", + "listen_port", + "webhook_path" ] } }