File tree Expand file tree Collapse file tree 3 files changed +94
-0
lines changed Expand file tree Collapse file tree 3 files changed +94
-0
lines changed Original file line number Diff line number Diff line change 1+ {{- if .Values.devicePlugin.serviceMonitor.enabled }}
2+ apiVersion : monitoring.coreos.com/v1
3+ kind : ServiceMonitor
4+ metadata :
5+ name : {{ include "hami-vgpu.device-plugin" . }}
6+ namespace : {{ include "hami-vgpu.namespace" . }}
7+ labels :
8+ release : prometheus
9+ spec :
10+ endpoints :
11+ - bearerTokenSecret :
12+ key : " "
13+ name : " "
14+ interval : 15s
15+ metricRelabelings :
16+ - action : replace
17+ sourceLabels :
18+ - podname
19+ targetLabel : exported_pod
20+ - action : replace
21+ sourceLabels :
22+ - podnamespace
23+ targetLabel : exported_namespace
24+ - targetLabel : cluster
25+ replacement : local-cluster
26+ - sourceLabels : [podname]
27+ regex : ^(.+)-[a-z0-9]{9,}-[a-z0-9]+$
28+ targetLabel : deployment_name
29+ replacement : $1
30+ action : replace
31+ - sourceLabels : [podnamespace, deployment_name]
32+ separator : /
33+ targetLabel : deployment
34+ action : replace
35+ path : /metrics
36+ port : monitorport
37+ relabelings :
38+ - action : replace
39+ sourceLabels :
40+ - __meta_kubernetes_endpoint_node_name
41+ targetLabel : node
42+ jobLabel : app
43+ namespaceSelector :
44+ matchNames :
45+ - {{ include "hami-vgpu.namespace" . }}
46+ selector :
47+ matchLabels :
48+ app.kubernetes.io/component : hami-device-plugin
49+ {{- end }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.scheduler.serviceMonitor.enabled }}
2+ apiVersion : monitoring.coreos.com/v1
3+ kind : ServiceMonitor
4+ metadata :
5+ name : {{ include "hami-vgpu.scheduler" . }}
6+ namespace : {{ include "hami-vgpu.namespace" . }}
7+ labels :
8+ release : prometheus
9+ spec :
10+ endpoints :
11+ - bearerTokenSecret :
12+ key : " "
13+ name : " "
14+ interval : 15s
15+ metricRelabelings :
16+ - action : replace
17+ sourceLabels :
18+ - podname
19+ targetLabel : exported_pod
20+ - action : replace
21+ sourceLabels :
22+ - podnamespace
23+ targetLabel : exported_namespace
24+ - action : replace
25+ sourceLabels :
26+ - nodeid
27+ targetLabel : node
28+ - targetLabel : cluster
29+ replacement : local-cluster
30+ path : /metrics
31+ port : monitor
32+ jobLabel : app
33+ namespaceSelector :
34+ matchNames :
35+ - {{ include "hami-vgpu.namespace" . }}
36+ selector :
37+ matchLabels :
38+ app.kubernetes.io/component : hami-scheduler
39+ {{- end }}
Original file line number Diff line number Diff line change @@ -232,6 +232,9 @@ scheduler:
232232 monitorTargetPort : 9395
233233 labels : {}
234234 annotations : {}
235+ # enable serviceMonitor resource for hami scheduler
236+ serviceMonitor :
237+ enabled : false
235238
236239devicePlugin :
237240 # # @param image.registry devicePlugin image registry
@@ -296,6 +299,9 @@ devicePlugin:
296299 httpPort : 31992
297300 labels : {}
298301 annotations : {}
302+ # enable serviceMonitor resource for device plugin
303+ serviceMonitor :
304+ enabled : false
299305
300306 pluginPath : /var/lib/kubelet/device-plugins
301307 libPath : /usr/local/vgpu
You can’t perform that action at this time.
0 commit comments