Skip to content

Commit

Permalink
fix(otel-agent): mount root path in /hostfs for hostmetrics
Browse files Browse the repository at this point in the history
Signed-off-by: Prashant Shahi <[email protected]>
  • Loading branch information
prashant-shahi committed Jul 22, 2024
1 parent ca3fb60 commit 41861fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/k8s-infra/templates/_config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ receivers:
receivers:
hostmetrics:
collection_interval: {{ .Values.presets.hostMetrics.collectionInterval }}
root_path: /hostfs
scrapers:
{{ range $key, $val := .Values.presets.hostMetrics.scrapers }}
{{ $key }}: {{ $val | toYaml }}
Expand Down
7 changes: 7 additions & 0 deletions charts/k8s-infra/templates/otel-agent/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ spec:
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: hostfs
hostPath:
path: /
{{- end }}
{{- if .Values.otelTlsSecrets.enabled }}
- name: {{ include "k8s-infra.fullname" . }}-agent-secrets-vol
Expand Down Expand Up @@ -117,6 +120,10 @@ spec:
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
- name: hostfs
mountPath: /hostfs
readOnly: true
mountPropagation: HostToContainer
{{- end }}
{{- if .Values.otelTlsSecrets.enabled }}
- name: {{ include "k8s-infra.fullname" . }}-agent-secrets-vol
Expand Down

0 comments on commit 41861fb

Please sign in to comment.