apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: node-exporter
  namespace: monitoring
  labels:
    app: node-exporter
    component: prometheus
spec:
  template:
    metadata:
      labels:
        app: node-exporter
      annotations:
        prometheus.io/port: "9100"
        prometheus.io/scrape: "true"
    spec:
      hostNetwork: true
      hostPID: true
      containers:
      - image: quay.io/prometheus/node-exporter:v0.14.0
        name: node-exporter
        args:
        - "-collector.procfs=/host/proc"
        - "-collector.sysfs=/host/sys"
        ports:
        - containerPort: 9100
          name: scrape-port
        resources:
          requests:
            memory: 50Mi
            cpu: 50m
          limits:
            memory: 50Mi
            cpu: 50m
        volumeMounts:
        - name: proc
          readOnly:  true
          mountPath: /host/proc
        - name: sys
          readOnly: true
          mountPath: /host/sys
      tolerations:
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
      - key: CriticalAddonsOnly
        operator: Exists
      volumes:
      - name: proc
        hostPath:
          path: /proc
      - name: sys
        hostPath:
          path: /sys
