Skip to content

Commit

Permalink
Merge pull request #43 from msau42/deprecate
Browse files Browse the repository at this point in the history
Use deprecatedflags for connection-timeout
  • Loading branch information
k8s-ci-robot authored Apr 15, 2019
2 parents 5470e2f + 771c444 commit 805568a
Show file tree
Hide file tree
Showing 344 changed files with 67,802 additions and 11,255 deletions.
62 changes: 35 additions & 27 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 2 additions & 14 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,11 @@

[[constraint]]
name = "github.com/container-storage-interface/spec"
version = "1.0.0-rc2"
version = "1.0"

[[constraint]]
branch = "master"
name = "github.com/kubernetes-csi/csi-test"

[[constraint]]
name = "google.golang.org/grpc"
version = "1.10.0"

[[constraint]]
name = "github.com/golang/mock"
version = "1.1.1"

[[constraint]]
name = "github.com/kubernetes-csi/csi-lib-utils"
version = ">=0.4.0-rc1"
version = "2.0"

[prune]
non-go = true
Expand Down
16 changes: 7 additions & 9 deletions cmd/livenessprobe/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,19 @@ import (
"k8s.io/klog"

connlib "github.com/kubernetes-csi/csi-lib-utils/connection"
"github.com/kubernetes-csi/csi-lib-utils/deprecatedflags"
"github.com/kubernetes-csi/csi-lib-utils/rpc"

"google.golang.org/grpc"
)

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

_ = deprecatedflags.Add("connection-timeout")
)

type healthProbe struct {
Expand Down Expand Up @@ -74,10 +76,6 @@ func main() {
flag.Set("logtostderr", "true")
flag.Parse()

if *connectionTimeout != 0 {
klog.Warning("--connection-timeout is deprecated and will have no effect")
}

csiConn, err := connlib.Connect(*csiAddress)
if err != nil {
// connlib should retry forever so a returned error should mean
Expand Down
Loading

0 comments on commit 805568a

Please sign in to comment.