Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions charts/netdata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@ true
<td>netdataOpentelemetry.dnsPolicy</td>
<td>string</td>
<td><pre lang="json">
"Default"
"ClusterFirst"
</pre>
</td>
<td>DNS policy for pod</td>
Expand All @@ -1960,7 +1960,7 @@ true
true
</pre>
</td>
<td>Whether should use a persistent volume</td>
<td>Whether to use persistent volumes</td>
</tr>
<tr>
<td>netdataOpentelemetry.persistence.storageclass</td>
Expand All @@ -1969,7 +1969,7 @@ true
"-"
</pre>
</td>
<td>The storage class for the persistent volume claim</td>
<td>The storage class for the persistent volume claim (both varlib and varlog volumes)</td>
</tr>
<tr>
<td>netdataOpentelemetry.persistence.volumesize</td>
Expand All @@ -1978,7 +1978,7 @@ true
"10Gi"
</pre>
</td>
<td>The storage space for the PVC</td>
<td>The storage space for the logs (varlog volume)</td>
</tr>
<tr>
<td>netdataOpentelemetry.configs</td>
Expand Down
5 changes: 5 additions & 0 deletions charts/netdata/templates/netdata-otel/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ spec:
{{- if .Values.netdataOpentelemetry.persistence.enabled }}
- name: varlog
mountPath: /var/log/netdata/otel
- name: varlib
mountPath: /var/lib/netdata
{{- end }}
{{- if .Values.netdataOpentelemetry.extraVolumeMounts -}}
{{ toYaml .Values.netdataOpentelemetry.extraVolumeMounts | nindent 12 }}
Expand Down Expand Up @@ -175,6 +177,9 @@ spec:
- name: varlog
persistentVolumeClaim:
claimName: {{ template "netdata.name" . }}-otel-varlog
- name: varlib
persistentVolumeClaim:
claimName: {{ template "netdata.name" . }}-otel-varlib
{{- end }}
{{- if .Values.netdataOpentelemetry.extraVolumes }}
{{ toYaml .Values.netdataOpentelemetry.extraVolumes | indent 8}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,25 @@ spec:
resources:
requests:
storage: {{ .Values.netdataOpentelemetry.persistence.volumesize }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "netdata.name" . }}-otel-varlib
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: 1Gi

{{- end }}
11 changes: 7 additions & 4 deletions charts/netdata/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -976,16 +976,19 @@ netdataOpentelemetry:

# -- DNS policy for pod
# @section -- Netdata OpenTelemetry
dnsPolicy: Default
dnsPolicy: ClusterFirst

# Volumes to create are called varlib and varlog
# varlib stores the alerts information and claimID of the agent. Static size of 1Gi
# varlog volume stores the logs. Size can be adjusted with persistence.volumesize
persistence:
# -- Whether should use a persistent volume
# -- Whether to use persistent volumes
# @section -- Netdata OpenTelemetry
enabled: true
# -- The storage class for the persistent volume claim
# -- The storage class for the persistent volume claim (both varlib and varlog volumes)
# @section -- Netdata OpenTelemetry
storageclass: "-"
# -- The storage space for the PVC
# -- The storage space for the logs (varlog volume)
# @section -- Netdata OpenTelemetry
volumesize: 10Gi

Expand Down
Loading