Skip to content

Commit 805568a

Browse files
authored
Merge pull request #43 from msau42/deprecate
Use deprecatedflags for connection-timeout
2 parents 5470e2f + 771c444 commit 805568a

File tree

344 files changed

+67802
-11255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

344 files changed

+67802
-11255
lines changed

Gopkg.lock

Lines changed: 35 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,11 @@
2323

2424
[[constraint]]
2525
name = "github.com/container-storage-interface/spec"
26-
version = "1.0.0-rc2"
26+
version = "1.0"
2727

2828
[[constraint]]
29-
branch = "master"
3029
name = "github.com/kubernetes-csi/csi-test"
31-
32-
[[constraint]]
33-
name = "google.golang.org/grpc"
34-
version = "1.10.0"
35-
36-
[[constraint]]
37-
name = "github.com/golang/mock"
38-
version = "1.1.1"
39-
40-
[[constraint]]
41-
name = "github.com/kubernetes-csi/csi-lib-utils"
42-
version = ">=0.4.0-rc1"
30+
version = "2.0"
4331

4432
[prune]
4533
non-go = true

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)