diff --git a/pkg/auth/authorizer/union/BUILD b/pkg/auth/authorizer/union/BUILD index 1ec677dc222..7063e3a2c1c 100644 --- a/pkg/auth/authorizer/union/BUILD +++ b/pkg/auth/authorizer/union/BUILD @@ -8,16 +8,6 @@ load( "go_test", ) -go_library( - name = "go_default_library", - srcs = ["union.go"], - tags = ["automanaged"], - deps = [ - "//pkg/auth/authorizer:go_default_library", - "//pkg/util/errors:go_default_library", - ], -) - go_test( name = "go_default_test", srcs = ["union_test.go"], @@ -25,3 +15,13 @@ go_test( tags = ["automanaged"], deps = ["//pkg/auth/authorizer:go_default_library"], ) + +go_library( + name = "go_default_library", + srcs = ["union.go"], + tags = ["automanaged"], + deps = [ + "//pkg/auth/authorizer:go_default_library", + "//vendor:k8s.io/client-go/pkg/util/errors", + ], +) diff --git a/pkg/auth/authorizer/union/union.go b/pkg/auth/authorizer/union/union.go index 29a098ab28f..e9bd203a37d 100644 --- a/pkg/auth/authorizer/union/union.go +++ b/pkg/auth/authorizer/union/union.go @@ -19,8 +19,8 @@ package union import ( "strings" + utilerrors "k8s.io/client-go/pkg/util/errors" "k8s.io/kubernetes/pkg/auth/authorizer" - utilerrors "k8s.io/kubernetes/pkg/util/errors" ) // unionAuthzHandler authorizer against a chain of authorizer.Authorizer diff --git a/pkg/ssh/BUILD b/pkg/ssh/BUILD index 2d08533d0c6..d3688a99442 100644 --- a/pkg/ssh/BUILD +++ b/pkg/ssh/BUILD @@ -13,12 +13,12 @@ go_library( srcs = ["ssh.go"], tags = ["automanaged"], deps = [ - "//pkg/util/net:go_default_library", - "//pkg/util/runtime:go_default_library", - "//pkg/util/wait:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/prometheus/client_golang/prometheus", "//vendor:golang.org/x/crypto/ssh", + "//vendor:k8s.io/client-go/pkg/util/net", + "//vendor:k8s.io/client-go/pkg/util/runtime", + "//vendor:k8s.io/client-go/pkg/util/wait", ], ) @@ -28,8 +28,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/util/wait:go_default_library", "//vendor:github.com/golang/glog", "//vendor:golang.org/x/crypto/ssh", + "//vendor:k8s.io/client-go/pkg/util/wait", ], ) diff --git a/pkg/ssh/ssh.go b/pkg/ssh/ssh.go index 40bab3cea51..a56d1f508a7 100644 --- a/pkg/ssh/ssh.go +++ b/pkg/ssh/ssh.go @@ -40,9 +40,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "golang.org/x/crypto/ssh" - utilnet "k8s.io/kubernetes/pkg/util/net" - "k8s.io/kubernetes/pkg/util/runtime" - "k8s.io/kubernetes/pkg/util/wait" + utilnet "k8s.io/client-go/pkg/util/net" + "k8s.io/client-go/pkg/util/runtime" + "k8s.io/client-go/pkg/util/wait" ) var ( diff --git a/pkg/ssh/ssh_test.go b/pkg/ssh/ssh_test.go index a9facfe6325..ecf302c1bf9 100644 --- a/pkg/ssh/ssh_test.go +++ b/pkg/ssh/ssh_test.go @@ -26,7 +26,7 @@ import ( "testing" "time" - "k8s.io/kubernetes/pkg/util/wait" + "k8s.io/client-go/pkg/util/wait" "github.com/golang/glog" "golang.org/x/crypto/ssh" diff --git a/pkg/util/wsstream/BUILD b/pkg/util/wsstream/BUILD index 1c7aed7f16b..35dfac681b5 100644 --- a/pkg/util/wsstream/BUILD +++ b/pkg/util/wsstream/BUILD @@ -20,6 +20,7 @@ go_library( "//pkg/util/runtime:go_default_library", "//vendor:github.com/golang/glog", "//vendor:golang.org/x/net/websocket", + "//vendor:k8s.io/client-go/pkg/util/runtime", ], ) diff --git a/pkg/util/wsstream/stream.go b/pkg/util/wsstream/stream.go index a877a8eeefd..df9240c0cf0 100644 --- a/pkg/util/wsstream/stream.go +++ b/pkg/util/wsstream/stream.go @@ -25,7 +25,7 @@ import ( "golang.org/x/net/websocket" - "k8s.io/kubernetes/pkg/util/runtime" + "k8s.io/client-go/pkg/util/runtime" ) // The WebSocket subprotocol "binary.k8s.io" will only send messages to the diff --git a/plugin/pkg/auth/authenticator/request/headerrequest/BUILD b/plugin/pkg/auth/authenticator/request/headerrequest/BUILD index c33ae09b869..204289ccc1d 100644 --- a/plugin/pkg/auth/authenticator/request/headerrequest/BUILD +++ b/plugin/pkg/auth/authenticator/request/headerrequest/BUILD @@ -8,19 +8,6 @@ load( "go_test", ) -go_library( - name = "go_default_library", - srcs = ["requestheader.go"], - tags = ["automanaged"], - deps = [ - "//pkg/auth/authenticator:go_default_library", - "//pkg/util/cert:go_default_library", - "//pkg/util/sets:go_default_library", - "//plugin/pkg/auth/authenticator/request/x509:go_default_library", - "//vendor:k8s.io/apiserver/pkg/authentication/user", - ], -) - go_test( name = "go_default_test", srcs = ["requestheader_test.go"], @@ -28,3 +15,16 @@ go_test( tags = ["automanaged"], deps = ["//vendor:k8s.io/apiserver/pkg/authentication/user"], ) + +go_library( + name = "go_default_library", + srcs = ["requestheader.go"], + tags = ["automanaged"], + deps = [ + "//pkg/auth/authenticator:go_default_library", + "//plugin/pkg/auth/authenticator/request/x509:go_default_library", + "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/client-go/pkg/util/cert", + "//vendor:k8s.io/client-go/pkg/util/sets", + ], +) diff --git a/plugin/pkg/auth/authenticator/request/headerrequest/requestheader.go b/plugin/pkg/auth/authenticator/request/headerrequest/requestheader.go index c4b376368d4..d937fc6b3ff 100644 --- a/plugin/pkg/auth/authenticator/request/headerrequest/requestheader.go +++ b/plugin/pkg/auth/authenticator/request/headerrequest/requestheader.go @@ -24,9 +24,9 @@ import ( "strings" "k8s.io/apiserver/pkg/authentication/user" + utilcert "k8s.io/client-go/pkg/util/cert" + "k8s.io/client-go/pkg/util/sets" "k8s.io/kubernetes/pkg/auth/authenticator" - utilcert "k8s.io/kubernetes/pkg/util/cert" - "k8s.io/kubernetes/pkg/util/sets" x509request "k8s.io/kubernetes/plugin/pkg/auth/authenticator/request/x509" ) diff --git a/plugin/pkg/auth/authenticator/request/union/BUILD b/plugin/pkg/auth/authenticator/request/union/BUILD index 31b8c0f0383..b3e2450ffc5 100644 --- a/plugin/pkg/auth/authenticator/request/union/BUILD +++ b/plugin/pkg/auth/authenticator/request/union/BUILD @@ -8,17 +8,6 @@ load( "go_test", ) -go_library( - name = "go_default_library", - srcs = ["union.go"], - tags = ["automanaged"], - deps = [ - "//pkg/auth/authenticator:go_default_library", - "//pkg/util/errors:go_default_library", - "//vendor:k8s.io/apiserver/pkg/authentication/user", - ], -) - go_test( name = "go_default_test", srcs = ["unionauth_test.go"], @@ -26,3 +15,14 @@ go_test( tags = ["automanaged"], deps = ["//vendor:k8s.io/apiserver/pkg/authentication/user"], ) + +go_library( + name = "go_default_library", + srcs = ["union.go"], + tags = ["automanaged"], + deps = [ + "//pkg/auth/authenticator:go_default_library", + "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/client-go/pkg/util/errors", + ], +) diff --git a/plugin/pkg/auth/authenticator/request/union/union.go b/plugin/pkg/auth/authenticator/request/union/union.go index bc1ca5da379..509233e1363 100644 --- a/plugin/pkg/auth/authenticator/request/union/union.go +++ b/plugin/pkg/auth/authenticator/request/union/union.go @@ -20,8 +20,8 @@ import ( "net/http" "k8s.io/apiserver/pkg/authentication/user" + utilerrors "k8s.io/client-go/pkg/util/errors" "k8s.io/kubernetes/pkg/auth/authenticator" - utilerrors "k8s.io/kubernetes/pkg/util/errors" ) // unionAuthRequestHandler authenticates requests using a chain of authenticator.Requests diff --git a/plugin/pkg/auth/authenticator/request/x509/BUILD b/plugin/pkg/auth/authenticator/request/x509/BUILD index 19dd36864f8..bfba594c9f1 100644 --- a/plugin/pkg/auth/authenticator/request/x509/BUILD +++ b/plugin/pkg/auth/authenticator/request/x509/BUILD @@ -8,6 +8,19 @@ load( "go_test", ) +go_test( + name = "go_default_test", + srcs = ["x509_test.go"], + data = glob(["testdata/*"]), + library = ":go_default_library", + tags = ["automanaged"], + deps = [ + "//pkg/auth/authenticator:go_default_library", + "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/client-go/pkg/util/sets", + ], +) + go_library( name = "go_default_library", srcs = [ @@ -17,22 +30,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/auth/authenticator:go_default_library", - "//pkg/util/errors:go_default_library", - "//pkg/util/sets:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apiserver/pkg/authentication/user", - ], -) - -go_test( - name = "go_default_test", - srcs = ["x509_test.go"], - data = glob(["testdata/*"]), - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/auth/authenticator:go_default_library", - "//pkg/util/sets:go_default_library", - "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/client-go/pkg/util/errors", + "//vendor:k8s.io/client-go/pkg/util/sets", ], ) diff --git a/plugin/pkg/auth/authenticator/request/x509/x509.go b/plugin/pkg/auth/authenticator/request/x509/x509.go index 6203f1865a3..cf75d1072c5 100644 --- a/plugin/pkg/auth/authenticator/request/x509/x509.go +++ b/plugin/pkg/auth/authenticator/request/x509/x509.go @@ -26,9 +26,9 @@ import ( "github.com/golang/glog" "k8s.io/apiserver/pkg/authentication/user" + utilerrors "k8s.io/client-go/pkg/util/errors" + "k8s.io/client-go/pkg/util/sets" "k8s.io/kubernetes/pkg/auth/authenticator" - utilerrors "k8s.io/kubernetes/pkg/util/errors" - "k8s.io/kubernetes/pkg/util/sets" ) // UserConversion defines an interface for extracting user info from a client certificate chain diff --git a/plugin/pkg/auth/authenticator/request/x509/x509_test.go b/plugin/pkg/auth/authenticator/request/x509/x509_test.go index 1740834199e..c37c65f27d7 100644 --- a/plugin/pkg/auth/authenticator/request/x509/x509_test.go +++ b/plugin/pkg/auth/authenticator/request/x509/x509_test.go @@ -29,8 +29,8 @@ import ( "time" "k8s.io/apiserver/pkg/authentication/user" + "k8s.io/client-go/pkg/util/sets" "k8s.io/kubernetes/pkg/auth/authenticator" - "k8s.io/kubernetes/pkg/util/sets" ) const (