11/*
2+ * Copyright 2025 The Kubernetes Authors.
23 * Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
34 *
45 * Licensed under the Apache License, Version 2.0 (the "License");
@@ -61,7 +62,7 @@ func startHealthcheck(ctx context.Context, config *Config) (*healthcheck, error)
6162 Scheme : "unix" ,
6263 // TODO: this needs to adapt when seamless upgrades
6364 // are enabled and the filename includes a uid.
64- Path : path .Join (DriverRegistrarPath , DriverName + "-reg.sock" ),
65+ Path : path .Join (config . flags . kubeletRegistrarDirectoryPath , DriverName + "-reg.sock" ),
6566 }).String ()
6667 klog .V (6 ).Infof ("connecting to registration socket path=%s" , regSockPath )
6768 regConn , err := grpc .NewClient (
@@ -74,7 +75,7 @@ func startHealthcheck(ctx context.Context, config *Config) (*healthcheck, error)
7475
7576 draSockPath := (& url.URL {
7677 Scheme : "unix" ,
77- Path : path .Join (DriverPluginPath , "dra.sock" ),
78+ Path : path .Join (config . DriverPluginPath () , "dra.sock" ),
7879 }).String ()
7980 klog .V (6 ).Infof ("connecting to DRA socket path=%s" , draSockPath )
8081 draConn , err := grpc .NewClient (
@@ -106,8 +107,8 @@ func startHealthcheck(ctx context.Context, config *Config) (*healthcheck, error)
106107}
107108
108109func (h * healthcheck ) Stop () {
109- klog .Info ("Stopping healthcheck service" )
110110 if h .server != nil {
111+ klog .Info ("Stopping healthcheck service" )
111112 h .server .GracefulStop ()
112113 }
113114 h .wg .Wait ()
0 commit comments