-
Notifications
You must be signed in to change notification settings - Fork 0
/
daemonset.yaml
127 lines (127 loc) · 3.45 KB
/
daemonset.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
apiVersion: v1
kind: ConfigMap
metadata:
name: sriov-network-metrics-exporter
namespace: monitoring
data:
drivers.yaml: |-
drivers:
- name: ice
version: 1.9.11
- name: mlx5_core
version: 5.15.0-53-generic
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app.kubernetes.io/name: sriov-metrics-exporter
app.kubernetes.io/version: v0.0.1
name: sriov-metrics-exporter
namespace: monitoring
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/name: sriov-metrics-exporter
template:
metadata:
labels:
app.kubernetes.io/name: sriov-metrics-exporter
app.kubernetes.io/version: v0.0.1
spec:
hostNetwork: true
containers:
- args:
- --path.kubecgroup=/host/kubecgroup
- --path.sysbuspci=/host/sys/bus/pci/devices/
- --path.sysclassnet=/host/sys/class/net/
- --path.cpucheckpoint=/host/cpu_manager_state
- --path.kubeletsocket=/host/kubelet.sock
- --collector.kubepoddevice=true
- --collector.vfstatspriority=sysfs,netlink
image: localhost:5000/sriov-metrics-exporter
imagePullPolicy: Always
name: sriov-metrics-exporter
resources:
requests:
memory: 100Mi
cpu: 100m
limits:
memory: 100Mi
cpu: 100m
securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
volumeMounts:
- mountPath: /host/kubelet.sock
name: kubeletsocket
- mountPath: /host/sys/bus/pci/devices
name: sysbuspcidevices
readOnly: true
- mountPath: /host/sys/devices
name: sysdevices
readOnly: true
- mountPath: /host/sys/class/net
name: sysclassnet
readOnly: true
- mountPath: /host/kubecgroup
name: kubecgroup
readOnly: true
- mountPath: /host/cpu_manager_state
name: cpucheckpoint
readOnly: true
- name: sriov-network-metrics-exporter
mountPath: /etc/sriov-network-metrics-exporter
nodeSelector:
kubernetes.io/os: linux
feature.node.kubernetes.io/network-sriov.capable: "true"
restartPolicy: Always
tolerations:
- operator: Exists
volumes:
- hostPath:
path: /var/lib/kubelet/pod-resources/kubelet.sock
type: "Socket"
name: kubeletsocket
- hostPath:
path: /sys/fs/cgroup/cpuset/kubepods.slice/
type: "Directory"
name: kubecgroup
- hostPath:
path: /var/lib/kubelet/cpu_manager_state
type: "File"
name: cpucheckpoint
- hostPath:
path: /sys/class/net
type: "Directory"
name: sysclassnet
- hostPath:
path: /sys/bus/pci/devices
type: "Directory"
name: sysbuspcidevices
- hostPath:
path: /sys/devices
type: "Directory"
name: sysdevices
- name: sriov-network-metrics-exporter
configMap:
name: sriov-network-metrics-exporter
---
apiVersion: v1
kind: Service
metadata:
name: sriov-metrics-exporter
namespace: monitoring
annotations:
prometheus.io/target: "true"
spec:
selector:
app.kubernetes.io/name: sriov-metrics-exporter
ports:
- protocol: TCP
port: 9808
targetPort: 9808