Skip to content

Commit

Permalink
[agent] mount the whole node filesystem to scrape its mount points usage
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Sep 5, 2024
1 parent 5d83577 commit 9b1a4db
Show file tree
Hide file tree
Showing 35 changed files with 8,639 additions and 3,574 deletions.
12 changes: 12 additions & 0 deletions .chloggen/mountfilesystem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other)
component: agent
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Mount the node filesystem to scrape its mount points usage
# One or more tracking issues related to the change
issues: [1437]
# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
40 changes: 5 additions & 35 deletions examples/add-filter-processor/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ spec:
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
- name: HOST_PROC_MOUNTINFO
value: /proc/self/mountinfo
value: /hostfs/proc/self/mountinfo

readinessProbe:
httpGet:
Expand All @@ -190,23 +190,8 @@ spec:
volumeMounts:
- mountPath: /conf
name: otel-configmap
- mountPath: /hostfs/dev
name: host-dev
readOnly: true
- mountPath: /hostfs/etc
name: host-etc
readOnly: true
- mountPath: /hostfs/proc
name: host-proc
readOnly: true
- mountPath: /hostfs/run/udev/data
name: host-run-udev-data
readOnly: true
- mountPath: /hostfs/sys
name: host-sys
readOnly: true
- mountPath: /hostfs/var/run/utmp
name: host-var-run-utmp
- mountPath: "/hostfs"
name: hostfs
readOnly: true
- name: varlog
mountPath: /var/log
Expand Down Expand Up @@ -234,24 +219,9 @@ spec:
hostPath:
path: /var/addon/splunk/otel_pos
type: DirectoryOrCreate
- name: host-dev
hostPath:
path: /dev
- name: host-etc
hostPath:
path: /etc
- name: host-proc
hostPath:
path: /proc
- name: host-run-udev-data
hostPath:
path: /run/udev/data
- name: host-sys
hostPath:
path: /sys
- name: host-var-run-utmp
- name: hostfs
hostPath:
path: /var/run/utmp
path: /
- name: otel-configmap
configMap:
name: default-splunk-otel-collector-otel-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ spec:
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
- name: HOST_PROC_MOUNTINFO
value: /proc/self/mountinfo
value: /hostfs/proc/self/mountinfo

readinessProbe:
httpGet:
Expand All @@ -190,23 +190,8 @@ spec:
volumeMounts:
- mountPath: /conf
name: otel-configmap
- mountPath: /hostfs/dev
name: host-dev
readOnly: true
- mountPath: /hostfs/etc
name: host-etc
readOnly: true
- mountPath: /hostfs/proc
name: host-proc
readOnly: true
- mountPath: /hostfs/run/udev/data
name: host-run-udev-data
readOnly: true
- mountPath: /hostfs/sys
name: host-sys
readOnly: true
- mountPath: /hostfs/var/run/utmp
name: host-var-run-utmp
- mountPath: "/hostfs"
name: hostfs
readOnly: true
- name: varlog
mountPath: /var/log
Expand Down Expand Up @@ -234,24 +219,9 @@ spec:
hostPath:
path: /var/addon/splunk/otel_pos
type: DirectoryOrCreate
- name: host-dev
hostPath:
path: /dev
- name: host-etc
hostPath:
path: /etc
- name: host-proc
hostPath:
path: /proc
- name: host-run-udev-data
hostPath:
path: /run/udev/data
- name: host-sys
hostPath:
path: /sys
- name: host-var-run-utmp
- name: hostfs
hostPath:
path: /var/run/utmp
path: /
- name: otel-configmap
configMap:
name: default-splunk-otel-collector-otel-agent
Expand Down
40 changes: 5 additions & 35 deletions examples/add-receiver-creator/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ spec:
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
- name: HOST_PROC_MOUNTINFO
value: /proc/self/mountinfo
value: /hostfs/proc/self/mountinfo

readinessProbe:
httpGet:
Expand All @@ -149,23 +149,8 @@ spec:
volumeMounts:
- mountPath: /conf
name: otel-configmap
- mountPath: /hostfs/dev
name: host-dev
readOnly: true
- mountPath: /hostfs/etc
name: host-etc
readOnly: true
- mountPath: /hostfs/proc
name: host-proc
readOnly: true
- mountPath: /hostfs/run/udev/data
name: host-run-udev-data
readOnly: true
- mountPath: /hostfs/sys
name: host-sys
readOnly: true
- mountPath: /hostfs/var/run/utmp
name: host-var-run-utmp
- mountPath: "/hostfs"
name: hostfs
readOnly: true
- mountPath: /usr/lib/splunk-otel-collector/agent-bundle/run/collectd
name: run-collectd
Expand All @@ -175,24 +160,9 @@ spec:
- name: run-collectd
emptyDir:
sizeLimit: 25Mi
- name: host-dev
hostPath:
path: /dev
- name: host-etc
hostPath:
path: /etc
- name: host-proc
hostPath:
path: /proc
- name: host-run-udev-data
hostPath:
path: /run/udev/data
- name: host-sys
hostPath:
path: /sys
- name: host-var-run-utmp
- name: hostfs
hostPath:
path: /var/run/utmp
path: /
- name: otel-configmap
configMap:
name: default-splunk-otel-collector-otel-agent
Expand Down
40 changes: 5 additions & 35 deletions examples/add-sampler/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ spec:
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
- name: HOST_PROC_MOUNTINFO
value: /proc/self/mountinfo
value: /hostfs/proc/self/mountinfo

readinessProbe:
httpGet:
Expand All @@ -149,23 +149,8 @@ spec:
volumeMounts:
- mountPath: /conf
name: otel-configmap
- mountPath: /hostfs/dev
name: host-dev
readOnly: true
- mountPath: /hostfs/etc
name: host-etc
readOnly: true
- mountPath: /hostfs/proc
name: host-proc
readOnly: true
- mountPath: /hostfs/run/udev/data
name: host-run-udev-data
readOnly: true
- mountPath: /hostfs/sys
name: host-sys
readOnly: true
- mountPath: /hostfs/var/run/utmp
name: host-var-run-utmp
- mountPath: "/hostfs"
name: hostfs
readOnly: true
- mountPath: /usr/lib/splunk-otel-collector/agent-bundle/run/collectd
name: run-collectd
Expand All @@ -175,24 +160,9 @@ spec:
- name: run-collectd
emptyDir:
sizeLimit: 25Mi
- name: host-dev
hostPath:
path: /dev
- name: host-etc
hostPath:
path: /etc
- name: host-proc
hostPath:
path: /proc
- name: host-run-udev-data
hostPath:
path: /run/udev/data
- name: host-sys
hostPath:
path: /sys
- name: host-var-run-utmp
- name: hostfs
hostPath:
path: /var/run/utmp
path: /
- name: otel-configmap
configMap:
name: default-splunk-otel-collector-otel-agent
Expand Down
40 changes: 5 additions & 35 deletions examples/autodetect-istio/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ spec:
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
- name: HOST_PROC_MOUNTINFO
value: /proc/self/mountinfo
value: /hostfs/proc/self/mountinfo

readinessProbe:
httpGet:
Expand All @@ -191,23 +191,8 @@ spec:
volumeMounts:
- mountPath: /conf
name: otel-configmap
- mountPath: /hostfs/dev
name: host-dev
readOnly: true
- mountPath: /hostfs/etc
name: host-etc
readOnly: true
- mountPath: /hostfs/proc
name: host-proc
readOnly: true
- mountPath: /hostfs/run/udev/data
name: host-run-udev-data
readOnly: true
- mountPath: /hostfs/sys
name: host-sys
readOnly: true
- mountPath: /hostfs/var/run/utmp
name: host-var-run-utmp
- mountPath: "/hostfs"
name: hostfs
readOnly: true
- name: varlog
mountPath: /var/log
Expand Down Expand Up @@ -235,24 +220,9 @@ spec:
hostPath:
path: /var/addon/splunk/otel_pos
type: DirectoryOrCreate
- name: host-dev
hostPath:
path: /dev
- name: host-etc
hostPath:
path: /etc
- name: host-proc
hostPath:
path: /proc
- name: host-run-udev-data
hostPath:
path: /run/udev/data
- name: host-sys
hostPath:
path: /sys
- name: host-var-run-utmp
- name: hostfs
hostPath:
path: /var/run/utmp
path: /
- name: otel-configmap
configMap:
name: default-splunk-otel-collector-otel-agent
Expand Down
40 changes: 5 additions & 35 deletions examples/collector-agent-only/rendered_manifests/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ spec:
# is resolved fall back to previous gopsutil mountinfo path:
# https://github.com/shirou/gopsutil/issues/1271
- name: HOST_PROC_MOUNTINFO
value: /proc/self/mountinfo
value: /hostfs/proc/self/mountinfo

readinessProbe:
httpGet:
Expand All @@ -149,23 +149,8 @@ spec:
volumeMounts:
- mountPath: /conf
name: otel-configmap
- mountPath: /hostfs/dev
name: host-dev
readOnly: true
- mountPath: /hostfs/etc
name: host-etc
readOnly: true
- mountPath: /hostfs/proc
name: host-proc
readOnly: true
- mountPath: /hostfs/run/udev/data
name: host-run-udev-data
readOnly: true
- mountPath: /hostfs/sys
name: host-sys
readOnly: true
- mountPath: /hostfs/var/run/utmp
name: host-var-run-utmp
- mountPath: "/hostfs"
name: hostfs
readOnly: true
- mountPath: /usr/lib/splunk-otel-collector/agent-bundle/run/collectd
name: run-collectd
Expand All @@ -175,24 +160,9 @@ spec:
- name: run-collectd
emptyDir:
sizeLimit: 25Mi
- name: host-dev
hostPath:
path: /dev
- name: host-etc
hostPath:
path: /etc
- name: host-proc
hostPath:
path: /proc
- name: host-run-udev-data
hostPath:
path: /run/udev/data
- name: host-sys
hostPath:
path: /sys
- name: host-var-run-utmp
- name: hostfs
hostPath:
path: /var/run/utmp
path: /
- name: otel-configmap
configMap:
name: default-splunk-otel-collector-otel-agent
Expand Down
Loading

0 comments on commit 9b1a4db

Please sign in to comment.