about summary refs log tree commit diff
path: root/bundles/node-exporter/files/kube.yaml
blob: 388f41280277d631095c6982ce9d6820df353af1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
apiVersion: v1
kind: Pod
metadata:
  name: node-exporter
  labels:
    traefik.enable: true
    traefik.http.services.node-exporter.loadbalancer.server.port: 20091
    # metrics
    traefik.http.routers.node-exporter-metrics.entrypoints: metrics
    traefik.http.routers.node-exporter-metrics.rule: Path(`/metrics/node-exporter`)
    traefik.http.routers.node-exporter-metrics.middlewares: replacepath-metrics@file
    traefik.http.routers.node-exporter-metrics.service: node-exporter
spec:
  restartPolicy: Never
  dnsPolicy: Default
  containers:
    - name: node-exporter
      image: quay.io/prometheus/node-exporter:v${version}
      args:
      - --path.procfs=/host/proc
      - --path.sysfs=/host/sys
      - --path.rootfs=/host/root
      - --web.listen-address=:20091
      - --no-collector.bcache
      - --no-collector.selinux
      - --no-collector.infiniband
      - --no-collector.xfs
      - --no-collector.zfs
      - --collector.textfile.directory=/host/textfiles
      - --collector.filesystem.ignored-mount-points=^/(sys|proc|dev|run)($|/)
      volumeMounts:
        - name: proc
          mountPath: /host/proc
          readOnly:  true
        - name: sys
          mountPath: /host/sys
          readOnly: true
        - name: root
          mountPath: /host/root
          mountPropagation: HostToContainer
          readOnly:  true
        - name: textfiles
          mountPath: /host/textfiles
          readOnly: true
      ports:
        - containerPort: 20091
          protocol: TCP
      hostNetwork: true
      hostPID: true
      livenessProbe:
        exec:
          command: ["wget", "-qO-", "http://localhost:20091/"]
      resources:
        limits:
          cpu: 10m
          memory: 50Mi

  volumes:
    - name: proc
      hostPath:
        path: /proc
        type: Directory
    - name: sys
      hostPath:
        path: /sys
        type: Directory
    - name: root
      hostPath:
        path: /
        type: Directory
    - name: textfiles
      hostPath:
        path: /run/prom
        type: DirectoryOrCreate