From 7d3f528c03ceb638b29b13b6680d472216d05b1e Mon Sep 17 00:00:00 2001 From: Ben Kilimnik <47846691+benkilimnik@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:23:37 -0700 Subject: [PATCH] [nr-ebpf-agent] Add helm chart field for OTLP endpoint (#1485) Enables configuring where data gathered by the eBPF agent will be sent. #### Is this a new chart #### What this PR does / why we need it: #### Which issue this PR fixes *(optional, in `fixes #(, fixes #, ...)` format, will close that issue when PR gets merged)* - fixes # #### Special notes for your reviewer: #### Checklist [Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.] - [X] Chart Version bumped - [X] Variables are documented in the README.md - [X] Title of the PR starts with chart name (e.g. `[mychartname]`) --------- Signed-off-by: Benjamin Kilimnik Co-authored-by: Kartik Pattaswamy <62078498+kpattaswamy@users.noreply.github.com> --- charts/nr-ebpf-agent/Chart.yaml | 2 +- charts/nr-ebpf-agent/README.md | 5 +++-- charts/nr-ebpf-agent/templates/otel-collector-daemonset.yaml | 4 +++- charts/nr-ebpf-agent/values.yaml | 4 +++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/charts/nr-ebpf-agent/Chart.yaml b/charts/nr-ebpf-agent/Chart.yaml index d8cf96a57..15a2c429b 100644 --- a/charts/nr-ebpf-agent/Chart.yaml +++ b/charts/nr-ebpf-agent/Chart.yaml @@ -13,7 +13,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.4 +version: 0.1.5 dependencies: - name: common-library version: 1.1.1 diff --git a/charts/nr-ebpf-agent/README.md b/charts/nr-ebpf-agent/README.md index f036eda89..581e0c644 100644 --- a/charts/nr-ebpf-agent/README.md +++ b/charts/nr-ebpf-agent/README.md @@ -91,7 +91,7 @@ Options that can be defined globally include `affinity`, `nodeSelector`, `tolera | labels | object | `{}` | Additional labels for chart objects | | licenseKey | string | `""` | The license key to use. Can be configured with `global.licenseKey` | | nodeSelector | object | `{}` | Sets all pods' node selector. Can be configured also with `global.nodeSelector` | -| nrStaging | bool | `false` | Endpoint to export data to. If enabled, sends data to the staging backend. Requires a valid staging license key. Can also be configured with global.nrStaging | +| nrStaging | bool | `false` | Endpoint to export data to via the otel collector. NR prod (otlp.nr-data.net:4317) by default. Staging (staging-otlp.nr-data.net:4317) otherwise. Requires a valid staging license key. Can also be configured with global.nrStaging. | | otelCollector.collector.serviceAccount.annotations | object | `{}` | Annotations for the OTel collector service account. | | otelCollector.image.pullPolicy | string | `"IfNotPresent"` | The pull policy is defaulted to IfNotPresent, which skips pulling an image if it already exists. If pullPolicy is defined without a specific value, it is set to Always. | | otelCollector.image.repository | string | `"us-west1-docker.pkg.dev/pl-dev-infra/nr-ebpf-agent-lp/nr-ebpf-otel-collector"` | OpenTelemetry collector image to be deployed. | @@ -102,6 +102,7 @@ Options that can be defined globally include `affinity`, `nodeSelector`, `tolera | otelCollector.resources.requests.memory | string | `"200Mi"` | Min memory allocated to the container. | | podLabels | object | `{}` | Additional labels for chart pods | | protocols | object | `{"amqp":true,"cass":true,"dns":true,"http":true,"kafka":true,"mongodb":true,"mysql":true,"pgsql":true,"redis":true}` | The protocols (and data export scripts) to enable for tracing in the socket_tracer. | +| proxy | string | `""` | Configures the agent to send all data through the proxy specified via the otel collector. | | stirlingSources | string | `"socket_tracer,tcp_stats"` | The source connectors (and data export scripts) to enable. Note that socket_tracer tracks http, mysql, redis, mongodb, amqp, cassandra, dns, and postgresql while tcp_stats tracks TCP metrics. | | tableStoreDataLimitMB | string | `"250"` | The primary lever to control RAM use of the eBPF agent. Specified in MiB. | | tolerations | list | `[]` | Sets all pods' tolerations to node taints. Can be configured also with `global.tolerations` | @@ -116,4 +117,4 @@ If the `nr-ebpf-client` or `nr-ebpf-agent` container logs indicate that the scri * ramkrishankumarN * kpattaswamy -* benkilimnik +* benkilimnik \ No newline at end of file diff --git a/charts/nr-ebpf-agent/templates/otel-collector-daemonset.yaml b/charts/nr-ebpf-agent/templates/otel-collector-daemonset.yaml index 43c4ddd4e..97a656849 100644 --- a/charts/nr-ebpf-agent/templates/otel-collector-daemonset.yaml +++ b/charts/nr-ebpf-agent/templates/otel-collector-daemonset.yaml @@ -41,7 +41,9 @@ spec: key: NR_LICENSE_KEY name: nr-ebpf-agent-secrets - name: NR_OTLP_ENDPOINT - {{- if .Values.nrStaging }} + {{- if .Values.proxy }} + value: "{{- .Values.proxy }}" + {{- else if .Values.nrStaging }} value: "staging-otlp.nr-data.net:4317" {{- else }} value: "otlp.nr-data.net:4317" diff --git a/charts/nr-ebpf-agent/values.yaml b/charts/nr-ebpf-agent/values.yaml index 509fc8db2..88e50c22b 100644 --- a/charts/nr-ebpf-agent/values.yaml +++ b/charts/nr-ebpf-agent/values.yaml @@ -2,8 +2,10 @@ cluster: "" # -- The license key to use. Can be configured with `global.licenseKey` licenseKey: "" -# -- Endpoint to export data to. If enabled, sends data to the staging backend. Requires a valid staging license key. Can also be configured with global.nrStaging +# -- Endpoint to export data to via the otel collector. NR prod (otlp.nr-data.net:4317) by default. Staging (staging-otlp.nr-data.net:4317) otherwise. Requires a valid staging license key. Can also be configured with global.nrStaging. nrStaging: false +# -- Configures the agent to send all data through the proxy specified via the otel collector. +proxy: "" # -- The primary lever to control RAM use of the eBPF agent. Specified in MiB. tableStoreDataLimitMB: "250" # -- The source connectors (and data export scripts) to enable.