71 lines
2.8 KiB
YAML
71 lines
2.8 KiB
YAML
|
|
---
|
||
|
|
# Strategic-merge patch enabling node-exporter's textfile collector on
|
||
|
|
# the kube-prometheus-stack node-exporter DaemonSet (DEV-494).
|
||
|
|
#
|
||
|
|
# The chart is Helm-managed (release `kube-prometheus-stack` in
|
||
|
|
# namespace `observability`, chart kube-prometheus-stack-86.2.2 /
|
||
|
|
# prometheus-node-exporter-4.55.0) and is NOT currently tracked in
|
||
|
|
# ArgoCD, so a direct DaemonSet patch is the pragmatic wiring path.
|
||
|
|
# The change:
|
||
|
|
#
|
||
|
|
# 1. adds the `--collector.textfile.directory=/host/textfile_collector`
|
||
|
|
# arg to the node-exporter container, and
|
||
|
|
# 2. mounts the host directory `/var/lib/node_exporter/textfile_collector`
|
||
|
|
# read-only at `/host/textfile_collector` (type DirectoryOrCreate so
|
||
|
|
# kubelet creates the dir on nodes where it does not yet exist).
|
||
|
|
#
|
||
|
|
# Apply with:
|
||
|
|
# kubectl -n observability patch daemonset \
|
||
|
|
# kube-prometheus-stack-prometheus-node-exporter \
|
||
|
|
# --type=strategic \
|
||
|
|
# --patch-file=apps/observability/patches/node-exporter-textfile-collector.yaml
|
||
|
|
#
|
||
|
|
# If the Helm release is ever `helm upgrade`d without folding these
|
||
|
|
# values into the chart values, this patch will be reverted — re-apply
|
||
|
|
# it after the upgrade (or move it into a repo-owned values file).
|
||
|
|
spec:
|
||
|
|
template:
|
||
|
|
spec:
|
||
|
|
containers:
|
||
|
|
- name: node-exporter
|
||
|
|
args:
|
||
|
|
- --path.procfs=/host/proc
|
||
|
|
- --path.sysfs=/host/sys
|
||
|
|
- --path.rootfs=/host/root
|
||
|
|
- --path.udev.data=/host/root/run/udev/data
|
||
|
|
- --web.listen-address=[$(HOST_IP)]:9100
|
||
|
|
- --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|run/containerd/.+|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
|
||
|
|
- --collector.filesystem.fs-types-exclude=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs|erofs)$
|
||
|
|
- --collector.textfile.directory=/host/textfile_collector
|
||
|
|
volumeMounts:
|
||
|
|
- mountPath: /host/proc
|
||
|
|
name: proc
|
||
|
|
readOnly: true
|
||
|
|
- mountPath: /host/sys
|
||
|
|
name: sys
|
||
|
|
readOnly: true
|
||
|
|
- mountPath: /host/root
|
||
|
|
mountPropagation: HostToContainer
|
||
|
|
name: root
|
||
|
|
readOnly: true
|
||
|
|
- mountPath: /host/textfile_collector
|
||
|
|
name: textfile-collector
|
||
|
|
readOnly: true
|
||
|
|
volumes:
|
||
|
|
- hostPath:
|
||
|
|
path: /proc
|
||
|
|
type: ""
|
||
|
|
name: proc
|
||
|
|
- hostPath:
|
||
|
|
path: /sys
|
||
|
|
type: ""
|
||
|
|
name: sys
|
||
|
|
- hostPath:
|
||
|
|
path: /
|
||
|
|
type: ""
|
||
|
|
name: root
|
||
|
|
- hostPath:
|
||
|
|
path: /var/lib/node_exporter/textfile_collector
|
||
|
|
type: DirectoryOrCreate
|
||
|
|
name: textfile-collector
|