apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: node-exporter
  labels:
    app.kubernetes.io/name: exporter
    app.kubernetes.io/component: node-exporter
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: exporter
      app.kubernetes.io/component: node-exporter
  minReadySeconds: 5
  template:
    metadata:
      labels:
        app.kubernetes.io/name: exporter
        app.kubernetes.io/component: node-exporter
    spec:
      containers:
        - name: node-exporter
          image: "prom/node-exporter:v1.3.1"
          imagePullPolicy: "IfNotPresent"
          args:
            - --path.procfs=/host/proc
            - --path.sysfs=/host/sys
            - --path.rootfs=/host/root
            - --no-collector.wifi
            - --no-collector.hwmon
            - --no-collector.time
            - --no-collector.timex
            - --no-collector.arp
            - --no-collector.netdev
            - --no-collector.netstat
            - --collector.processes
            - --web.max-requests=40
            - --web.listen-address=:9100
          ports:
            - name: metrics
              containerPort: 9100
              protocol: TCP
          resources:
            limits:
              cpu: 250m
              memory: 250Mi
            requests:
              cpu: 100m
              memory: 100Mi
          volumeMounts:
            - name: proc
              mountPath: /host/proc
              readOnly:  true
            - name: sys
              mountPath: /host/sys
              readOnly: true
            - name: root
              mountPath: /host/root
              mountPropagation: HostToContainer
              readOnly: true
      hostNetwork: true
      securityContext:
        fsGroup: 65534
        runAsGroup: 65534
        runAsNonRoot: true
        runAsUser: 65534
      volumes:
        - name: proc
          hostPath:
            path: /proc
        - name: sys
          hostPath:
            path: /sys
        - name: root
          hostPath:
            path: /
