Merge pull request #15445 from sivukhin/small-bug-fixes

Fixes for the govanish linter issues
This commit is contained in:
Travis Nielsen authored and GitHub committed 2025-04-04 12:11:17 -06:00
commit e6142d8a4c
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -32,7 +32,7 @@ import (
discoverDaemon "github.com/rook/rook/pkg/daemon/discover"
"github.com/rook/rook/pkg/operator/ceph/controller"
opcontroller "github.com/rook/rook/pkg/operator/ceph/controller"
k8sutil "github.com/rook/rook/pkg/operator/k8sutil"
"github.com/rook/rook/pkg/operator/k8sutil"
"github.com/rook/rook/pkg/util/sys"
apps "k8s.io/api/apps/v1"
@@ -424,7 +424,7 @@ func GetAvailableDevices(ctx context.Context, clusterdContext *clusterd.Context,
}
}
}
} else if len(filter) >= 0 {
} else if len(filter) > 0 {
for i := range nodeDevices {
// TODO support filter based on other keys
matched, err := regexp.Match(filter, []byte(nodeDevices[i].Name))
+1 -1
View File
@@ -165,7 +165,7 @@ func GetRunningPod(ctx context.Context, clientset kubernetes.Interface) (*v1.Pod
return nil, fmt.Errorf("cannot detect the pod name. Please provide it using the downward API in the manifest file")
}
podNamespace := os.Getenv(PodNamespaceEnvVar)
if podName == "" {
if podNamespace == "" {
return nil, fmt.Errorf("cannot detect the pod namespace. Please provide it using the downward API in the manifest file")
}