From 5c973052e2d34bce21c673bb34dade55a2ed591b Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Tue, 23 Jul 2024 11:27:36 +0200 Subject: [PATCH] Revert "remove unused daemonset.yaml file" This reverts commit 8de40036a024fb280e8d8201329a0ed46f997acb. --- kubernetes/elastic-helm/daemonset.yaml | 56 ++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 kubernetes/elastic-helm/daemonset.yaml diff --git a/kubernetes/elastic-helm/daemonset.yaml b/kubernetes/elastic-helm/daemonset.yaml new file mode 100644 index 0000000000..3bd510af13 --- /dev/null +++ b/kubernetes/elastic-helm/daemonset.yaml @@ -0,0 +1,56 @@ +mode: daemonset +presets: + logsCollection: + enabled: true + hostMetrics: + enabled: true + kubeletMetrics: + enabled: true + kubernetesAttributes: + enabled: true + +extraEnvs: + - name: ELASTIC_APM_ENDPOINT + valueFrom: + secretKeyRef: + name: elastic-secret + key: elastic_apm_endpoint + - name: ELASTIC_APM_SECRET_TOKEN + valueFrom: + secretKeyRef: + name: elastic-secret + key: elastic_apm_secret_token + +config: + extensions: + k8s_observer: + auth_type: serviceAccount + node: ${env:K8S_NODE_NAME} + observe_pods: true + exporters: + otlp/elastic: + endpoint: ${ELASTIC_APM_ENDPOINT} + compression: none + headers: + Authorization: Bearer ${ELASTIC_APM_SECRET_TOKEN} + receivers: + receiver_creator: + watch_observers: [ k8s_observer ] + receivers: + redis: + rule: type == "port" && pod.name matches "redis" + config: + collection_interval: 2s + service: + extensions: [health_check, k8s_observer] + pipelines: + traces: + processors: [batch] + exporters: [otlp/elastic] + metrics: + receivers: [ receiver_creator] + processors: [batch] + exporters: [otlp/elastic] + logs: + processors: [batch] + exporters: [otlp/elastic] \ No newline at end of file