-
Notifications
You must be signed in to change notification settings - Fork 5
/
node-exporter-pv-metrics.yaml
102 lines (102 loc) · 3.09 KB
/
node-exporter-pv-metrics.yaml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# monitor-pv will be launch as daemonset.
# choose appropriate namespace and serviceaccount. defaults to ns: openebs, sa: openebs-maya-operator
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: monitor-pv
namespace: openebs
spec:
selector:
matchLabels:
app: monitor-pv
template:
metadata:
labels:
app: monitor-pv
name: monitor-pv
spec:
serviceAccount: openebs-maya-operator
containers:
- image: quay.io/prometheus/node-exporter:v0.18.1
args:
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --path.rootfs=/host/root
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib|run|boot|home/kubernetes/.+)($|/)
- --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)$
- --collector.textfile.directory=/shared_vol
name: node-exporter
ports:
- containerPort: 9100
hostPort: 9100
name: scrape
resources:
requests:
# A memory request of 250M means it will try to ensure minimum
# 250MB RAM .
memory: "128M"
# A cpu request of 128m means it will try to ensure minimum
# .125 CPU; where 1 CPU means :
# 1 *Hyperthread* on a bare-metal Intel processor with Hyperthreading
cpu: "128m"
limits:
memory: "700M"
cpu: "500m"
volumeMounts:
# All the application data stored in data-disk
- name: proc
mountPath: /host/proc
readOnly: false
# Root disk is where OS(Node) is installed
- name: sys
mountPath: /host/sys
readOnly: false
- name: root
mountPath: /host/root
mountPropagation: HostToContainer
readOnly: true
- name: tmpvol
mountPath: /shared_vol
- name: monitor-pv
image: openebs/monitor-pv:ci
imagePullPolicy: Always
env:
- name: TEXTFILE_PATH
value: /shared_vol
- name: COLLECT_INTERVAL
value: "10"
- name: PROVISIONER_WHITELIST
value: "openebs.io/provisioner-iscsi,openebs.io/local"
command:
- /bin/bash
args:
- -c
- ./textfile_collector.sh
volumeMounts:
- mountPath: /host/proc
name: proc
- mountPath: /host/sys
name: sys
- mountPath: /host/root
mountPropagation: HostToContainer
name: root
readOnly: true
- mountPath: /shared_vol
name: tmpvol
tolerations:
- effect: NoSchedule
operator: Exists
volumes:
- name: proc
hostPath:
path: /proc
- name: sys
hostPath:
path: /sys
- name: root
hostPath:
path: /
- name: tmpvol
emptyDir: {}
hostNetwork: true
hostPID: true