From 3fdaf5e85d98852bdd3c118d602719a12e28ac68 Mon Sep 17 00:00:00 2001 From: Pinghao Wu Date: Fri, 10 Jan 2025 21:24:30 +0800 Subject: [PATCH] migrate node-exporter to flux --- monitoring/node-exporter/daemonset.yaml | 38 +++++++++++++++++++++ monitoring/node-exporter/kustomization.yaml | 11 ++++++ monitoring/node-exporter/namespace.yaml | 7 ++++ 3 files changed, 56 insertions(+) create mode 100644 monitoring/node-exporter/daemonset.yaml create mode 100644 monitoring/node-exporter/kustomization.yaml create mode 100644 monitoring/node-exporter/namespace.yaml diff --git a/monitoring/node-exporter/daemonset.yaml b/monitoring/node-exporter/daemonset.yaml new file mode 100644 index 0000000..34a8ce8 --- /dev/null +++ b/monitoring/node-exporter/daemonset.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: node-exporter +spec: + template: + spec: + containers: + - name: node-exporter + image: quay.io/prometheus/node-exporter:v1.8.2 + args: + - --path.rootfs=/host + - --no-collector.bcache + - --no-collector.bonding + - --no-collector.fibrechannel + - --no-collector.mdadm + - --no-collector.nvme + - --no-collector.nfs + - --no-collector.nfsd + - --no-collector.tapestats + - --no-collector.xfs + - --no-collector.zfs + - --collector.filesystem.mount-points-exclude=^(/etc/|/var/lib/kubelet/pods/.|/run/containers/storage/overlay-containers/|/sys|/var/lib/containers/storage/overlay) + volumeMounts: + - name: host + mountPath: /host + readOnly: true + readinessProbe: + httpGet: + port: 9100 + hostNetwork: true + volumes: + - name: host + hostPath: + path: / + tolerations: + - key: node-role.kubernetes.io/control-plane + effect: NoSchedule diff --git a/monitoring/node-exporter/kustomization.yaml b/monitoring/node-exporter/kustomization.yaml new file mode 100644 index 0000000..8867f29 --- /dev/null +++ b/monitoring/node-exporter/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: node-exporter +labels: + - pairs: + app: node-exporter + includeTemplates: true + includeSelectors: true +resources: + - namespace.yaml + - daemonset.yaml diff --git a/monitoring/node-exporter/namespace.yaml b/monitoring/node-exporter/namespace.yaml new file mode 100644 index 0000000..74d0e0a --- /dev/null +++ b/monitoring/node-exporter/namespace.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Namespace +metadata: + creationTimestamp: null + name: node-exporter +spec: {} +status: {} -- 2.45.2