Skip to content

Commit 4aa9eeb

Browse files
committed
Add dockershim instead of containerd sock
Signed-off-by: ghokun <[email protected]>
1 parent fe08e3a commit 4aa9eeb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

manifests/device-plugin.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ spec:
4545
capabilities:
4646
add: ["SYS_ADMIN"]
4747
containers:
48-
- image: ghcr.io/kuartis/kuartis-virtual-gpu-device-plugin:0.4.2
48+
- image: ghcr.io/kuartis/kuartis-virtual-gpu-device-plugin:0.4.3
4949
name: kuartis-virtual-gpu-device-plugin-ctr
5050
command:
5151
- /usr/bin/virtual-gpu-device-plugin
@@ -69,8 +69,8 @@ spec:
6969
- name: proc
7070
mountPath: /host/proc
7171
readOnly: true
72-
- mountPath: /var/run/containerd/containerd.sock
73-
name: containerdsock
72+
- mountPath: /var/run/dockershim.sock
73+
name: dockershimsock
7474
- image: nvidia/mps
7575
name: mps
7676
volumeMounts:
@@ -86,6 +86,6 @@ spec:
8686
- name: proc
8787
hostPath:
8888
path: /proc
89-
- name: containerdsock
89+
- name: dockershimsock
9090
hostPath:
91-
path: /var/run/containerd/containerd.sock
91+
path: /var/run/dockershim.sock

pkg/gpu/nvidia/metrics.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ import (
1616

1717
"google.golang.org/grpc"
1818
"google.golang.org/grpc/credentials/insecure"
19-
pb "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
19+
pb "k8s.io/cri-api/pkg/apis/runtime/v1"
2020
)
2121

2222
const (
23-
containerdsocket = "/var/run/containerd/containerd.sock"
23+
dockershimsocket = "/var/run/dockershim.sock"
2424
timeout = 10 * time.Second
2525
)
2626

@@ -121,7 +121,7 @@ func collectMetrics(w http.ResponseWriter, r *http.Request) {
121121
func getRuntimeClient() (pb.RuntimeServiceClient, *grpc.ClientConn, error) {
122122
ctx, cancel := context.WithTimeout(context.Background(), timeout)
123123
defer cancel()
124-
conn, err := grpc.DialContext(ctx, containerdsocket, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock(),
124+
conn, err := grpc.DialContext(ctx, dockershimsocket, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock(),
125125
grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) {
126126
return net.DialTimeout("unix", addr, timeout)
127127
}),

0 commit comments

Comments
 (0)