apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: node-exporter
  labels:
    app: node-exporter
spec:
  selector:
    matchLabels:
      app: node-exporter
  template:
   metadata:
    labels:
      app: node-exporter
   spec:
    hostNetwork: true
    hostPID: true
    containers:
    - name: node-exporter
      image: quay.io/prometheus/node-exporter:v1.0.1
      args:
        - "--web.listen-address=127.0.0.1:9100"
        - "--path.procfs=/host/proc"
        - "--path.sysfs=/host/sys"
        - "--path.rootfs=/host/root"
        - "--no-collector.wifi"
        - "--no-collector.hwmon"
      volumeMounts:
      - mountPath: /host/proc
        mountPropagation: HostToContainer
        name: proc
        readOnly: true
      - mountPath: /host/sys
        mountPropagation: HostToContainer
        name: sys
        readOnly: true
      - mountPath: /host/root
        mountPropagation: HostToContainer
        name: root
        readOnly: true
    tolerations:
      - effect: NoSchedule
        operator: Exists
    volumes:
      - name: proc
        hostPath:
          path: /proc
      - name: sys
        hostPath:
          path: /sys
      - name: root
        hostPath:
          path: /

