Skip to content

Use deprecatedflags for connection-timeout #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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