---
# Source: prometheus-operator/charts/prometheus-node-exporter/templates/daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: agent-prometheus-prometheus-node-exporter
  namespace: infra-monitoring
  labels:     
    app: prometheus-node-exporter
    heritage: Helm
    release: agent-prometheus
    chart: prometheus-node-exporter-1.9.1
    jobLabel: node-exporter
spec:
  selector:
    matchLabels:
      app: prometheus-node-exporter
      release: agent-prometheus
  updateStrategy:
    rollingUpdate:
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:         
        app: prometheus-node-exporter
        heritage: Helm
        release: agent-prometheus
        chart: prometheus-node-exporter-1.9.1
        jobLabel: node-exporter
    spec:
      serviceAccountName: agent-prometheus-prometheus-node-exporter
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
      priorityClassName: infrastructure-critical
      containers:
        - name: node-exporter
          image: "quay.io/prometheus/node-exporter:v0.18.1"
          imagePullPolicy: IfNotPresent
          args:
            - --path.procfs=/host/proc
            - --path.sysfs=/host/sys
            - --web.listen-address=$(HOST_IP):9100
            - --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+)($|/)
            - --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$
          env:
          - name: HOST_IP
            value: 0.0.0.0
          ports:
            - name: metrics
              containerPort: 9100
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /
              port: 9100
          readinessProbe:
            httpGet:
              path: /
              port: 9100
          resources:
            {}
          volumeMounts:
            - name: proc
              mountPath: /host/proc
              readOnly:  true
            - name: sys
              mountPath: /host/sys
              readOnly: true
      hostNetwork: true
      hostPID: true
      tolerations:
        - effect: NoSchedule
          operator: Exists
      volumes:
        - name: proc
          hostPath:
            path: /proc
        - name: sys
          hostPath:
            path: /sys
