From 23b7bd4644f0460020e3ba95104a869e91b19a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Thu, 24 Aug 2023 15:04:01 +0200 Subject: [PATCH] chore: add otel collector to dev lab (#8106) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- Makefile | 9 ++++++++- scripts/config/dev/otel-collector.yaml | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 scripts/config/dev/otel-collector.yaml diff --git a/Makefile b/Makefile index 367442f3ac..c134788dc1 100644 --- a/Makefile +++ b/Makefile @@ -934,6 +934,13 @@ dev-lab-tempo: $(HELM) ## Deploy tempo helm chart --values ./scripts/config/dev/tempo.yaml @kubectl apply -f ./scripts/config/dev/tempo-datasource.yaml +.PHONY: dev-lab-otel-collector +dev-lab-otel-collector: $(HELM) ## Deploy tempo helm chart + @echo Install otel-collector chart... >&2 + @$(HELM) upgrade --install opentelemetry-collector --namespace monitoring --create-namespace --wait \ + --repo https://open-telemetry.github.io/opentelemetry-helm-charts opentelemetry-collector \ + --values ./scripts/config/dev/otel-collector.yaml + .PHONY: dev-lab-metrics-server dev-lab-metrics-server: $(HELM) ## Deploy metrics-server helm chart @echo Install metrics-server chart... >&2 @@ -942,7 +949,7 @@ dev-lab-metrics-server: $(HELM) ## Deploy metrics-server helm chart --values ./scripts/config/dev/metrics-server.yaml .PHONY: dev-lab-all -dev-lab-all: dev-lab-ingress-ngingx dev-lab-metrics-server dev-lab-prometheus dev-lab-loki dev-lab-tempo ## Deploy all dev lab components +dev-lab-all: dev-lab-ingress-ngingx dev-lab-metrics-server dev-lab-prometheus dev-lab-loki dev-lab-tempo dev-lab-otel-collector ## Deploy all dev lab components .PHONY: dev-lab-policy-reporter dev-lab-policy-reporter: $(HELM) ## Deploy policy-reporter helm chart diff --git a/scripts/config/dev/otel-collector.yaml b/scripts/config/dev/otel-collector.yaml new file mode 100644 index 0000000000..18aaa5d770 --- /dev/null +++ b/scripts/config/dev/otel-collector.yaml @@ -0,0 +1,18 @@ +mode: daemonset + +tolerations: +- key: node-role.kubernetes.io/control-plane + operator: Exists + +config: + exporters: + otlp: + endpoint: tempo.monitoring:4317 + tls: + insecure: true + + service: + pipelines: + traces: + exporters: + - otlp