@@ -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
3436var (
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
4244type 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