Skip to content

Commit

Permalink
Skip registration on empty socket
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <elezar@nvidia.com>
  • Loading branch information
elezar committed Jun 27, 2024
1 parent 0a7ef7f commit 7e7c85d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/plugin/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ func (plugin *NvidiaDevicePlugin) Serve() error {

// Register registers the device plugin for the given resourceName with Kubelet.
func (plugin *NvidiaDevicePlugin) Register(kubeletSocket string) error {
if kubeletSocket == "" {
klog.Info("Skipping registration with Kubelet")
return nil
}

conn, err := plugin.dial(kubeletSocket, 5*time.Second)
if err != nil {
return err
Expand Down

0 comments on commit 7e7c85d

Please sign in to comment.