From e1ade33838fb45acb7f4c9fe4c83b4d4c0d9aca3 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Thu, 29 Aug 2024 14:47:45 +0200 Subject: [PATCH] chore: bump elastic-agent to 8.16.0-SNAPSHOT (#61) * chore: bump k8s deployment to elasti-agent 8.16.0-SNAPSHOT * chore: bump elastic-agent docker version --- .env.override | 3 ++- docker-compose.minimal.yml | 4 ++-- docker-compose.yml | 4 ++-- kubernetes/elastic-helm/configmap-daemonset.yaml | 4 ++++ .../elastic-helm/configmap-deployment.yaml | 5 ++++- kubernetes/elastic-helm/daemonset.yaml | 15 +++------------ kubernetes/elastic-helm/deployment.yaml | 16 +++------------- 7 files changed, 20 insertions(+), 31 deletions(-) diff --git a/.env.override b/.env.override index d6c9713d51..23837520d1 100644 --- a/.env.override +++ b/.env.override @@ -15,6 +15,7 @@ KAFKA_SERVICE_DOCKERFILE=./src/kafka/Dockerfile.elastic # ********************* # Elastic Collector # ********************* -COLLECTOR_CONTRIB_IMAGE=docker.elastic.co/beats/elastic-agent:8.15.0-SNAPSHOT +COLLECTOR_CONTRIB_IMAGE=docker.elastic.co/beats/elastic-agent:8.16.0-SNAPSHOT OTEL_COLLECTOR_CONFIG=./src/otelcollector/otelcol-elastic-config.yaml OTEL_COLLECTOR_CONFIG_EXTRAS=./src/otelcollector/otelcol-elastic-config-extras.yaml +ELASTIC_AGENT_OTEL=true diff --git a/docker-compose.minimal.yml b/docker-compose.minimal.yml index ac84270a06..5b463be07c 100644 --- a/docker-compose.minimal.yml +++ b/docker-compose.minimal.yml @@ -583,8 +583,7 @@ services: limits: memory: 200M restart: unless-stopped - command: ["otel", "--config", "/etc/otelcol-config.yml", "--config", "/etc/otelcol-config-extras.yml" ] - entrypoint: [ /usr/share/elastic-agent/elastic-agent ] + command: ["--config", "/etc/otelcol-config.yml", "--config", "/etc/otelcol-config-extras.yml" ] user: 0:0 volumes: - ${HOST_FILESYSTEM}:/hostfs:ro @@ -603,6 +602,7 @@ services: - OTEL_COLLECTOR_HOST - OTEL_COLLECTOR_PORT_GRPC - OTEL_COLLECTOR_PORT_HTTP + - ELASTIC_AGENT_OTEL # Prometheus prometheus: diff --git a/docker-compose.yml b/docker-compose.yml index 4605ee2dab..98789cf030 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -693,8 +693,7 @@ services: limits: memory: 200M restart: unless-stopped - command: ["otel", "--config", "/etc/otelcol-config.yml", "--config", "/etc/otelcol-config-extras.yml" ] - entrypoint: [ /usr/share/elastic-agent/elastic-agent ] + command: ["--config", "/etc/otelcol-config.yml", "--config", "/etc/otelcol-config-extras.yml" ] user: 0:0 volumes: - ${HOST_FILESYSTEM}:/hostfs:ro @@ -713,6 +712,7 @@ services: - OTEL_COLLECTOR_HOST - OTEL_COLLECTOR_PORT_GRPC - OTEL_COLLECTOR_PORT_HTTP + - ELASTIC_AGENT_OTEL # Prometheus prometheus: diff --git a/kubernetes/elastic-helm/configmap-daemonset.yaml b/kubernetes/elastic-helm/configmap-daemonset.yaml index ab55437fa1..e1bd3731ae 100644 --- a/kubernetes/elastic-helm/configmap-daemonset.yaml +++ b/kubernetes/elastic-helm/configmap-daemonset.yaml @@ -9,6 +9,9 @@ metadata: data: relay: | + extensions: + health_check: + endpoint: ${env:MY_POD_IP}:13133 exporters: debug: elasticsearch: @@ -253,6 +256,7 @@ data: extra_metadata_labels: - container.id service: + extensions: [health_check] pipelines: logs: receivers: [filelog] diff --git a/kubernetes/elastic-helm/configmap-deployment.yaml b/kubernetes/elastic-helm/configmap-deployment.yaml index 742012f16c..862007ec29 100644 --- a/kubernetes/elastic-helm/configmap-deployment.yaml +++ b/kubernetes/elastic-helm/configmap-deployment.yaml @@ -9,6 +9,9 @@ metadata: data: relay: | + extensions: + health_check: + endpoint: ${env:MY_POD_IP}:13133 connectors: spanmetrics: {} exporters: @@ -18,7 +21,6 @@ data: compression: none headers: Authorization: Bearer ${env:ELASTIC_APM_SECRET_TOKEN} - extensions: processors: batch: {} resource: @@ -42,6 +44,7 @@ data: endpoint: ${env:MY_POD_IP}:4318 service: extensions: + - health_check pipelines: logs: exporters: diff --git a/kubernetes/elastic-helm/daemonset.yaml b/kubernetes/elastic-helm/daemonset.yaml index 538c22b053..91a3d6fcb9 100644 --- a/kubernetes/elastic-helm/daemonset.yaml +++ b/kubernetes/elastic-helm/daemonset.yaml @@ -11,24 +11,15 @@ presets: image: repository: docker.elastic.co/beats/elastic-agent - tag: 8.15.0-SNAPSHOT -command: - name: "/usr/share/elastic-agent/elastic-agent" - extraArgs: ["otel"] -livenessProbe: - httpGet: - port: 8888 - path: metrics -readinessProbe: - httpGet: - port: 8888 - path: metrics + tag: 8.16.0-SNAPSHOT securityContext: runAsUser: 0 runAsGroup: 0 extraEnvs: + - name: ELASTIC_AGENT_OTEL + value: "true" - name: ELASTIC_ENDPOINT valueFrom: secretKeyRef: diff --git a/kubernetes/elastic-helm/deployment.yaml b/kubernetes/elastic-helm/deployment.yaml index 33a9871c5a..9d9e3797e6 100644 --- a/kubernetes/elastic-helm/deployment.yaml +++ b/kubernetes/elastic-helm/deployment.yaml @@ -35,10 +35,7 @@ default: opentelemetry-collector: image: repository: docker.elastic.co/beats/elastic-agent - tag: 8.15.0-SNAPSHOT - command: - name: "/usr/share/elastic-agent/elastic-agent" - extraArgs: ["otel"] + tag: 8.16.0-SNAPSHOT mode: "deployment" presets: kubernetesAttributes: @@ -49,6 +46,8 @@ opentelemetry-collector: enabled: true extraEnvs: + - name: ELASTIC_AGENT_OTEL + value: "true" - name: ELASTIC_APM_ENDPOINT valueFrom: secretKeyRef: @@ -64,15 +63,6 @@ opentelemetry-collector: create: false existingName: elastic-otelcol-agent - livenessProbe: - httpGet: - port: 8888 - path: metrics - readinessProbe: - httpGet: - port: 8888 - path: metrics - opensearch: enabled: false