From 460f44e64c27f7ee8bd7038659cf1ccde92cf768 Mon Sep 17 00:00:00 2001 From: Panos Koutsovasilis Date: Wed, 30 Oct 2024 12:58:24 +0200 Subject: [PATCH] [helm]: integration config for scheduler and controller-manager conditions and containers logs (#5853) * fix: integration config for scheduler and controller-manager conditions and containers logs * fix: update rendered examples * fix: add back processors --- deploy/helm/elastic-agent/examples/eck/rendered/manifest.yaml | 1 + .../examples/kubernetes-default/rendered/manifest.yaml | 3 ++- .../kubernetes-hints-autodiscover/rendered/manifest.yaml | 3 ++- .../examples/kubernetes-only-logs/rendered/manifest.yaml | 3 ++- .../examples/multiple-integrations/rendered/manifest.yaml | 3 ++- .../_kubernetes/_kubernetes_controller_manager.tpl | 4 ++-- .../integrations/_kubernetes/_kubernetes_logs_containers.tpl | 1 + .../integrations/_kubernetes/_kubernetes_scheduler.tpl | 4 ++-- deploy/helm/elastic-agent/values.schema.json | 2 +- 9 files changed, 15 insertions(+), 9 deletions(-) diff --git a/deploy/helm/elastic-agent/examples/eck/rendered/manifest.yaml b/deploy/helm/elastic-agent/examples/eck/rendered/manifest.yaml index bd912d1ac2f..7a3e94ba822 100644 --- a/deploy/helm/elastic-agent/examples/eck/rendered/manifest.yaml +++ b/deploy/helm/elastic-agent/examples/eck/rendered/manifest.yaml @@ -424,6 +424,7 @@ stringData: streams: - data_stream: dataset: kubernetes.container_logs + type: logs id: kubernetes-container-logs-${kubernetes.pod.name}-${kubernetes.container.id} parsers: - container: diff --git a/deploy/helm/elastic-agent/examples/kubernetes-default/rendered/manifest.yaml b/deploy/helm/elastic-agent/examples/kubernetes-default/rendered/manifest.yaml index b5254f495bb..16385331e34 100644 --- a/deploy/helm/elastic-agent/examples/kubernetes-default/rendered/manifest.yaml +++ b/deploy/helm/elastic-agent/examples/kubernetes-default/rendered/manifest.yaml @@ -433,6 +433,7 @@ stringData: streams: - data_stream: dataset: kubernetes.container_logs + type: logs id: kubernetes-container-logs-${kubernetes.pod.name}-${kubernetes.container.id} parsers: - container: @@ -1088,7 +1089,7 @@ spec: labels: name: agent-pernode-example annotations: - checksum/config: 1880bff2efcb86e1b6cc442b0804132a46df0bb93ceae4af8cd42b44964e53c6 + checksum/config: 53aa4ccc3e8557125fecf738e70722e2aaa1199ee79a823f684a9d4a296af7b0 spec: dnsPolicy: ClusterFirstWithHostNet diff --git a/deploy/helm/elastic-agent/examples/kubernetes-hints-autodiscover/rendered/manifest.yaml b/deploy/helm/elastic-agent/examples/kubernetes-hints-autodiscover/rendered/manifest.yaml index faf1dc7ab2a..8f7d94ec561 100644 --- a/deploy/helm/elastic-agent/examples/kubernetes-hints-autodiscover/rendered/manifest.yaml +++ b/deploy/helm/elastic-agent/examples/kubernetes-hints-autodiscover/rendered/manifest.yaml @@ -435,6 +435,7 @@ stringData: streams: - data_stream: dataset: kubernetes.container_logs + type: logs id: kubernetes-container-logs-${kubernetes.pod.name}-${kubernetes.container.id} parsers: - container: @@ -1090,7 +1091,7 @@ spec: labels: name: agent-pernode-example annotations: - checksum/config: f81171bdf0eed2d3bc8492050be0e6763188e3731e5cfc2b675f6ad8810c6fb7 + checksum/config: 21fb7e317577410096de8d8e0fb03b32ad2e406b549f75085ae6907d38678e46 spec: dnsPolicy: ClusterFirstWithHostNet diff --git a/deploy/helm/elastic-agent/examples/kubernetes-only-logs/rendered/manifest.yaml b/deploy/helm/elastic-agent/examples/kubernetes-only-logs/rendered/manifest.yaml index 874e6741ce3..c3a3966facf 100644 --- a/deploy/helm/elastic-agent/examples/kubernetes-only-logs/rendered/manifest.yaml +++ b/deploy/helm/elastic-agent/examples/kubernetes-only-logs/rendered/manifest.yaml @@ -56,6 +56,7 @@ stringData: streams: - data_stream: dataset: kubernetes.container_logs + type: logs id: kubernetes-container-logs-${kubernetes.pod.name}-${kubernetes.container.id} parsers: - container: @@ -226,7 +227,7 @@ spec: labels: name: agent-pernode-example annotations: - checksum/config: e4f00459bc975f20e15a69d830b8df6c1998190072d515e0c08cf5b51dd5bbc1 + checksum/config: 4de2216224a483ae1355aeec668894f764edc48bd3481d8fbc65f67eedc1b336 spec: dnsPolicy: ClusterFirstWithHostNet diff --git a/deploy/helm/elastic-agent/examples/multiple-integrations/rendered/manifest.yaml b/deploy/helm/elastic-agent/examples/multiple-integrations/rendered/manifest.yaml index f16673518f0..5f16fc5d56d 100644 --- a/deploy/helm/elastic-agent/examples/multiple-integrations/rendered/manifest.yaml +++ b/deploy/helm/elastic-agent/examples/multiple-integrations/rendered/manifest.yaml @@ -461,6 +461,7 @@ stringData: streams: - data_stream: dataset: kubernetes.container_logs + type: logs id: kubernetes-container-logs-${kubernetes.pod.name}-${kubernetes.container.id} parsers: - container: @@ -1116,7 +1117,7 @@ spec: labels: name: agent-pernode-example annotations: - checksum/config: f81171bdf0eed2d3bc8492050be0e6763188e3731e5cfc2b675f6ad8810c6fb7 + checksum/config: 21fb7e317577410096de8d8e0fb03b32ad2e406b549f75085ae6907d38678e46 spec: dnsPolicy: ClusterFirstWithHostNet diff --git a/deploy/helm/elastic-agent/templates/integrations/_kubernetes/_kubernetes_controller_manager.tpl b/deploy/helm/elastic-agent/templates/integrations/_kubernetes/_kubernetes_controller_manager.tpl index 17e790a1490..2010611a30b 100644 --- a/deploy/helm/elastic-agent/templates/integrations/_kubernetes/_kubernetes_controller_manager.tpl +++ b/deploy/helm/elastic-agent/templates/integrations/_kubernetes/_kubernetes_controller_manager.tpl @@ -37,5 +37,5 @@ hosts: period: "10s" bearer_token_file: "var/run/secrets/kubernetes.io/serviceaccount/token" ssl.verification_mode: "none" -condition: "${kubernetes.labels.component} == ''kube-controller-manager''" -{{- end -}} \ No newline at end of file +condition: "${kubernetes.labels.component} == 'kube-controller-manager'" +{{- end -}} diff --git a/deploy/helm/elastic-agent/templates/integrations/_kubernetes/_kubernetes_logs_containers.tpl b/deploy/helm/elastic-agent/templates/integrations/_kubernetes/_kubernetes_logs_containers.tpl index 6ea7da6cf73..55571edd729 100644 --- a/deploy/helm/elastic-agent/templates/integrations/_kubernetes/_kubernetes_logs_containers.tpl +++ b/deploy/helm/elastic-agent/templates/integrations/_kubernetes/_kubernetes_logs_containers.tpl @@ -20,6 +20,7 @@ Config input for container logs - id: kubernetes-container-logs-${kubernetes.pod.name}-${kubernetes.container.id} data_stream: dataset: kubernetes.container_logs + type: logs paths: - '/var/log/containers/*${kubernetes.container.id}.log' prospector.scanner.symlinks: {{ dig "vars" "symlinks" true .Values.kubernetes.containers.logs }} diff --git a/deploy/helm/elastic-agent/templates/integrations/_kubernetes/_kubernetes_scheduler.tpl b/deploy/helm/elastic-agent/templates/integrations/_kubernetes/_kubernetes_scheduler.tpl index e566c557ced..a5df70619a9 100644 --- a/deploy/helm/elastic-agent/templates/integrations/_kubernetes/_kubernetes_scheduler.tpl +++ b/deploy/helm/elastic-agent/templates/integrations/_kubernetes/_kubernetes_scheduler.tpl @@ -37,5 +37,5 @@ hosts: period: "10s" bearer_token_file: "/var/run/secrets/kubernetes.io/serviceaccount/token" ssl.verification_mode: "none" -condition: "${kubernetes.labels.component} == ''kube-scheduler''" -{{- end -}} \ No newline at end of file +condition: "${kubernetes.labels.component} == 'kube-scheduler'" +{{- end -}} diff --git a/deploy/helm/elastic-agent/values.schema.json b/deploy/helm/elastic-agent/values.schema.json index 35be51f73dd..f791012c4d4 100644 --- a/deploy/helm/elastic-agent/values.schema.json +++ b/deploy/helm/elastic-agent/values.schema.json @@ -186,7 +186,7 @@ "additionalParsersConfig": { "type": "array", "items": { - "type": "string" + "type": "object" } } },