-
Notifications
You must be signed in to change notification settings - Fork 82
Otel collector integration #519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| dependencies: | ||
| - name: opentelemetry-collector | ||
| repository: https://open-telemetry.github.io/opentelemetry-helm-charts | ||
| version: 0.115.0 | ||
| digest: sha256:64b58dabaaf8b4d9cac1a83f9e80ac632019843b2c42159051ecc5cb9700d8bb | ||
| generated: "2026-01-14T17:46:09.646928103+01:00" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| {{- $configmapOtel := include "netdata.netdataOpentelemetry.configs.configmap" . }} | ||
| {{- if and .Values.netdataOpentelemetry.enabled $configmapOtel }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: netdata-conf-otel | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app: {{ template "netdata.name" . }} | ||
| chart: {{ template "netdata.chart" . }} | ||
| release: {{ .Release.Name }} | ||
| heritage: {{ .Release.Service }} | ||
| data: | ||
| {{ $configmapOtel | indent 2 }} | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,177 @@ | ||||||||||||
| {{- if .Values.netdataOpentelemetry.enabled }} | ||||||||||||
| --- | ||||||||||||
| apiVersion: apps/v1 | ||||||||||||
| kind: Deployment | ||||||||||||
| metadata: | ||||||||||||
| name: {{ template "netdata.name" . }}-otel | ||||||||||||
| namespace: {{ .Release.Namespace }} | ||||||||||||
| labels: | ||||||||||||
| app: {{ template "netdata.name" . }} | ||||||||||||
| chart: {{ template "netdata.chart" . }} | ||||||||||||
| release: {{ .Release.Name }} | ||||||||||||
| heritage: {{ .Release.Service }} | ||||||||||||
| role: otel | ||||||||||||
| spec: | ||||||||||||
| strategy: | ||||||||||||
| type: Recreate | ||||||||||||
| selector: | ||||||||||||
| matchLabels: | ||||||||||||
| app: {{ template "netdata.name" . }} | ||||||||||||
| release: {{ .Release.Name }} | ||||||||||||
| role: otel | ||||||||||||
| template: | ||||||||||||
| metadata: | ||||||||||||
| annotations: | ||||||||||||
| {{- if .Values.netdataOpentelemetry.podAnnotationAppArmor.enabled }} | ||||||||||||
| container.apparmor.security.beta.kubernetes.io/{{ .Chart.Name }}: unconfined | ||||||||||||
| {{- end }} | ||||||||||||
| checksum/config: {{ print (include (print $.Template.BasePath "/netdata-otel/configmap.yaml") .) (include (print $.Template.BasePath "/netdata-otel/secrets.yaml") .) | sha256sum }} | ||||||||||||
| {{- with .Values.netdataOpentelemetry.podAnnotations }} | ||||||||||||
| {{ toYaml . | trim | indent 8 }} | ||||||||||||
| {{- end }} | ||||||||||||
| labels: | ||||||||||||
| app: {{ template "netdata.name" . }} | ||||||||||||
| release: {{ .Release.Name }} | ||||||||||||
| role: otel | ||||||||||||
| {{- with .Values.netdataOpentelemetry.podLabels }} | ||||||||||||
| {{ toYaml . | trim | indent 8 }} | ||||||||||||
| {{- end }} | ||||||||||||
| spec: | ||||||||||||
| securityContext: | ||||||||||||
| fsGroup: 201 | ||||||||||||
|
||||||||||||
| fsGroup: 201 | |
| fsGroup: 201 | |
| runAsUser: 201 | |
| runAsGroup: 201 |
Copilot
AI
Jan 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The container listens on two ports: port 19999 for the Netdata web interface (configured via NETDATA_LISTENER_PORT) and port 4317 for the OTEL endpoint (configured in otel.yaml). However, only the Netdata web interface port is declared in the ports section. For clarity and completeness, consider also declaring the OTEL port (4317) in the container ports section, even though it's not strictly required. This helps with documentation and service discovery.
| protocol: TCP | |
| protocol: TCP | |
| - name: otel | |
| containerPort: 4317 | |
| protocol: TCP |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| {{- if and .Values.netdataOpentelemetry.enabled .Values.netdataOpentelemetry.persistence.enabled }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: PersistentVolumeClaim | ||
| metadata: | ||
| name: {{ template "netdata.name" . }}-otel-varlog | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app: {{ template "netdata.name" . }} | ||
| chart: {{ template "netdata.chart" . }} | ||
| release: {{ .Release.Name }} | ||
| heritage: {{ .Release.Service }} | ||
| role: otel | ||
| spec: | ||
| accessModes: [ "ReadWriteOnce" ] | ||
| {{- if (ne "-" .Values.netdataOpentelemetry.persistence.storageclass) }} | ||
| storageClassName: "{{ .Values.netdataOpentelemetry.persistence.storageclass }}" | ||
| {{- end }} | ||
| resources: | ||
| requests: | ||
| storage: {{ .Values.netdataOpentelemetry.persistence.volumesize }} | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| {{- $secretOtel := include "netdata.netdataOpentelemetry.configs.secret" . }} | ||
| {{- if and .Values.netdataOpentelemetry.enabled $secretOtel }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: netdata-conf-otel | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app: {{ template "netdata.name" . }} | ||
| chart: {{ template "netdata.chart" . }} | ||
| release: {{ .Release.Name }} | ||
| heritage: {{ .Release.Service }} | ||
| type: Opaque | ||
| data: | ||
| {{ $secretOtel | indent 2 }} | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| {{- if .Values.netdataOpentelemetry.enabled }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ template "netdata.name" . }}-otel | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app: {{ template "netdata.name" . }} | ||
| chart: {{ template "netdata.chart" . }} | ||
| release: {{ .Release.Name }} | ||
| heritage: {{ .Release.Service }} | ||
| role: otel | ||
| annotations: | ||
| {{- with .Values.netdataOpentelemetry.service.annotations }} | ||
| {{ toYaml . | trim | indent 4 }} | ||
| {{- end }} | ||
| spec: | ||
| type: {{ .Values.netdataOpentelemetry.service.type }} | ||
| {{- if and (eq .Values.netdataOpentelemetry.service.type "LoadBalancer") .Values.netdataOpentelemetry.service.loadBalancerIP }} | ||
| loadBalancerIP: {{ .Values.netdataOpentelemetry.service.loadBalancerIP }} | ||
| {{- end }} | ||
| {{- if and (eq .Values.netdataOpentelemetry.service.type "LoadBalancer") .Values.netdataOpentelemetry.service.loadBalancerSourceRanges }} | ||
| loadBalancerSourceRanges: | ||
| {{- with .Values.netdataOpentelemetry.service.loadBalancerSourceRanges }} | ||
| {{ toYaml . | trim | indent 4 }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- if and (eq .Values.netdataOpentelemetry.service.type "LoadBalancer") .Values.netdataOpentelemetry.service.externalTrafficPolicy }} | ||
| externalTrafficPolicy: {{ .Values.netdataOpentelemetry.service.externalTrafficPolicy }} | ||
| {{- if and (eq .Values.netdataOpentelemetry.service.externalTrafficPolicy "Local") .Values.netdataOpentelemetry.service.healthCheckNodePort }} | ||
| healthCheckNodePort: {{ .Values.netdataOpentelemetry.service.healthCheckNodePort }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- if and (eq .Values.netdataOpentelemetry.service.type "ClusterIP") .Values.netdataOpentelemetry.service.clusterIP }} | ||
| clusterIP: {{ .Values.netdataOpentelemetry.service.clusterIP }} | ||
| {{- end }} | ||
| ports: | ||
| - port: {{ .Values.netdataOpentelemetry.service.port }} | ||
| targetPort: {{ .Values.netdataOpentelemetry.service.port }} | ||
| protocol: TCP | ||
| name: otel | ||
| selector: | ||
| app: {{ template "netdata.name" . }} | ||
| release: {{ .Release.Name }} | ||
| role: otel | ||
| {{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a very old version?