Skip to content

Commit

Permalink
fix: only enable hostfs mount when hostmetrics is on
Browse files Browse the repository at this point in the history
Signed-off-by: Prashant Shahi <prashant@signoz.io>
  • Loading branch information
prashant-shahi committed Oct 16, 2024
1 parent 1ff683f commit f77e3cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/k8s-infra/templates/otel-agent/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ spec:
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
{{- if eq .Values.presets.hostMetrics.enabled true }}
- name: hostfs
hostPath:
path: /
{{- end }}
{{- end }}
{{- if .Values.otelTlsSecrets.enabled }}
- name: {{ include "k8s-infra.fullname" . }}-agent-secrets-vol
secret:
Expand Down Expand Up @@ -120,11 +122,13 @@ spec:
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
{{- if eq .Values.presets.hostMetrics.enabled true }}
- name: hostfs
mountPath: /hostfs
readOnly: true
mountPropagation: HostToContainer
{{- end }}
{{- end }}
{{- if .Values.otelTlsSecrets.enabled }}
- name: {{ include "k8s-infra.fullname" . }}-agent-secrets-vol
mountPath: {{ default "/secrets" .Values.otelTlsSecrets.path }}
Expand Down

0 comments on commit f77e3cd

Please sign in to comment.