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:
      containers:
      - name: node-exporter
        image: prom/node-exporter:v0.18.1
        args:
        - --path.procfs=/host/proc
        - --path.rootfs=/host/root
        - --path.sysfs=/host/sys
        resources:
          limits:
            memory: 64Mi
        ports:
        - containerPort: 9100
        volumeMounts:
        - mountPath: /host/proc
          name: proc
        - mountPath: /host/sys
          name: sys
        - mountPath: /host/root
          mountPropagation: HostToContainer
          readOnly: true
          name: root
      hostNetwork: true
      hostPID: true
      volumes:
      - hostPath:
          path: /proc
        name: proc
      - hostPath:
          path: /sys
        name: sys
      - hostPath:
          path: /
        name: root
