From cec2dce78d0736946d7b8e34723a0ae2809e3ba6 Mon Sep 17 00:00:00 2001 From: Hartigan Date: Sat, 19 Oct 2024 15:03:30 +0200 Subject: [PATCH] Remove Grafana Alloy for Datadog tracing e2e test Signed-off-by: Hartigan --- charts/gateway-addons-helm/Chart.lock | 6 +- charts/gateway-addons-helm/Chart.yaml | 2 +- charts/gateway-addons-helm/values.yaml | 8 ++- test/e2e/testdata/tracing-datadog.yaml | 80 ++------------------------ 4 files changed, 16 insertions(+), 80 deletions(-) diff --git a/charts/gateway-addons-helm/Chart.lock b/charts/gateway-addons-helm/Chart.lock index 4b6f92ac77c..228a952fdc1 100644 --- a/charts/gateway-addons-helm/Chart.lock +++ b/charts/gateway-addons-helm/Chart.lock @@ -16,6 +16,6 @@ dependencies: version: 1.3.1 - name: opentelemetry-collector repository: https://open-telemetry.github.io/opentelemetry-helm-charts - version: 0.73.1 -digest: sha256:4c16df8d7efc27aff566fa5dfd2eba6527adbf3fc8e94e7e3ccfc0cee7836f1c -generated: "2024-06-20T11:46:59.148579+08:00" + version: 0.108.0 +digest: sha256:ea6663bb1358123b96b69d2c5b0b8c20650a43dc39b24c482f0560201fd2cc3a +generated: "2024-10-19T12:59:47.251089661+02:00" diff --git a/charts/gateway-addons-helm/Chart.yaml b/charts/gateway-addons-helm/Chart.yaml index 84ac6228f62..2571ccec51e 100644 --- a/charts/gateway-addons-helm/Chart.yaml +++ b/charts/gateway-addons-helm/Chart.yaml @@ -47,5 +47,5 @@ dependencies: condition: tempo.enabled - name: opentelemetry-collector repository: https://open-telemetry.github.io/opentelemetry-helm-charts - version: 0.73.1 + version: 0.108.0 condition: opentelemetry-collector.enabled diff --git a/charts/gateway-addons-helm/values.yaml b/charts/gateway-addons-helm/values.yaml index 55a02b68255..d3fb043ddd4 100644 --- a/charts/gateway-addons-helm/values.yaml +++ b/charts/gateway-addons-helm/values.yaml @@ -181,11 +181,13 @@ opentelemetry-collector: enabled: false fullnameOverride: otel-collector mode: deployment + image: + repository: "otel/opentelemetry-collector-contrib" config: exporters: prometheus: endpoint: 0.0.0.0:19001 - logging: + debug: verbosity: detailed loki: endpoint: "http://loki.monitoring.svc:3100/loki/api/v1/push" @@ -207,6 +209,8 @@ opentelemetry-collector: # Loki will convert this to k8s_pod_name label. value: k8s.pod.name, k8s.namespace.name receivers: + datadog: + endpoint: ${env:MY_POD_IP}:8126 zipkin: endpoint: ${env:MY_POD_IP}:9411 otlp: @@ -223,6 +227,7 @@ opentelemetry-collector: exporters: - prometheus receivers: + - datadog - otlp logs: exporters: @@ -235,5 +240,6 @@ opentelemetry-collector: exporters: - otlp receivers: + - datadog - otlp - zipkin diff --git a/test/e2e/testdata/tracing-datadog.yaml b/test/e2e/testdata/tracing-datadog.yaml index 6dedeaa31bd..e4f54a7eebe 100644 --- a/test/e2e/testdata/tracing-datadog.yaml +++ b/test/e2e/testdata/tracing-datadog.yaml @@ -19,85 +19,15 @@ spec: name: datadog-tracing --- apiVersion: v1 -kind: ConfigMap -metadata: - name: alloy-config - namespace: monitoring -data: - config.alloy: | - logging { - level = "debug" - format = "logfmt" - } - - otelcol.processor.batch "default" { - output { - metrics = [otelcol.exporter.otlp.default.input] - traces = [otelcol.exporter.otlp.default.input] - } - } - - otelcol.processor.deltatocumulative "default" { - max_stale = "5m" - max_streams = 100 - output { - metrics = [otelcol.processor.batch.default.input] - } - } - - otelcol.exporter.otlp "default" { - client { - endpoint = "otel-collector:4317" - tls { - insecure = true - } - } - } - - otelcol.receiver.datadog "default" { - endpoint = "0.0.0.0:8126" - output { - metrics = [otelcol.processor.deltatocumulative.default.input] - traces = [otelcol.processor.batch.default.input] - } - } ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: alloy-deployment - namespace: monitoring -spec: - replicas: 1 - selector: - matchLabels: - app: alloy - template: - metadata: - labels: - app: alloy - spec: - containers: - - name: alloy - image: grafana/alloy:v1.4.2 - volumeMounts: - - name: config-volume - mountPath: /etc/alloy/config.alloy - subPath: config.alloy - command: ["alloy", "run", "--stability.level=experimental", "--server.http.listen-addr=0.0.0.0:12345", "--storage.path=/var/lib/alloy/data", "/etc/alloy/config.alloy"] - volumes: - - name: config-volume - configMap: - name: alloy-config ---- -apiVersion: v1 kind: Service metadata: - name: alloy-collector + name: datadog-agent namespace: monitoring spec: selector: - app: alloy + app.kubernetes.io/instance: eg-addons + app.kubernetes.io/name: opentelemetry-collector + component: standalone-collector ports: - protocol: TCP port: 8126 @@ -117,7 +47,7 @@ spec: provider: type: Datadog backendRefs: - - name: alloy-collector + - name: datadog-agent namespace: monitoring port: 8126 customTags: