-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5ea34e9
adding otel integration
fd730a0
fixing naming, configuration, mounts for netdata-otel feat
1bb92a1
changes to docs, checks, otel values
459f125
fixing deployment template for otel
871a491
Removing debug log level from otel, testing doc checks
2948c33
Updating documentation
a8933a7
values table in non-html
7463980
removing long desc from some values
6451bc0
changes to workflows - release and checks
daf1396
adding security context
f7bb9e2
removing helm install step from release (not needed)
66fd83b
updates to docs
77344a0
streamlining port change for netdataopentelemetry
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.144.0 | ||
| digest: sha256:4386d6f39c3aacd5eeb07d40dcc23404d33001d1c6a90e8843d5fa9bd1b34f24 | ||
| generated: "2026-01-29T13:37:43.621411516+01:00" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,183 @@ | ||
| {{- 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: {{ .Values.netdataOpentelemetry.securityContext.fsGroup }} | ||
ilyam8 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| serviceAccountName: {{ .Values.serviceAccount.name }} | ||
| restartPolicy: Always | ||
| {{- if .Values.netdataOpentelemetry.priorityClassName }} | ||
| priorityClassName: "{{ .Values.netdataOpentelemetry.priorityClassName }}" | ||
| {{- end }} | ||
| {{- if .Values.imagePullSecrets }} | ||
| imagePullSecrets: | ||
| {{ toYaml .Values.imagePullSecrets | indent 8 }} | ||
| {{- end }} | ||
| initContainers: | ||
| {{- if .Values.sysctlInitContainer.enabled }} | ||
| - name: init-sysctl | ||
| image: "{{ .Values.initContainersImage.repository }}:{{ .Values.initContainersImage.tag }}" | ||
| imagePullPolicy: {{ .Values.initContainersImage.pullPolicy }} | ||
| command: | ||
| {{ toYaml .Values.sysctlInitContainer.command | indent 12 }} | ||
| securityContext: | ||
| runAsNonRoot: false | ||
| privileged: true | ||
| runAsUser: 0 | ||
| resources: | ||
| {{ toYaml .Values.sysctlInitContainer.resources | indent 12 }} | ||
| {{- end }} | ||
| containers: | ||
M4itee marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: {{ .Chart.Name }} | ||
| image: "{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}" | ||
| imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
| env: | ||
| - name: MY_POD_NAME | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.name | ||
| - name: MY_POD_NAMESPACE | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.namespace | ||
| {{- if .Values.netdataOpentelemetry.claiming.enabled }} | ||
| - name: NETDATA_CLAIM_URL | ||
| value: "{{ .Values.netdataOpentelemetry.claiming.url }}" | ||
| {{- if .Values.netdataOpentelemetry.claiming.token }} | ||
| - name: NETDATA_CLAIM_TOKEN | ||
| value: "{{ .Values.netdataOpentelemetry.claiming.token }}" | ||
| {{- end }} | ||
| {{- if .Values.netdataOpentelemetry.claiming.rooms }} | ||
| - name: NETDATA_CLAIM_ROOMS | ||
| value: "{{ .Values.netdataOpentelemetry.claiming.rooms }}" | ||
| {{- end }} | ||
| {{- end }} | ||
| - name: NETDATA_LISTENER_PORT | ||
| value: '{{ tpl (.Values.netdataOpentelemetry.port | toString) . }}' | ||
| {{- range $key, $value := .Values.netdataOpentelemetry.env }} | ||
| - name: {{ $key }} | ||
| value: {{ $value | quote }} | ||
| {{- end }} | ||
| {{- with .Values.netdataOpentelemetry.envFrom }} | ||
| envFrom: | ||
| {{ toYaml . | indent 12 }} | ||
| {{- end }} | ||
| ports: | ||
| - name: http | ||
| containerPort: {{ tpl (.Values.netdataOpentelemetry.port | toString) . }} | ||
| protocol: TCP | ||
M4itee marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: otel | ||
| containerPort: {{ tpl (.Values.netdataOpentelemetry.service.port | toString) . }} | ||
| protocol: TCP | ||
| livenessProbe: | ||
| exec: | ||
| command: | ||
| - /usr/sbin/netdatacli | ||
| - ping | ||
| initialDelaySeconds: {{ .Values.netdataOpentelemetry.livenessProbe.initialDelaySeconds }} | ||
| failureThreshold: {{ .Values.netdataOpentelemetry.livenessProbe.failureThreshold }} | ||
| periodSeconds: {{ .Values.netdataOpentelemetry.livenessProbe.periodSeconds }} | ||
| successThreshold: {{ .Values.netdataOpentelemetry.livenessProbe.successThreshold }} | ||
| timeoutSeconds: {{ .Values.netdataOpentelemetry.livenessProbe.timeoutSeconds }} | ||
| readinessProbe: | ||
| exec: | ||
| command: | ||
| - /usr/sbin/netdatacli | ||
| - ping | ||
| initialDelaySeconds: {{ .Values.netdataOpentelemetry.readinessProbe.initialDelaySeconds }} | ||
| failureThreshold: {{ .Values.netdataOpentelemetry.readinessProbe.failureThreshold }} | ||
| periodSeconds: {{ .Values.netdataOpentelemetry.readinessProbe.periodSeconds }} | ||
| successThreshold: {{ .Values.netdataOpentelemetry.readinessProbe.successThreshold }} | ||
| timeoutSeconds: {{ .Values.netdataOpentelemetry.readinessProbe.timeoutSeconds }} | ||
| securityContext: | ||
| runAsUser: {{ .Values.netdataOpentelemetry.securityContext.runAsUser }} | ||
| runAsGroup: {{ .Values.netdataOpentelemetry.securityContext.runAsGroup }} | ||
| volumeMounts: | ||
| - name: os-release | ||
| mountPath: /host/etc/os-release | ||
| {{- range $name, $config := .Values.netdataOpentelemetry.configs }} | ||
| {{- if $config.enabled }} | ||
| - name: {{ ternary "configmap" "configsecret" (ne $config.storedType "secret") }} | ||
| mountPath: {{ $config.path }} | ||
| subPath: {{ $name }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- if .Values.netdataOpentelemetry.persistence.enabled }} | ||
| - name: varlog | ||
| mountPath: /var/log/netdata/otel | ||
| {{- end }} | ||
| {{- if .Values.netdataOpentelemetry.extraVolumeMounts -}} | ||
| {{ toYaml .Values.netdataOpentelemetry.extraVolumeMounts | nindent 12 }} | ||
| {{- end }} | ||
| resources: | ||
| {{ toYaml .Values.netdataOpentelemetry.resources | indent 12 }} | ||
| {{- with .Values.netdataOpentelemetry.nodeSelector }} | ||
| nodeSelector: | ||
| {{ toYaml . | indent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.netdataOpentelemetry.affinity }} | ||
| affinity: | ||
| {{ toYaml . | indent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.netdataOpentelemetry.tolerations }} | ||
| tolerations: | ||
| {{ toYaml . | indent 8 }} | ||
| {{- end }} | ||
| terminationGracePeriodSeconds: {{ .Values.netdataOpentelemetry.terminationGracePeriodSeconds }} | ||
| volumes: | ||
| - name: os-release | ||
| hostPath: | ||
| path: /etc/os-release | ||
| - name: configmap | ||
| configMap: | ||
| name: netdata-conf-otel | ||
| optional: true | ||
| - name: configsecret | ||
| secret: | ||
| secretName: netdata-conf-otel | ||
| optional: true | ||
| {{- if .Values.netdataOpentelemetry.persistence.enabled }} | ||
| - name: varlog | ||
| persistentVolumeClaim: | ||
| claimName: {{ template "netdata.name" . }}-otel-varlog | ||
| {{- end }} | ||
| {{- if .Values.netdataOpentelemetry.extraVolumes }} | ||
| {{ toYaml .Values.netdataOpentelemetry.extraVolumes | indent 8}} | ||
| {{- end }} | ||
| dnsPolicy: {{ .Values.netdataOpentelemetry.dnsPolicy }} | ||
| {{- end }} | ||
22 changes: 22 additions & 0 deletions
22
charts/netdata/templates/netdata-otel/persistentvolumeclaim.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| {{- if .Values.netdataOpentelemetry.enabled }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ .Release.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 }} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.