diff --git a/kubernetes/elastic-helm/configmap-elastic.yaml b/kubernetes/elastic-helm/configmap-elastic.yaml new file mode 100644 index 0000000000..54c0485cfa --- /dev/null +++ b/kubernetes/elastic-helm/configmap-elastic.yaml @@ -0,0 +1,108 @@ +--- +# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/configmap-agent.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: elastic-otelcol-agent + namespace: default + labels: + app.kubernetes.io/name: otelcol + +data: + relay: | + connectors: + spanmetrics: {} + exporters: + debug: {} + otlp/elastic: + endpoint: ${ELASTIC_APM_ENDPOINT} + compression: none + headers: + Authorization: ApiKey ${ELASTIC_APM_SECRET_TOKEN} + extensions: + processors: + batch: {} + k8sattributes: + extract: + metadata: + - k8s.namespace.name + - k8s.deployment.name + - k8s.statefulset.name + - k8s.daemonset.name + - k8s.cronjob.name + - k8s.job.name + - k8s.node.name + - k8s.pod.name + - k8s.pod.uid + - k8s.pod.start_time + filter: + node_from_env_var: K8S_NODE_NAME + passthrough: false + pod_association: + - sources: + - from: resource_attribute + name: k8s.pod.ip + - sources: + - from: resource_attribute + name: k8s.pod.uid + - sources: + - from: connection + resource: + attributes: + - action: insert + from_attribute: k8s.pod.uid + key: service.instance.id + receivers: + httpcheck/frontendproxy: + targets: + - endpoint: http://example-frontendproxy:8080 + otlp: + protocols: + grpc: + endpoint: ${env:MY_POD_IP}:4317 + http: + cors: + allowed_origins: + - http://* + - https://* + endpoint: ${env:MY_POD_IP}:4318 + service: + extensions: + pipelines: + logs: + exporters: + - debug + - otlp/elastic + processors: + - k8sattributes + - resource + - batch + receivers: + - otlp + metrics: + exporters: + - otlp/elastic + - debug + processors: + - k8sattributes + - resource + - batch + receivers: + - httpcheck/frontendproxy + - otlp + - spanmetrics + traces: + exporters: + - otlp/elastic + - debug + - spanmetrics + processors: + - k8sattributes + - resource + - batch + receivers: + - otlp + telemetry: + metrics: + address: ${env:MY_POD_IP}:8888 + diff --git a/kubernetes/elastic-helm/values.yaml b/kubernetes/elastic-helm/values.yaml index 616bbda572..303370464e 100644 --- a/kubernetes/elastic-helm/values.yaml +++ b/kubernetes/elastic-helm/values.yaml @@ -24,38 +24,23 @@ opentelemetry-collector: secretKeyRef: name: elastic-secret key: elastic_apm_secret_token - config: - exporters: - otlp/elastic: - endpoint: ${ELASTIC_APM_ENDPOINT} - compression: none - headers: - Authorization: Bearer ${ELASTIC_APM_SECRET_TOKEN} - receivers: - otlp: - protocols: - grpc: - endpoint: ${MY_POD_IP}:4317 - http: - cors: - allowed_origins: - - http://* - - https://* - endpoint: ${MY_POD_IP}:4318 - service: - pipelines: - traces: - receivers: [otlp] - processors: [batch] - exporters: [otlp/elastic] - metrics: - receivers: [otlp] - processors: [batch] - exporters: [otlp/elastic] - logs: - receivers: [otlp] - processors: [batch] - exporters: [otlp/elastic] + + configMap: + create: false + existingName: elastic-otelcol-agent + + livenessProbe: + httpGet: + port: 8888 + path: metrics + readinessProbe: + httpGet: + port: 8888 + path: metrics + +opensearch: + enabled: false + grafana: enabled: false