File tree 3 files changed +32
-22
lines changed
3 files changed +32
-22
lines changed Original file line number Diff line number Diff line change @@ -5,19 +5,22 @@ metadata:
5
5
labels :
6
6
app.kubernetes.io/component : hami-device-plugin
7
7
{{- include "hami-vgpu.labels" . | nindent 4 }}
8
- {{- if .Values.scheduler .service.labels }}
9
- {{ toYaml .Values.scheduler .service.labels | indent 4 }}
8
+ {{- if .Values.devicePlugin .service.labels }} # Use devicePlugin instead of scheduler
9
+ {{ toYaml .Values.devicePlugin .service.labels | indent 4 }}
10
10
{{- end }}
11
- {{- if .Values.scheduler .service.annotations }}
12
- annotations : {{ toYaml .Values.scheduler .service.annotations | nindent 4 }}
11
+ {{- if .Values.devicePlugin .service.annotations }} # Use devicePlugin instead of scheduler
12
+ annotations : {{ toYaml .Values.devicePlugin .service.annotations | nindent 4 }}
13
13
{{- end }}
14
14
spec :
15
- externalTrafficPolicy : Local
16
- selector :
17
- app.kubernetes.io/component : hami-device-plugin
18
- type : NodePort
15
+ type : {{ .Values.devicePlugin.service.type | default "NodePort" }} # Default type is NodePort
19
16
ports :
20
17
- name : monitorport
21
- port : {{ .Values.devicePlugin.service.httpPort }}
18
+ port : {{ .Values.devicePlugin.service.httpPort | default 31992 }} # Default HTTP port is 31992
22
19
targetPort : 9394
23
- nodePort : {{ .Values.devicePlugin.service.httpPort }}
20
+ {{- if eq (.Values.devicePlugin.service.type | default "NodePort") "NodePort" }} # If type is NodePort, set nodePort
21
+ nodePort : {{ .Values.devicePlugin.service.httpPort | default 31992 }}
22
+ {{- end }}
23
+ protocol : TCP
24
+ selector :
25
+ app.kubernetes.io/component : hami-device-plugin
26
+ {{- include "hami-vgpu.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change @@ -12,19 +12,22 @@ metadata:
12
12
annotations : {{ toYaml .Values.scheduler.service.annotations | nindent 4 }}
13
13
{{- end }}
14
14
spec :
15
- type : NodePort
15
+ type : {{ .Values.scheduler.service.type | default "NodePort" }} # Default type is NodePort
16
16
ports :
17
17
- name : http
18
- port : {{ .Values.scheduler.service.httpPort }}
19
- targetPort : 443
20
- nodePort : {{ .Values.scheduler.service.schedulerPort }}
18
+ port : {{ .Values.scheduler.service.httpPort | default 443 }} # Default HTTP port is 443
19
+ targetPort : {{ .Values.scheduler.service.httpTargetPort | default 443 }}
20
+ {{- if eq (.Values.scheduler.service.type | default "NodePort") "NodePort" }} # If type is NodePort, set nodePort
21
+ nodePort : {{ .Values.scheduler.service.schedulerPort | default 31998 }}
22
+ {{- end }}
21
23
protocol : TCP
22
24
- name : monitor
23
- port : {{ .Values.scheduler.service.monitorPort }}
24
- targetPort : {{ (split ":" (printf "%s" .Values.scheduler.metricsBindAddress))._1 }}
25
- nodePort : {{ .Values.scheduler.service.monitorPort }}
25
+ port : {{ .Values.scheduler.service.monitorPort | default 31993 }} # Default monitoring port is 31993
26
+ targetPort : {{ .Values.scheduler.service.monitorTargetPort | default 31993 }}
27
+ {{- if eq (.Values.scheduler.service.type | default "NodePort") "NodePort" }} # If type is NodePort, set nodePort
28
+ nodePort : {{ .Values.scheduler.service.monitorPort | default 31993 }}
29
+ {{- end }}
26
30
protocol : TCP
27
31
selector :
28
32
app.kubernetes.io/component : hami-scheduler
29
- {{- include "hami-vgpu.selectorLabels" . | nindent 4 }}
30
-
33
+ {{- include "hami-vgpu.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change @@ -119,9 +119,10 @@ scheduler:
119
119
tolerations : []
120
120
runAsUser : 2000
121
121
service :
122
- httpPort : 443
123
- schedulerPort : 31998
124
- monitorPort : 31993
122
+ type : NodePort # Default type is NodePort, can be changed to ClusterIP
123
+ httpPort : 443 # HTTP port
124
+ schedulerPort : 31998 # NodePort for HTTP
125
+ monitorPort : 31993 # Monitoring port
125
126
labels : {}
126
127
annotations : {}
127
128
@@ -141,7 +142,10 @@ devicePlugin:
141
142
- -v=4
142
143
143
144
service :
145
+ type : NodePort # Default type is NodePort, can be changed to ClusterIP
144
146
httpPort : 31992
147
+ labels : {}
148
+ annotations : {}
145
149
146
150
pluginPath : /var/lib/kubelet/device-plugins
147
151
libPath : /usr/local/vgpu
You can’t perform that action at this time.
0 commit comments