Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add servicemonitor switch for metrics acquisition #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions charts/hami/templates/device-plugin/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.devicePlugin.serviceMonitor.enable }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: vgpu-monitor
namespace: {{ .Release.Namespace | quote }}
spec:
endpoints:
- bearerTokenSecret:
key: ""
interval: 15s
path: /metrics
port: monitorport
jobLabel: app
namespaceSelector:
matchNames:
- {{ .Release.Namespace | quote }}
selector:
matchLabels:
app.kubernetes.io/component: 4pd-scheduler
{{- end }}
21 changes: 21 additions & 0 deletions charts/hami/templates/scheduler/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.scheduler.serviceMonitor.enable }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: vgpu-scheduler
namespace: {{ .Release.Namespace | quote }}
spec:
endpoints:
- bearerTokenSecret:
key: ""
interval: 15s
path: /metrics
port: monitor
jobLabel: app
namespaceSelector:
matchNames:
- {{ .Release.Namespace | quote }}
selector:
matchLabels:
app.kubernetes.io/component: 4pd-scheduler
{{- end }}
4 changes: 4 additions & 0 deletions charts/hami/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ scheduler:
extraArgs:
- --debug
- -v=4
serviceMonitor:
enable: false
podAnnotations: {}
#nodeSelector:
# gpu: "on"
Expand Down Expand Up @@ -118,4 +120,6 @@ devicePlugin:
hygonnodeSelector:
dcu: "on"
tolerations: []
serviceMonitor:
enable: false

Loading