Skip to content

Commit 5fd45c7

Browse files
dependabot[bot]xuchenCN
authored andcommitted
chore(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.10.0 to 1.11.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](stretchr/testify@v1.10.0...v1.11.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-version: 1.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
1 parent 8002f0b commit 5fd45c7

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

cmd/k8s-rdma-shared-dp/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ func main() {
6868
useCdi := false
6969
flag.BoolVar(&useCdi, "use-cdi", false,
7070
"Use Container Device Interface to expose devices in containers")
71+
pluginMode := false
72+
flag.BoolVar(&pluginMode, "plugin-mode", true,
73+
"Using Kubelet Plugin Registry Mode if true, else to using Deprecated Device Plugin Registry Path ")
7174
flag.Parse()
7275
if versionOpt {
7376
fmt.Printf("%s\n", printVersionString())
@@ -80,7 +83,7 @@ func main() {
8083

8184
log.Println("Starting K8s RDMA Shared Device Plugin version=", version)
8285

83-
rm := resources.NewResourceManager(configFilePath, useCdi)
86+
rm := resources.NewResourceManager(configFilePath, useCdi, pluginMode)
8487

8588
log.Println("resource manager reading configs")
8689
if err := rm.ReadConfig(); err != nil {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/onsi/ginkgo v1.16.5
1111
github.com/onsi/gomega v1.38.0
1212
github.com/pkg/errors v0.9.1
13-
github.com/stretchr/testify v1.10.0
13+
github.com/stretchr/testify v1.11.0
1414
github.com/vishvananda/netlink v1.3.1
1515
golang.org/x/net v0.43.0
1616
google.golang.org/grpc v1.74.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/
103103
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
104104
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
105105
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
106-
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
107-
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
106+
github.com/stretchr/testify v1.11.0 h1:ib4sjIrwZKxE5u/Japgo/7SJV3PvgjGiRNAvTVGqQl8=
107+
github.com/stretchr/testify v1.11.0/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
108108
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
109109
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
110110
github.com/urfave/cli v1.19.1/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=

pkg/resources/resources_manager.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,17 @@ type resourceManager struct {
9090
useCdi bool
9191
}
9292

93-
func NewResourceManager(configFile string, useCdi bool) types.ResourceManager {
94-
watcherMode := detectPluginWatchMode(activeSockDir)
95-
if watcherMode {
93+
func NewResourceManager(configFile string, useCdi, pluginMode bool) types.ResourceManager {
94+
if pluginMode {
9695
fmt.Println("Using Kubelet Plugin Registry Mode")
9796
} else {
98-
fmt.Println("Using Deprecated Devie Plugin Registry Path")
97+
fmt.Println("Using Deprecated Device Plugin Registry Path")
9998
}
10099
return &resourceManager{
101100
configFile: configFile,
102101
defaultResourcePrefix: rdmaHcaResourcePrefix,
103102
socketSuffix: socketSuffix,
104-
watchMode: watcherMode,
103+
watchMode: pluginMode,
105104
netlinkManager: &netlinkManager{},
106105
rds: NewRdmaDeviceSpec(requiredRdmaDevices),
107106
useCdi: useCdi,

0 commit comments

Comments
 (0)