Skip to content

Commit 771c444

Browse files
committed
Use deprecated flags for connection-timeout
1 parent 4583bd8 commit 771c444

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

cmd/livenessprobe/main.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,19 @@ import (
2626
"k8s.io/klog"
2727

2828
connlib "github.com/kubernetes-csi/csi-lib-utils/connection"
29+
"github.com/kubernetes-csi/csi-lib-utils/deprecatedflags"
2930
"github.com/kubernetes-csi/csi-lib-utils/rpc"
31+
3032
"google.golang.org/grpc"
3133
)
3234

3335
// Command line flags
3436
var (
35-
// kubeconfig = flag.String("kubeconfig", "", "Absolute path to the kubeconfig file. Required only when running out of cluster.")
36-
connectionTimeout = flag.Duration("connection-timeout", 0, "The --connection-timeout flag is deprecated")
37-
probeTimeout = flag.Duration("probe-timeout", time.Second, "Probe timeout in seconds")
38-
csiAddress = flag.String("csi-address", "/run/csi/socket", "Address of the CSI driver socket.")
39-
healthzPort = flag.String("health-port", "9808", "TCP ports for listening healthz requests")
37+
probeTimeout = flag.Duration("probe-timeout", time.Second, "Probe timeout in seconds")
38+
csiAddress = flag.String("csi-address", "/run/csi/socket", "Address of the CSI driver socket.")
39+
healthzPort = flag.String("health-port", "9808", "TCP ports for listening healthz requests")
40+
41+
_ = deprecatedflags.Add("connection-timeout")
4042
)
4143

4244
type healthProbe struct {
@@ -74,10 +76,6 @@ func main() {
7476
flag.Set("logtostderr", "true")
7577
flag.Parse()
7678

77-
if *connectionTimeout != 0 {
78-
klog.Warning("--connection-timeout is deprecated and will have no effect")
79-
}
80-
8179
csiConn, err := connlib.Connect(*csiAddress)
8280
if err != nil {
8381
// connlib should retry forever so a returned error should mean

0 commit comments

Comments
 (0)