diff --git a/cluster/images/etcd/attachlease/BUILD b/cluster/images/etcd/attachlease/BUILD index bf5b9a3167d..2e4fcde3848 100644 --- a/cluster/images/etcd/attachlease/BUILD +++ b/cluster/images/etcd/attachlease/BUILD @@ -18,7 +18,6 @@ go_library( deps = [ "//vendor/github.com/coreos/etcd/clientv3:go_default_library", "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", ], ) diff --git a/cluster/images/etcd/attachlease/attachlease.go b/cluster/images/etcd/attachlease/attachlease.go index 1c7d6b81473..440847af3c6 100644 --- a/cluster/images/etcd/attachlease/attachlease.go +++ b/cluster/images/etcd/attachlease/attachlease.go @@ -17,13 +17,13 @@ limitations under the License. package main import ( + "context" "flag" "strings" "time" "github.com/coreos/etcd/clientv3" "github.com/golang/glog" - "golang.org/x/net/context" ) var ( diff --git a/pkg/cloudprovider/providers/vsphere/BUILD b/pkg/cloudprovider/providers/vsphere/BUILD index 76fe4f7c7d6..dad06a27135 100644 --- a/pkg/cloudprovider/providers/vsphere/BUILD +++ b/pkg/cloudprovider/providers/vsphere/BUILD @@ -23,7 +23,6 @@ go_library( "//vendor/github.com/golang/glog:go_default_library", "//vendor/github.com/vmware/govmomi/vim25:go_default_library", "//vendor/github.com/vmware/govmomi/vim25/mo:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/gopkg.in/gcfg.v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", @@ -39,7 +38,6 @@ go_test( deps = [ "//pkg/cloudprovider:go_default_library", "//pkg/cloudprovider/providers/vsphere/vclib:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], diff --git a/pkg/cloudprovider/providers/vsphere/nodemanager.go b/pkg/cloudprovider/providers/vsphere/nodemanager.go index 1ed39bccd58..ed927d9e0b7 100644 --- a/pkg/cloudprovider/providers/vsphere/nodemanager.go +++ b/pkg/cloudprovider/providers/vsphere/nodemanager.go @@ -17,12 +17,12 @@ limitations under the License. package vsphere import ( + "context" "fmt" "strings" "sync" "github.com/golang/glog" - "golang.org/x/net/context" "k8s.io/api/core/v1" k8stypes "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/cloudprovider/providers/vsphere/vclib" diff --git a/pkg/cloudprovider/providers/vsphere/vclib/BUILD b/pkg/cloudprovider/providers/vsphere/vclib/BUILD index 3feb1e43131..ca4eb530d7d 100644 --- a/pkg/cloudprovider/providers/vsphere/vclib/BUILD +++ b/pkg/cloudprovider/providers/vsphere/vclib/BUILD @@ -37,7 +37,6 @@ go_library( "//vendor/github.com/vmware/govmomi/vim25/mo:go_default_library", "//vendor/github.com/vmware/govmomi/vim25/soap:go_default_library", "//vendor/github.com/vmware/govmomi/vim25/types:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", ], ) diff --git a/pkg/cloudprovider/providers/vsphere/vclib/connection.go b/pkg/cloudprovider/providers/vsphere/vclib/connection.go index d42a091f17f..dda185ab0a3 100644 --- a/pkg/cloudprovider/providers/vsphere/vclib/connection.go +++ b/pkg/cloudprovider/providers/vsphere/vclib/connection.go @@ -17,6 +17,7 @@ limitations under the License. package vclib import ( + "context" "fmt" neturl "net/url" "sync" @@ -25,7 +26,6 @@ import ( "github.com/vmware/govmomi" "github.com/vmware/govmomi/session" "github.com/vmware/govmomi/vim25" - "golang.org/x/net/context" ) // VSphereConnection contains information for connecting to vCenter diff --git a/pkg/cloudprovider/providers/vsphere/vclib/datacenter.go b/pkg/cloudprovider/providers/vsphere/vclib/datacenter.go index d62695b5c5a..fa4f1c3d76a 100644 --- a/pkg/cloudprovider/providers/vsphere/vclib/datacenter.go +++ b/pkg/cloudprovider/providers/vsphere/vclib/datacenter.go @@ -17,6 +17,7 @@ limitations under the License. package vclib import ( + "context" "errors" "fmt" "path/filepath" @@ -28,7 +29,6 @@ import ( "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" - "golang.org/x/net/context" ) // Datacenter extends the govmomi Datacenter object diff --git a/pkg/cloudprovider/providers/vsphere/vclib/datastore.go b/pkg/cloudprovider/providers/vsphere/vclib/datastore.go index 8fba424bbd9..8d21789f9ce 100644 --- a/pkg/cloudprovider/providers/vsphere/vclib/datastore.go +++ b/pkg/cloudprovider/providers/vsphere/vclib/datastore.go @@ -17,14 +17,15 @@ limitations under the License. package vclib import ( + "context" "fmt" + "github.com/golang/glog" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" - "golang.org/x/net/context" ) // Datastore extends the govmomi Datastore object diff --git a/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/BUILD b/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/BUILD index 6a888195e65..377202f4cd6 100644 --- a/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/BUILD +++ b/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/BUILD @@ -18,7 +18,6 @@ go_library( "//vendor/github.com/golang/glog:go_default_library", "//vendor/github.com/vmware/govmomi/object:go_default_library", "//vendor/github.com/vmware/govmomi/vim25/types:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", ], ) diff --git a/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/vdm.go b/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/vdm.go index 3e6d9b2ecd9..a643241bdb6 100644 --- a/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/vdm.go +++ b/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/vdm.go @@ -17,10 +17,9 @@ limitations under the License. package diskmanagers import ( + "context" "time" - "golang.org/x/net/context" - "github.com/golang/glog" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" diff --git a/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/virtualdisk.go b/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/virtualdisk.go index 533f49ece30..fe905cc79f7 100644 --- a/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/virtualdisk.go +++ b/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/virtualdisk.go @@ -17,10 +17,10 @@ limitations under the License. package diskmanagers import ( + "context" "fmt" "github.com/golang/glog" - "golang.org/x/net/context" "k8s.io/kubernetes/pkg/cloudprovider/providers/vsphere/vclib" ) diff --git a/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/vmdm.go b/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/vmdm.go index 6942dffb7f8..1979d572525 100644 --- a/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/vmdm.go +++ b/pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/vmdm.go @@ -17,6 +17,7 @@ limitations under the License. package diskmanagers import ( + "context" "fmt" "hash/fnv" "strings" @@ -24,7 +25,6 @@ import ( "github.com/golang/glog" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" - "golang.org/x/net/context" "k8s.io/kubernetes/pkg/cloudprovider/providers/vsphere/vclib" ) diff --git a/pkg/cloudprovider/providers/vsphere/vclib/folder.go b/pkg/cloudprovider/providers/vsphere/vclib/folder.go index 35294b5d4a5..4e66de88dbb 100644 --- a/pkg/cloudprovider/providers/vsphere/vclib/folder.go +++ b/pkg/cloudprovider/providers/vsphere/vclib/folder.go @@ -17,9 +17,10 @@ limitations under the License. package vclib import ( + "context" + "github.com/golang/glog" "github.com/vmware/govmomi/object" - "golang.org/x/net/context" ) // Folder extends the govmomi Folder object diff --git a/pkg/cloudprovider/providers/vsphere/vclib/pbm.go b/pkg/cloudprovider/providers/vsphere/vclib/pbm.go index 5ec83c62b36..0a494f7d731 100644 --- a/pkg/cloudprovider/providers/vsphere/vclib/pbm.go +++ b/pkg/cloudprovider/providers/vsphere/vclib/pbm.go @@ -17,11 +17,11 @@ limitations under the License. package vclib import ( + "context" "fmt" "github.com/golang/glog" "github.com/vmware/govmomi/pbm" - "golang.org/x/net/context" pbmtypes "github.com/vmware/govmomi/pbm/types" "github.com/vmware/govmomi/vim25" diff --git a/pkg/cloudprovider/providers/vsphere/vsphere.go b/pkg/cloudprovider/providers/vsphere/vsphere.go index 4835306d156..a8606b297bb 100644 --- a/pkg/cloudprovider/providers/vsphere/vsphere.go +++ b/pkg/cloudprovider/providers/vsphere/vsphere.go @@ -17,6 +17,7 @@ limitations under the License. package vsphere import ( + "context" "errors" "fmt" "io" @@ -32,7 +33,6 @@ import ( "gopkg.in/gcfg.v1" "github.com/golang/glog" - "golang.org/x/net/context" "k8s.io/api/core/v1" k8stypes "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/informers" diff --git a/pkg/cloudprovider/providers/vsphere/vsphere_test.go b/pkg/cloudprovider/providers/vsphere/vsphere_test.go index 86a0c4026ed..6e5e2b04f42 100644 --- a/pkg/cloudprovider/providers/vsphere/vsphere_test.go +++ b/pkg/cloudprovider/providers/vsphere/vsphere_test.go @@ -17,13 +17,13 @@ limitations under the License. package vsphere import ( + "context" "log" "os" "strconv" "strings" "testing" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/rand" "k8s.io/kubernetes/pkg/cloudprovider" diff --git a/pkg/kubelet/cm/devicemanager/BUILD b/pkg/kubelet/cm/devicemanager/BUILD index 051eaeef372..f23bfc488e2 100644 --- a/pkg/kubelet/cm/devicemanager/BUILD +++ b/pkg/kubelet/cm/devicemanager/BUILD @@ -23,7 +23,6 @@ go_library( "//pkg/scheduler/schedulercache:go_default_library", "//pkg/util/filesystem:go_default_library", "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", diff --git a/pkg/kubelet/cm/devicemanager/device_plugin_stub.go b/pkg/kubelet/cm/devicemanager/device_plugin_stub.go index a7c3fd38bb5..f858b4fe149 100644 --- a/pkg/kubelet/cm/devicemanager/device_plugin_stub.go +++ b/pkg/kubelet/cm/devicemanager/device_plugin_stub.go @@ -17,13 +17,13 @@ limitations under the License. package devicemanager import ( + "context" "log" "net" "os" "path" "time" - "golang.org/x/net/context" "google.golang.org/grpc" pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1" diff --git a/pkg/kubelet/cm/devicemanager/endpoint.go b/pkg/kubelet/cm/devicemanager/endpoint.go index 26b3952d041..3ed35a1e004 100644 --- a/pkg/kubelet/cm/devicemanager/endpoint.go +++ b/pkg/kubelet/cm/devicemanager/endpoint.go @@ -17,13 +17,13 @@ limitations under the License. package devicemanager import ( + "context" "fmt" "net" "sync" "time" "github.com/golang/glog" - "golang.org/x/net/context" "google.golang.org/grpc" pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1" diff --git a/pkg/kubelet/cm/devicemanager/manager.go b/pkg/kubelet/cm/devicemanager/manager.go index c8cc0065890..886315dd7e8 100644 --- a/pkg/kubelet/cm/devicemanager/manager.go +++ b/pkg/kubelet/cm/devicemanager/manager.go @@ -17,6 +17,7 @@ limitations under the License. package devicemanager import ( + "context" "encoding/json" "fmt" "net" @@ -26,7 +27,6 @@ import ( "time" "github.com/golang/glog" - "golang.org/x/net/context" "google.golang.org/grpc" "k8s.io/api/core/v1" diff --git a/pkg/kubelet/dockershim/BUILD b/pkg/kubelet/dockershim/BUILD index 2429b526375..c401eb84176 100644 --- a/pkg/kubelet/dockershim/BUILD +++ b/pkg/kubelet/dockershim/BUILD @@ -112,7 +112,6 @@ go_library( "//vendor/github.com/docker/docker/pkg/jsonmessage:go_default_library", "//vendor/github.com/docker/go-connections/nat:go_default_library", "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", @@ -167,7 +166,6 @@ go_test( "//vendor/github.com/golang/mock/gomock:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", ], ) diff --git a/pkg/kubelet/dockershim/docker_container.go b/pkg/kubelet/dockershim/docker_container.go index e1036363600..acd5bf10ea8 100644 --- a/pkg/kubelet/dockershim/docker_container.go +++ b/pkg/kubelet/dockershim/docker_container.go @@ -17,6 +17,7 @@ limitations under the License. package dockershim import ( + "context" "fmt" "os" "path/filepath" @@ -27,7 +28,6 @@ import ( dockerfilters "github.com/docker/docker/api/types/filters" dockerstrslice "github.com/docker/docker/api/types/strslice" "github.com/golang/glog" - "golang.org/x/net/context" runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" diff --git a/pkg/kubelet/dockershim/docker_container_test.go b/pkg/kubelet/dockershim/docker_container_test.go index 640ab2d50df..2e545d25c11 100644 --- a/pkg/kubelet/dockershim/docker_container_test.go +++ b/pkg/kubelet/dockershim/docker_container_test.go @@ -17,6 +17,7 @@ limitations under the License. package dockershim import ( + "context" "fmt" "path/filepath" "strings" @@ -26,7 +27,6 @@ import ( dockertypes "github.com/docker/docker/api/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/net/context" runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" diff --git a/pkg/kubelet/dockershim/docker_image.go b/pkg/kubelet/dockershim/docker_image.go index a55656142b5..e4c450bc8b0 100644 --- a/pkg/kubelet/dockershim/docker_image.go +++ b/pkg/kubelet/dockershim/docker_image.go @@ -17,13 +17,13 @@ limitations under the License. package dockershim import ( + "context" "fmt" "net/http" dockertypes "github.com/docker/docker/api/types" dockerfilters "github.com/docker/docker/api/types/filters" "github.com/docker/docker/pkg/jsonmessage" - "golang.org/x/net/context" "github.com/golang/glog" runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" diff --git a/pkg/kubelet/dockershim/docker_image_linux.go b/pkg/kubelet/dockershim/docker_image_linux.go index c823f91376d..3409fa14743 100644 --- a/pkg/kubelet/dockershim/docker_image_linux.go +++ b/pkg/kubelet/dockershim/docker_image_linux.go @@ -19,10 +19,9 @@ limitations under the License. package dockershim import ( + "context" "fmt" - "golang.org/x/net/context" - runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" ) diff --git a/pkg/kubelet/dockershim/docker_image_unsupported.go b/pkg/kubelet/dockershim/docker_image_unsupported.go index 36fbd7cc638..41eed99276e 100644 --- a/pkg/kubelet/dockershim/docker_image_unsupported.go +++ b/pkg/kubelet/dockershim/docker_image_unsupported.go @@ -19,10 +19,9 @@ limitations under the License. package dockershim import ( + "context" "fmt" - "golang.org/x/net/context" - runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" ) diff --git a/pkg/kubelet/dockershim/docker_image_windows.go b/pkg/kubelet/dockershim/docker_image_windows.go index 70340561483..38fe998be0d 100644 --- a/pkg/kubelet/dockershim/docker_image_windows.go +++ b/pkg/kubelet/dockershim/docker_image_windows.go @@ -19,10 +19,10 @@ limitations under the License. package dockershim import ( + "context" "time" "github.com/golang/glog" - "golang.org/x/net/context" runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" "k8s.io/kubernetes/pkg/kubelet/winstats" diff --git a/pkg/kubelet/dockershim/docker_logs.go b/pkg/kubelet/dockershim/docker_logs.go index 5366c298270..76bfb4ba589 100644 --- a/pkg/kubelet/dockershim/docker_logs.go +++ b/pkg/kubelet/dockershim/docker_logs.go @@ -17,10 +17,9 @@ limitations under the License. package dockershim import ( + "context" "fmt" - "golang.org/x/net/context" - runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" ) diff --git a/pkg/kubelet/dockershim/docker_sandbox.go b/pkg/kubelet/dockershim/docker_sandbox.go index dd150d8db0c..af0d818416b 100644 --- a/pkg/kubelet/dockershim/docker_sandbox.go +++ b/pkg/kubelet/dockershim/docker_sandbox.go @@ -17,6 +17,7 @@ limitations under the License. package dockershim import ( + "context" "fmt" "os" "strings" @@ -26,7 +27,6 @@ import ( dockercontainer "github.com/docker/docker/api/types/container" dockerfilters "github.com/docker/docker/api/types/filters" "github.com/golang/glog" - "golang.org/x/net/context" utilerrors "k8s.io/apimachinery/pkg/util/errors" runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" diff --git a/pkg/kubelet/dockershim/docker_service.go b/pkg/kubelet/dockershim/docker_service.go index 82828d0df68..67c8af7b5a4 100644 --- a/pkg/kubelet/dockershim/docker_service.go +++ b/pkg/kubelet/dockershim/docker_service.go @@ -17,6 +17,7 @@ limitations under the License. package dockershim import ( + "context" "fmt" "net/http" "sync" @@ -25,7 +26,6 @@ import ( "github.com/blang/semver" dockertypes "github.com/docker/docker/api/types" "github.com/golang/glog" - "golang.org/x/net/context" "k8s.io/api/core/v1" runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" diff --git a/pkg/kubelet/dockershim/docker_stats_linux.go b/pkg/kubelet/dockershim/docker_stats_linux.go index e8b54ac1df3..ab3c675d8c8 100644 --- a/pkg/kubelet/dockershim/docker_stats_linux.go +++ b/pkg/kubelet/dockershim/docker_stats_linux.go @@ -19,9 +19,9 @@ limitations under the License. package dockershim import ( + "context" "fmt" - "golang.org/x/net/context" runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" ) diff --git a/pkg/kubelet/dockershim/docker_stats_unsupported.go b/pkg/kubelet/dockershim/docker_stats_unsupported.go index 72b6409c7eb..6591a9e3876 100644 --- a/pkg/kubelet/dockershim/docker_stats_unsupported.go +++ b/pkg/kubelet/dockershim/docker_stats_unsupported.go @@ -19,10 +19,9 @@ limitations under the License. package dockershim import ( + "context" "fmt" - "golang.org/x/net/context" - runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" ) diff --git a/pkg/kubelet/dockershim/docker_stats_windows.go b/pkg/kubelet/dockershim/docker_stats_windows.go index 644dffd584a..a67a0511a04 100644 --- a/pkg/kubelet/dockershim/docker_stats_windows.go +++ b/pkg/kubelet/dockershim/docker_stats_windows.go @@ -19,10 +19,9 @@ limitations under the License. package dockershim import ( + "context" "time" - "golang.org/x/net/context" - runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" ) diff --git a/pkg/kubelet/dockershim/docker_streaming.go b/pkg/kubelet/dockershim/docker_streaming.go index bb0a4a63728..d65b970041a 100644 --- a/pkg/kubelet/dockershim/docker_streaming.go +++ b/pkg/kubelet/dockershim/docker_streaming.go @@ -18,6 +18,7 @@ package dockershim import ( "bytes" + "context" "fmt" "io" "math" @@ -27,7 +28,6 @@ import ( dockertypes "github.com/docker/docker/api/types" "github.com/golang/glog" - "golang.org/x/net/context" "k8s.io/client-go/tools/remotecommand" runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" diff --git a/pkg/kubelet/dockershim/libdocker/BUILD b/pkg/kubelet/dockershim/libdocker/BUILD index e3e75cff4c7..73b1d79fa77 100644 --- a/pkg/kubelet/dockershim/libdocker/BUILD +++ b/pkg/kubelet/dockershim/libdocker/BUILD @@ -40,7 +40,6 @@ go_library( "//vendor/github.com/docker/docker/pkg/stdcopy:go_default_library", "//vendor/github.com/golang/glog:go_default_library", "//vendor/github.com/opencontainers/go-digest:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", ], diff --git a/pkg/kubelet/dockershim/libdocker/kube_docker_client.go b/pkg/kubelet/dockershim/libdocker/kube_docker_client.go index 0cc0c3ae039..86fabe163b0 100644 --- a/pkg/kubelet/dockershim/libdocker/kube_docker_client.go +++ b/pkg/kubelet/dockershim/libdocker/kube_docker_client.go @@ -18,6 +18,7 @@ package libdocker import ( "bytes" + "context" "encoding/base64" "encoding/json" "fmt" @@ -35,7 +36,6 @@ import ( dockerapi "github.com/docker/docker/client" dockermessage "github.com/docker/docker/pkg/jsonmessage" dockerstdcopy "github.com/docker/docker/pkg/stdcopy" - "golang.org/x/net/context" ) // kubeDockerClient is a wrapped layer of docker client for kubelet internal use. This layer is added to: diff --git a/pkg/kubelet/remote/BUILD b/pkg/kubelet/remote/BUILD index 6f3112676d5..05c6efd271a 100644 --- a/pkg/kubelet/remote/BUILD +++ b/pkg/kubelet/remote/BUILD @@ -20,7 +20,6 @@ go_library( "//pkg/kubelet/apis/cri/runtime/v1alpha2:go_default_library", "//pkg/kubelet/util:go_default_library", "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], diff --git a/pkg/kubelet/remote/fake/BUILD b/pkg/kubelet/remote/fake/BUILD index 883c78248d4..a8db6e73c6f 100644 --- a/pkg/kubelet/remote/fake/BUILD +++ b/pkg/kubelet/remote/fake/BUILD @@ -55,7 +55,6 @@ go_library( "//pkg/kubelet/apis/cri/runtime/v1alpha2:go_default_library", "//pkg/kubelet/apis/cri/testing:go_default_library", "//pkg/kubelet/util:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], diff --git a/pkg/kubelet/remote/fake/fake_image_service.go b/pkg/kubelet/remote/fake/fake_image_service.go index cdb90b927d6..1f89b457abe 100644 --- a/pkg/kubelet/remote/fake/fake_image_service.go +++ b/pkg/kubelet/remote/fake/fake_image_service.go @@ -17,7 +17,8 @@ limitations under the License. package fake import ( - "golang.org/x/net/context" + "context" + kubeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" ) diff --git a/pkg/kubelet/remote/fake/fake_runtime.go b/pkg/kubelet/remote/fake/fake_runtime.go index e6a7ce93b33..ebb826e276e 100644 --- a/pkg/kubelet/remote/fake/fake_runtime.go +++ b/pkg/kubelet/remote/fake/fake_runtime.go @@ -17,10 +17,10 @@ limitations under the License. package fake import ( + "context" "fmt" "time" - "golang.org/x/net/context" "google.golang.org/grpc" kubeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" apitest "k8s.io/kubernetes/pkg/kubelet/apis/cri/testing" diff --git a/pkg/kubelet/remote/remote_runtime.go b/pkg/kubelet/remote/remote_runtime.go index 9860d735655..109a1dc5c36 100644 --- a/pkg/kubelet/remote/remote_runtime.go +++ b/pkg/kubelet/remote/remote_runtime.go @@ -17,13 +17,13 @@ limitations under the License. package remote import ( + "context" "errors" "fmt" "strings" "time" "github.com/golang/glog" - "golang.org/x/net/context" "google.golang.org/grpc" internalapi "k8s.io/kubernetes/pkg/kubelet/apis/cri" diff --git a/pkg/kubelet/remote/utils.go b/pkg/kubelet/remote/utils.go index bd86492ac33..91532f11f89 100644 --- a/pkg/kubelet/remote/utils.go +++ b/pkg/kubelet/remote/utils.go @@ -17,11 +17,10 @@ limitations under the License. package remote import ( + "context" "fmt" "time" - "golang.org/x/net/context" - runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" ) diff --git a/pkg/kubelet/rkt/BUILD b/pkg/kubelet/rkt/BUILD index 83c07f979b1..efd1a3de510 100644 --- a/pkg/kubelet/rkt/BUILD +++ b/pkg/kubelet/rkt/BUILD @@ -46,7 +46,6 @@ go_library( "//vendor/github.com/coreos/rkt/api/v1alpha:go_default_library", "//vendor/github.com/docker/docker/api/types:go_default_library", "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -83,7 +82,6 @@ go_test( "//vendor/github.com/coreos/rkt/api/v1alpha:go_default_library", "//vendor/github.com/golang/mock/gomock:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", diff --git a/pkg/kubelet/rkt/config.go b/pkg/kubelet/rkt/config.go index ebdf34a1e77..993b79b4fc4 100644 --- a/pkg/kubelet/rkt/config.go +++ b/pkg/kubelet/rkt/config.go @@ -17,10 +17,10 @@ limitations under the License. package rkt import ( + "context" "fmt" rktapi "github.com/coreos/rkt/api/v1alpha" - "golang.org/x/net/context" ) // Config stores the global configuration for the rkt runtime. diff --git a/pkg/kubelet/rkt/fake_rkt_interface_test.go b/pkg/kubelet/rkt/fake_rkt_interface_test.go index 90ca9c35c9d..077e4ebd8b8 100644 --- a/pkg/kubelet/rkt/fake_rkt_interface_test.go +++ b/pkg/kubelet/rkt/fake_rkt_interface_test.go @@ -17,6 +17,7 @@ limitations under the License. package rkt import ( + "context" "fmt" "strconv" "strings" @@ -24,7 +25,6 @@ import ( "github.com/coreos/go-systemd/dbus" rktapi "github.com/coreos/rkt/api/v1alpha" - "golang.org/x/net/context" "google.golang.org/grpc" "k8s.io/apimachinery/pkg/types" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" diff --git a/pkg/kubelet/rkt/image.go b/pkg/kubelet/rkt/image.go index 180dcfa51a3..25d17ca8e0b 100644 --- a/pkg/kubelet/rkt/image.go +++ b/pkg/kubelet/rkt/image.go @@ -18,6 +18,7 @@ limitations under the License. package rkt import ( + "context" "encoding/json" "fmt" "io/ioutil" @@ -32,7 +33,7 @@ import ( rktapi "github.com/coreos/rkt/api/v1alpha" dockertypes "github.com/docker/docker/api/types" "github.com/golang/glog" - "golang.org/x/net/context" + "k8s.io/api/core/v1" "k8s.io/kubernetes/pkg/credentialprovider" credentialprovidersecrets "k8s.io/kubernetes/pkg/credentialprovider/secrets" diff --git a/pkg/kubelet/rkt/log.go b/pkg/kubelet/rkt/log.go index c1ca5875a8e..b8110c1a863 100644 --- a/pkg/kubelet/rkt/log.go +++ b/pkg/kubelet/rkt/log.go @@ -17,13 +17,13 @@ limitations under the License. package rkt import ( + "context" "fmt" "io" "strings" "time" "github.com/golang/glog" - "golang.org/x/net/context" rktapi "github.com/coreos/rkt/api/v1alpha" "k8s.io/api/core/v1" diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go index b15edf2c10f..0eda01b6ca7 100644 --- a/pkg/kubelet/rkt/rkt.go +++ b/pkg/kubelet/rkt/rkt.go @@ -19,6 +19,7 @@ package rkt import ( "bufio" "bytes" + "context" "encoding/json" "fmt" "io" @@ -39,7 +40,6 @@ import ( "github.com/coreos/go-systemd/unit" rktapi "github.com/coreos/rkt/api/v1alpha" "github.com/golang/glog" - "golang.org/x/net/context" "google.golang.org/grpc" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/kubelet/rkt/version.go b/pkg/kubelet/rkt/version.go index 3609bf97b17..d94e7ea943c 100644 --- a/pkg/kubelet/rkt/version.go +++ b/pkg/kubelet/rkt/version.go @@ -17,11 +17,11 @@ limitations under the License. package rkt import ( + "context" "fmt" "sync" rktapi "github.com/coreos/rkt/api/v1alpha" - "golang.org/x/net/context" utilversion "k8s.io/kubernetes/pkg/util/version" ) diff --git a/pkg/registry/core/pod/storage/BUILD b/pkg/registry/core/pod/storage/BUILD index c409b87a37b..7df41837149 100644 --- a/pkg/registry/core/pod/storage/BUILD +++ b/pkg/registry/core/pod/storage/BUILD @@ -14,7 +14,6 @@ go_test( "//pkg/apis/core:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/securitycontext:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", diff --git a/pkg/registry/core/pod/storage/storage_test.go b/pkg/registry/core/pod/storage/storage_test.go index f25e682cb71..707caceb412 100644 --- a/pkg/registry/core/pod/storage/storage_test.go +++ b/pkg/registry/core/pod/storage/storage_test.go @@ -17,11 +17,11 @@ limitations under the License. package storage import ( + "context" "strings" "testing" "time" - "golang.org/x/net/context" "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" diff --git a/pkg/registry/core/service/allocator/storage/BUILD b/pkg/registry/core/service/allocator/storage/BUILD index d77f66c405d..ce71b7a4a5b 100644 --- a/pkg/registry/core/service/allocator/storage/BUILD +++ b/pkg/registry/core/service/allocator/storage/BUILD @@ -14,7 +14,6 @@ go_test( "//pkg/apis/core:go_default_library", "//pkg/registry/core/service/allocator:go_default_library", "//pkg/registry/registrytest:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/etcd/testing:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", ], @@ -28,7 +27,6 @@ go_library( "//pkg/apis/core:go_default_library", "//pkg/registry/core/rangeallocation:go_default_library", "//pkg/registry/core/service/allocator:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", diff --git a/pkg/registry/core/service/allocator/storage/storage.go b/pkg/registry/core/service/allocator/storage/storage.go index 03f28431ada..52a9acde08d 100644 --- a/pkg/registry/core/service/allocator/storage/storage.go +++ b/pkg/registry/core/service/allocator/storage/storage.go @@ -17,6 +17,7 @@ limitations under the License. package storage import ( + "context" "errors" "fmt" "sync" @@ -32,8 +33,6 @@ import ( api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/registry/core/rangeallocation" "k8s.io/kubernetes/pkg/registry/core/service/allocator" - - "golang.org/x/net/context" ) var ( diff --git a/pkg/registry/core/service/allocator/storage/storage_test.go b/pkg/registry/core/service/allocator/storage/storage_test.go index a0f2cceb6a3..aaacb0f86dd 100644 --- a/pkg/registry/core/service/allocator/storage/storage_test.go +++ b/pkg/registry/core/service/allocator/storage/storage_test.go @@ -17,6 +17,7 @@ limitations under the License. package storage import ( + "context" "strings" "testing" @@ -25,8 +26,6 @@ import ( api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/registry/core/service/allocator" "k8s.io/kubernetes/pkg/registry/registrytest" - - "golang.org/x/net/context" ) func newStorage(t *testing.T) (*Etcd, *etcdtesting.EtcdTestServer, allocator.Interface, *storagebackend.Config) { diff --git a/pkg/registry/core/service/ipallocator/storage/BUILD b/pkg/registry/core/service/ipallocator/storage/BUILD index 3c7b085caaf..d3597b78b88 100644 --- a/pkg/registry/core/service/ipallocator/storage/BUILD +++ b/pkg/registry/core/service/ipallocator/storage/BUILD @@ -16,7 +16,6 @@ go_test( "//pkg/registry/core/service/allocator/storage:go_default_library", "//pkg/registry/core/service/ipallocator:go_default_library", "//pkg/registry/registrytest:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/etcd/testing:go_default_library", diff --git a/pkg/registry/core/service/ipallocator/storage/storage_test.go b/pkg/registry/core/service/ipallocator/storage/storage_test.go index f70197d7298..85fb2bce544 100644 --- a/pkg/registry/core/service/ipallocator/storage/storage_test.go +++ b/pkg/registry/core/service/ipallocator/storage/storage_test.go @@ -17,6 +17,7 @@ limitations under the License. package storage import ( + "context" "net" "strings" "testing" @@ -30,8 +31,6 @@ import ( allocatorstore "k8s.io/kubernetes/pkg/registry/core/service/allocator/storage" "k8s.io/kubernetes/pkg/registry/core/service/ipallocator" "k8s.io/kubernetes/pkg/registry/registrytest" - - "golang.org/x/net/context" ) func newStorage(t *testing.T) (*etcdtesting.EtcdTestServer, ipallocator.Interface, allocator.Interface, storage.Interface, factory.DestroyFunc) { diff --git a/pkg/volume/csi/BUILD b/pkg/volume/csi/BUILD index 8cdba0adbd4..3e0b9672e6f 100644 --- a/pkg/volume/csi/BUILD +++ b/pkg/volume/csi/BUILD @@ -18,7 +18,6 @@ go_library( "//pkg/volume/util:go_default_library", "//vendor/github.com/container-storage-interface/spec/lib/go/csi/v0:go_default_library", "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/storage/v1beta1:go_default_library", @@ -43,7 +42,6 @@ go_test( "//pkg/volume:go_default_library", "//pkg/volume/csi/fake:go_default_library", "//pkg/volume/testing:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/storage/v1beta1:go_default_library", diff --git a/pkg/volume/csi/csi_attacher.go b/pkg/volume/csi/csi_attacher.go index 720cbce04da..d60ec3b1157 100644 --- a/pkg/volume/csi/csi_attacher.go +++ b/pkg/volume/csi/csi_attacher.go @@ -17,6 +17,7 @@ limitations under the License. package csi import ( + "context" "crypto/sha256" "errors" "fmt" @@ -27,7 +28,6 @@ import ( "time" "github.com/golang/glog" - grpctx "golang.org/x/net/context" csipb "github.com/container-storage-interface/spec/lib/go/csi/v0" "k8s.io/api/core/v1" @@ -284,7 +284,7 @@ func (c *csiAttacher) MountDevice(spec *volume.Spec, devicePath string, deviceMo } csi := c.csiClient - ctx, cancel := grpctx.WithTimeout(grpctx.Background(), csiTimeout) + ctx, cancel := context.WithTimeout(context.Background(), csiTimeout) defer cancel() // Check whether "STAGE_UNSTAGE_VOLUME" is set stageUnstageSet, err := hasStageUnstageCapability(ctx, csi) @@ -475,7 +475,7 @@ func (c *csiAttacher) UnmountDevice(deviceMountPath string) error { } csi := c.csiClient - ctx, cancel := grpctx.WithTimeout(grpctx.Background(), csiTimeout) + ctx, cancel := context.WithTimeout(context.Background(), csiTimeout) defer cancel() // Check whether "STAGE_UNSTAGE_VOLUME" is set stageUnstageSet, err := hasStageUnstageCapability(ctx, csi) @@ -502,7 +502,7 @@ func (c *csiAttacher) UnmountDevice(deviceMountPath string) error { return nil } -func hasStageUnstageCapability(ctx grpctx.Context, csi csiClient) (bool, error) { +func hasStageUnstageCapability(ctx context.Context, csi csiClient) (bool, error) { capabilities, err := csi.NodeGetCapabilities(ctx) if err != nil { return false, err diff --git a/pkg/volume/csi/csi_client.go b/pkg/volume/csi/csi_client.go index 4ec6f9575b7..e9283efbf18 100644 --- a/pkg/volume/csi/csi_client.go +++ b/pkg/volume/csi/csi_client.go @@ -17,20 +17,20 @@ limitations under the License. package csi import ( + "context" "errors" "net" "time" csipb "github.com/container-storage-interface/spec/lib/go/csi/v0" "github.com/golang/glog" - grpctx "golang.org/x/net/context" "google.golang.org/grpc" api "k8s.io/api/core/v1" ) type csiClient interface { NodePublishVolume( - ctx grpctx.Context, + ctx context.Context, volumeid string, readOnly bool, stagingTargetPath string, @@ -42,11 +42,11 @@ type csiClient interface { fsType string, ) error NodeUnpublishVolume( - ctx grpctx.Context, + ctx context.Context, volID string, targetPath string, ) error - NodeStageVolume(ctx grpctx.Context, + NodeStageVolume(ctx context.Context, volID string, publishVolumeInfo map[string]string, stagingTargetPath string, @@ -55,8 +55,8 @@ type csiClient interface { nodeStageSecrets map[string]string, volumeAttribs map[string]string, ) error - NodeUnstageVolume(ctx grpctx.Context, volID, stagingTargetPath string) error - NodeGetCapabilities(ctx grpctx.Context) ([]*csipb.NodeServiceCapability, error) + NodeUnstageVolume(ctx context.Context, volID, stagingTargetPath string) error + NodeGetCapabilities(ctx context.Context) ([]*csipb.NodeServiceCapability, error) } // csiClient encapsulates all csi-plugin methods @@ -103,7 +103,7 @@ func (c *csiDriverClient) assertConnection() error { } func (c *csiDriverClient) NodePublishVolume( - ctx grpctx.Context, + ctx context.Context, volID string, readOnly bool, stagingTargetPath string, @@ -152,7 +152,7 @@ func (c *csiDriverClient) NodePublishVolume( return err } -func (c *csiDriverClient) NodeUnpublishVolume(ctx grpctx.Context, volID string, targetPath string) error { +func (c *csiDriverClient) NodeUnpublishVolume(ctx context.Context, volID string, targetPath string) error { glog.V(4).Info(log("calling NodeUnpublishVolume rpc: [volid=%s, target_path=%s", volID, targetPath)) if volID == "" { return errors.New("missing volume id") @@ -174,7 +174,7 @@ func (c *csiDriverClient) NodeUnpublishVolume(ctx grpctx.Context, volID string, return err } -func (c *csiDriverClient) NodeStageVolume(ctx grpctx.Context, +func (c *csiDriverClient) NodeStageVolume(ctx context.Context, volID string, publishInfo map[string]string, stagingTargetPath string, @@ -217,7 +217,7 @@ func (c *csiDriverClient) NodeStageVolume(ctx grpctx.Context, return err } -func (c *csiDriverClient) NodeUnstageVolume(ctx grpctx.Context, volID, stagingTargetPath string) error { +func (c *csiDriverClient) NodeUnstageVolume(ctx context.Context, volID, stagingTargetPath string) error { glog.V(4).Info(log("calling NodeUnstageVolume rpc [volid=%s,staging_target_path=%s]", volID, stagingTargetPath)) if volID == "" { return errors.New("missing volume id") @@ -238,7 +238,7 @@ func (c *csiDriverClient) NodeUnstageVolume(ctx grpctx.Context, volID, stagingTa return err } -func (c *csiDriverClient) NodeGetCapabilities(ctx grpctx.Context) ([]*csipb.NodeServiceCapability, error) { +func (c *csiDriverClient) NodeGetCapabilities(ctx context.Context) ([]*csipb.NodeServiceCapability, error) { glog.V(4).Info(log("calling NodeGetCapabilities rpc")) if err := c.assertConnection(); err != nil { glog.Errorf("%v: failed to assert a connection: %v", csiPluginName, err) diff --git a/pkg/volume/csi/csi_client_test.go b/pkg/volume/csi/csi_client_test.go index 753396add36..d4c843ef1bf 100644 --- a/pkg/volume/csi/csi_client_test.go +++ b/pkg/volume/csi/csi_client_test.go @@ -17,10 +17,10 @@ limitations under the License. package csi import ( + "context" "errors" "testing" - grpctx "golang.org/x/net/context" "google.golang.org/grpc" api "k8s.io/api/core/v1" "k8s.io/kubernetes/pkg/volume/csi/fake" @@ -60,7 +60,7 @@ func TestClientNodePublishVolume(t *testing.T) { t.Logf("test case: %s", tc.name) client.nodeClient.(*fake.NodeClient).SetNextError(tc.err) err := client.NodePublishVolume( - grpctx.Background(), + context.Background(), tc.volID, false, "", @@ -97,7 +97,7 @@ func TestClientNodeUnpublishVolume(t *testing.T) { for _, tc := range testCases { t.Logf("test case: %s", tc.name) client.nodeClient.(*fake.NodeClient).SetNextError(tc.err) - err := client.NodeUnpublishVolume(grpctx.Background(), tc.volID, tc.targetPath) + err := client.NodeUnpublishVolume(context.Background(), tc.volID, tc.targetPath) if tc.mustFail && err == nil { t.Error("test must fail, but err is nil") } @@ -127,7 +127,7 @@ func TestClientNodeStageVolume(t *testing.T) { t.Logf("Running test case: %s", tc.name) client.nodeClient.(*fake.NodeClient).SetNextError(tc.err) err := client.NodeStageVolume( - grpctx.Background(), + context.Background(), tc.volID, map[string]string{"device": "/dev/null"}, tc.stagingTargetPath, @@ -163,7 +163,7 @@ func TestClientNodeUnstageVolume(t *testing.T) { t.Logf("Running test case: %s", tc.name) client.nodeClient.(*fake.NodeClient).SetNextError(tc.err) err := client.NodeUnstageVolume( - grpctx.Background(), + context.Background(), tc.volID, tc.stagingTargetPath, ) if tc.mustFail && err == nil { diff --git a/pkg/volume/csi/csi_mounter.go b/pkg/volume/csi/csi_mounter.go index 213d0b58200..32eea05b37d 100644 --- a/pkg/volume/csi/csi_mounter.go +++ b/pkg/volume/csi/csi_mounter.go @@ -17,6 +17,7 @@ limitations under the License. package csi import ( + "context" "encoding/json" "errors" "fmt" @@ -24,7 +25,7 @@ import ( "path" "github.com/golang/glog" - grpctx "golang.org/x/net/context" + api "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -118,7 +119,7 @@ func (c *csiMountMgr) SetUpAt(dir string, fsGroup *int64) error { nodeName := string(c.plugin.host.GetNodeName()) attachID := getAttachmentName(csiSource.VolumeHandle, csiSource.Driver, nodeName) - ctx, cancel := grpctx.WithTimeout(grpctx.Background(), csiTimeout) + ctx, cancel := context.WithTimeout(context.Background(), csiTimeout) defer cancel() // Check for STAGE_UNSTAGE_VOLUME set and populate deviceMountPath if so deviceMountPath := "" @@ -272,7 +273,7 @@ func (c *csiMountMgr) TearDownAt(dir string) error { c.csiClient = client } - ctx, cancel := grpctx.WithTimeout(grpctx.Background(), csiTimeout) + ctx, cancel := context.WithTimeout(context.Background(), csiTimeout) defer cancel() csi := c.csiClient diff --git a/pkg/volume/csi/fake/BUILD b/pkg/volume/csi/fake/BUILD index 1f715f0c1d5..4c32879373f 100644 --- a/pkg/volume/csi/fake/BUILD +++ b/pkg/volume/csi/fake/BUILD @@ -7,7 +7,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//vendor/github.com/container-storage-interface/spec/lib/go/csi/v0:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", ], ) diff --git a/pkg/volume/csi/fake/fake_client.go b/pkg/volume/csi/fake/fake_client.go index ce95ff94736..805f73ca20b 100644 --- a/pkg/volume/csi/fake/fake_client.go +++ b/pkg/volume/csi/fake/fake_client.go @@ -24,7 +24,6 @@ import ( "google.golang.org/grpc" csipb "github.com/container-storage-interface/spec/lib/go/csi/v0" - grpctx "golang.org/x/net/context" ) // IdentityClient is a CSI identity client used for testing @@ -94,7 +93,7 @@ func (f *NodeClient) AddNodeStagedVolume(volID, deviceMountPath string) { } // NodePublishVolume implements CSI NodePublishVolume -func (f *NodeClient) NodePublishVolume(ctx grpctx.Context, req *csipb.NodePublishVolumeRequest, opts ...grpc.CallOption) (*csipb.NodePublishVolumeResponse, error) { +func (f *NodeClient) NodePublishVolume(ctx context.Context, req *csipb.NodePublishVolumeRequest, opts ...grpc.CallOption) (*csipb.NodePublishVolumeResponse, error) { if f.nextErr != nil { return nil, f.nextErr diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/request/BUILD b/staging/src/k8s.io/apiserver/pkg/endpoints/request/BUILD index bda772f4e7e..0155e98b0f5 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/request/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/request/BUILD @@ -27,7 +27,6 @@ go_library( importpath = "k8s.io/apiserver/pkg/endpoints/request", deps = [ "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/request/context.go b/staging/src/k8s.io/apiserver/pkg/endpoints/request/context.go index e64facc5c4b..c4665ea3338 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/request/context.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/request/context.go @@ -17,10 +17,10 @@ limitations under the License. package request import ( + "context" stderrs "errors" "time" - "golang.org/x/net/context" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apiserver/pkg/apis/audit" diff --git a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/BUILD b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/BUILD index f6f70d86c16..f90f3df3a3c 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/BUILD @@ -57,7 +57,6 @@ go_library( importpath = "k8s.io/apiserver/pkg/registry/generic/registry", deps = [ "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/validation/path:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher.go b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher.go index d131ba80ea3..f589dd1ec48 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher.go @@ -17,10 +17,9 @@ limitations under the License. package registry import ( + "context" "net/http" - "golang.org/x/net/context" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" ) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/BUILD b/staging/src/k8s.io/apiserver/pkg/storage/BUILD index 712544e2da9..1218c464408 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/storage/BUILD @@ -49,7 +49,6 @@ go_library( importpath = "k8s.io/apiserver/pkg/storage", deps = [ "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/validation/path:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher.go index 9ffbbc5e957..ab4ab04f3a0 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher.go @@ -17,6 +17,7 @@ limitations under the License. package storage import ( + "context" "fmt" "net/http" "reflect" @@ -24,7 +25,6 @@ import ( "time" "github.com/golang/glog" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd/BUILD b/staging/src/k8s.io/apiserver/pkg/storage/etcd/BUILD index 0269e4e1dbe..ccdf63e5ccf 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd/BUILD @@ -16,7 +16,6 @@ go_test( embed = [":go_default_library"], deps = [ "//vendor/github.com/coreos/etcd/client:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -50,7 +49,6 @@ go_library( deps = [ "//vendor/github.com/coreos/etcd/client:go_default_library", "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_helper.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_helper.go index 510b293c71c..939e99fc518 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_helper.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_helper.go @@ -17,6 +17,7 @@ limitations under the License. package etcd import ( + "context" "errors" "fmt" "path" @@ -25,7 +26,6 @@ import ( etcd "github.com/coreos/etcd/client" "github.com/golang/glog" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/conversion" diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_helper_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_helper_test.go index 5ba57e48746..04f33fa1d34 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_helper_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_helper_test.go @@ -17,6 +17,7 @@ limitations under the License. package etcd import ( + "context" "fmt" "path" "reflect" @@ -26,7 +27,6 @@ import ( "time" etcd "github.com/coreos/etcd/client" - "golang.org/x/net/context" apitesting "k8s.io/apimachinery/pkg/api/testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher.go index 7c300b43052..21ffc42e57f 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher.go @@ -17,6 +17,7 @@ limitations under the License. package etcd import ( + "context" "fmt" "net/http" "reflect" @@ -32,7 +33,6 @@ import ( etcd "github.com/coreos/etcd/client" "github.com/golang/glog" - "golang.org/x/net/context" ) // Etcd watch event actions diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher_test.go index 4c4d038dce5..b2aff1c27e3 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher_test.go @@ -17,6 +17,7 @@ limitations under the License. package etcd import ( + "context" rt "runtime" "testing" @@ -35,7 +36,6 @@ import ( etcdtesting "k8s.io/apiserver/pkg/storage/etcd/testing" etcd "github.com/coreos/etcd/client" - "golang.org/x/net/context" ) var versioner = APIObjectVersioner{} diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd/testing/BUILD b/staging/src/k8s.io/apiserver/pkg/storage/etcd/testing/BUILD index 5d495404c6d..3da57302b88 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd/testing/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd/testing/BUILD @@ -20,7 +20,6 @@ go_library( "//vendor/github.com/coreos/etcd/pkg/transport:go_default_library", "//vendor/github.com/coreos/etcd/pkg/types:go_default_library", "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/etcd/etcdtest:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/etcd/testing/testingcert:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd/testing/utils.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd/testing/utils.go index 665662aaff8..deafcfce975 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd/testing/utils.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd/testing/utils.go @@ -32,6 +32,8 @@ import ( "k8s.io/apiserver/pkg/storage/etcd/testing/testingcert" "k8s.io/apiserver/pkg/storage/storagebackend" + "context" + etcd "github.com/coreos/etcd/client" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver" @@ -42,7 +44,6 @@ import ( "github.com/coreos/etcd/pkg/transport" "github.com/coreos/etcd/pkg/types" "github.com/golang/glog" - "golang.org/x/net/context" ) // EtcdTestServer encapsulates the datastructures needed to start local instance for testing diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/BUILD b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/BUILD index 29f7899503b..5e6974f8fb4 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/BUILD @@ -19,7 +19,6 @@ go_test( "//vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes:go_default_library", "//vendor/github.com/coreos/etcd/integration:go_default_library", "//vendor/github.com/coreos/pkg/capnslog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -54,7 +53,6 @@ go_library( "//vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes:go_default_library", "//vendor/github.com/coreos/etcd/mvcc/mvccpb:go_default_library", "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/compact.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/compact.go index 2bceacc8ee2..bdcd5bcb60d 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/compact.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/compact.go @@ -17,13 +17,13 @@ limitations under the License. package etcd3 import ( + "context" "strconv" "sync" "time" "github.com/coreos/etcd/clientv3" "github.com/golang/glog" - "golang.org/x/net/context" ) const ( diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/compact_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/compact_test.go index 021b8c451aa..72f21437d0b 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/compact_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/compact_test.go @@ -17,12 +17,12 @@ limitations under the License. package etcd3 import ( + "context" "testing" "github.com/coreos/etcd/clientv3" etcdrpc "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/integration" - "golang.org/x/net/context" ) func TestCompact(t *testing.T) { diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go index c83965b09c8..17384346a0b 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -18,6 +18,7 @@ package etcd3 import ( "bytes" + "context" "encoding/base64" "encoding/json" "errors" @@ -29,7 +30,6 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/golang/glog" - "golang.org/x/net/context" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go index d5937a9dc8c..10496fb7a0c 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go @@ -18,6 +18,7 @@ package etcd3 import ( "bytes" + "context" "encoding/base64" "encoding/json" "errors" @@ -30,7 +31,6 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/integration" "github.com/coreos/pkg/capnslog" - "golang.org/x/net/context" apierrors "k8s.io/apimachinery/pkg/api/errors" apitesting "k8s.io/apimachinery/pkg/api/testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go index 38aae2f1fa6..f09a000248d 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go @@ -17,6 +17,7 @@ limitations under the License. package etcd3 import ( + "context" "errors" "fmt" "os" @@ -32,7 +33,6 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/golang/glog" - "golang.org/x/net/context" ) const ( diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go index 6f01c4bd7fd..7b552e6ba79 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go @@ -17,6 +17,7 @@ limitations under the License. package etcd3 import ( + "context" "fmt" "reflect" "sync" @@ -25,7 +26,6 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/integration" - "golang.org/x/net/context" apitesting "k8s.io/apimachinery/pkg/api/testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/staging/src/k8s.io/apiserver/pkg/storage/interfaces.go b/staging/src/k8s.io/apiserver/pkg/storage/interfaces.go index 6241533bebc..227ab2b8ec3 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/interfaces.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/interfaces.go @@ -17,7 +17,8 @@ limitations under the License. package storage import ( - "golang.org/x/net/context" + "context" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" diff --git a/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD b/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD index 9b6666c8c53..60af39c3ccc 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD @@ -13,7 +13,6 @@ go_test( deps = [ "//vendor/github.com/coreos/etcd/integration:go_default_library", "//vendor/github.com/coreos/etcd/pkg/transport:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", @@ -37,7 +36,6 @@ go_library( "//vendor/github.com/coreos/etcd/client:go_default_library", "//vendor/github.com/coreos/etcd/clientv3:go_default_library", "//vendor/github.com/coreos/etcd/pkg/transport:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/etcd:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go b/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go index 48bba73110b..ed0dafda4fe 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go @@ -17,11 +17,11 @@ limitations under the License. package factory import ( + "context" "time" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/pkg/transport" - "golang.org/x/net/context" "k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage/etcd3" diff --git a/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/tls_test.go b/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/tls_test.go index 6e63c0989f1..d16e25a51fb 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/tls_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/tls_test.go @@ -17,6 +17,7 @@ limitations under the License. package factory import ( + "context" "io/ioutil" "os" "path" @@ -25,7 +26,6 @@ import ( "github.com/coreos/etcd/integration" "github.com/coreos/etcd/pkg/transport" - "golang.org/x/net/context" apitesting "k8s.io/apimachinery/pkg/api/testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/staging/src/k8s.io/apiserver/pkg/storage/testing/BUILD b/staging/src/k8s.io/apiserver/pkg/storage/testing/BUILD index 37c0195ec52..b18a1f031e3 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/testing/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/storage/testing/BUILD @@ -15,7 +15,6 @@ go_library( ], importpath = "k8s.io/apiserver/pkg/storage/testing", deps = [ - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go b/staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go index f6718dd5246..e226da6f62c 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go @@ -17,9 +17,9 @@ limitations under the License. package testing import ( + "context" "path" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/storage" diff --git a/staging/src/k8s.io/apiserver/pkg/storage/tests/BUILD b/staging/src/k8s.io/apiserver/pkg/storage/tests/BUILD index 85606843933..0e68834a2c5 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/tests/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/storage/tests/BUILD @@ -11,7 +11,6 @@ go_test( srcs = ["cacher_test.go"], embed = [":go_default_library"], deps = [ - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/storage/tests/cacher_test.go b/staging/src/k8s.io/apiserver/pkg/storage/tests/cacher_test.go index ed16f5b51f5..bd3034f08aa 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/tests/cacher_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/tests/cacher_test.go @@ -17,6 +17,7 @@ limitations under the License. package tests import ( + "context" "fmt" "reflect" goruntime "runtime" @@ -32,6 +33,7 @@ import ( "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" @@ -43,10 +45,6 @@ import ( etcdtesting "k8s.io/apiserver/pkg/storage/etcd/testing" "k8s.io/apiserver/pkg/storage/etcd3" "k8s.io/apiserver/pkg/storage/value" - - "golang.org/x/net/context" - - "k8s.io/apimachinery/pkg/runtime/serializer" ) var ( diff --git a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD index 32456390b23..f9bfef60b83 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD @@ -16,7 +16,6 @@ go_library( deps = [ "//vendor/github.com/golang/glog:go_default_library", "//vendor/github.com/hashicorp/golang-lru:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service.go b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service.go index ce910f856b0..a94e26f227a 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service.go @@ -18,6 +18,7 @@ limitations under the License. package envelope import ( + "context" "fmt" "net" "net/url" @@ -27,8 +28,6 @@ import ( "google.golang.org/grpc" - "golang.org/x/net/context" - kmsapi "k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1" ) diff --git a/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/BUILD b/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/BUILD index e57e896ae9c..96c1b6cfabb 100644 --- a/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/BUILD +++ b/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/BUILD @@ -19,7 +19,6 @@ go_library( importpath = "k8s.io/client-go/plugin/pkg/client/auth/gcp", deps = [ "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/golang.org/x/oauth2:go_default_library", "//vendor/golang.org/x/oauth2/google:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", diff --git a/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go b/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go index 3a4f86777bd..193d0c727bf 100644 --- a/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go +++ b/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go @@ -18,6 +18,7 @@ package gcp import ( "bytes" + "context" "encoding/json" "fmt" "net/http" @@ -27,7 +28,6 @@ import ( "time" "github.com/golang/glog" - "golang.org/x/net/context" "golang.org/x/oauth2" "golang.org/x/oauth2/google" "k8s.io/apimachinery/pkg/util/net" diff --git a/staging/src/k8s.io/client-go/tools/cache/BUILD b/staging/src/k8s.io/client-go/tools/cache/BUILD index 524354e87ca..6be2aecd52d 100644 --- a/staging/src/k8s.io/client-go/tools/cache/BUILD +++ b/staging/src/k8s.io/client-go/tools/cache/BUILD @@ -64,7 +64,6 @@ go_library( importpath = "k8s.io/client-go/tools/cache", deps = [ "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/staging/src/k8s.io/client-go/tools/cache/listwatch.go b/staging/src/k8s.io/client-go/tools/cache/listwatch.go index 06657a3b062..8bf41f517ef 100644 --- a/staging/src/k8s.io/client-go/tools/cache/listwatch.go +++ b/staging/src/k8s.io/client-go/tools/cache/listwatch.go @@ -17,10 +17,9 @@ limitations under the License. package cache import ( + "context" "time" - "golang.org/x/net/context" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" diff --git a/staging/src/k8s.io/client-go/tools/pager/BUILD b/staging/src/k8s.io/client-go/tools/pager/BUILD index 4d07429af82..c02def57f6c 100644 --- a/staging/src/k8s.io/client-go/tools/pager/BUILD +++ b/staging/src/k8s.io/client-go/tools/pager/BUILD @@ -11,7 +11,6 @@ go_library( srcs = ["pager.go"], importpath = "k8s.io/client-go/tools/pager", deps = [ - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", @@ -39,7 +38,6 @@ go_test( srcs = ["pager_test.go"], embed = [":go_default_library"], deps = [ - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/staging/src/k8s.io/client-go/tools/pager/pager.go b/staging/src/k8s.io/client-go/tools/pager/pager.go index 2e0874e0e5d..74ea3586ab8 100644 --- a/staging/src/k8s.io/client-go/tools/pager/pager.go +++ b/staging/src/k8s.io/client-go/tools/pager/pager.go @@ -17,10 +17,9 @@ limitations under the License. package pager import ( + "context" "fmt" - "golang.org/x/net/context" - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" diff --git a/staging/src/k8s.io/client-go/tools/pager/pager_test.go b/staging/src/k8s.io/client-go/tools/pager/pager_test.go index b905fc1fb6f..ae517cab207 100644 --- a/staging/src/k8s.io/client-go/tools/pager/pager_test.go +++ b/staging/src/k8s.io/client-go/tools/pager/pager_test.go @@ -17,11 +17,11 @@ limitations under the License. package pager import ( + "context" "fmt" "reflect" "testing" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/api/errors" metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/test/e2e/instrumentation/logging/stackdrvier/BUILD b/test/e2e/instrumentation/logging/stackdrvier/BUILD index dc2ad62b791..b9782f2623a 100644 --- a/test/e2e/instrumentation/logging/stackdrvier/BUILD +++ b/test/e2e/instrumentation/logging/stackdrvier/BUILD @@ -18,7 +18,6 @@ go_library( "//test/e2e/instrumentation/common:go_default_library", "//test/e2e/instrumentation/logging/utils:go_default_library", "//vendor/github.com/onsi/ginkgo:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/golang.org/x/oauth2/google:go_default_library", "//vendor/google.golang.org/api/logging/v2beta1:go_default_library", "//vendor/google.golang.org/api/pubsub/v1:go_default_library", diff --git a/test/e2e/instrumentation/logging/stackdrvier/utils.go b/test/e2e/instrumentation/logging/stackdrvier/utils.go index b0237822952..57367b58e3d 100644 --- a/test/e2e/instrumentation/logging/stackdrvier/utils.go +++ b/test/e2e/instrumentation/logging/stackdrvier/utils.go @@ -17,6 +17,7 @@ limitations under the License. package stackdriver import ( + "context" "encoding/base64" "encoding/json" "fmt" @@ -27,7 +28,6 @@ import ( "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/instrumentation/logging/utils" - "golang.org/x/net/context" "golang.org/x/oauth2/google" sd "google.golang.org/api/logging/v2beta1" pubsub "google.golang.org/api/pubsub/v1" diff --git a/test/e2e/storage/vsphere/BUILD b/test/e2e/storage/vsphere/BUILD index c06139f25e9..89e67dc5cb8 100644 --- a/test/e2e/storage/vsphere/BUILD +++ b/test/e2e/storage/vsphere/BUILD @@ -51,7 +51,6 @@ go_library( "//vendor/github.com/vmware/govmomi/vim25/mo:go_default_library", "//vendor/github.com/vmware/govmomi/vim25/soap:go_default_library", "//vendor/github.com/vmware/govmomi/vim25/types:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/gopkg.in/gcfg.v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", diff --git a/test/e2e/storage/vsphere/connection.go b/test/e2e/storage/vsphere/connection.go index d123a7f3421..60e8e40ac09 100644 --- a/test/e2e/storage/vsphere/connection.go +++ b/test/e2e/storage/vsphere/connection.go @@ -17,6 +17,7 @@ limitations under the License. package vsphere import ( + "context" "fmt" neturl "net/url" "sync" @@ -25,7 +26,6 @@ import ( "github.com/vmware/govmomi" "github.com/vmware/govmomi/session" "github.com/vmware/govmomi/vim25" - "golang.org/x/net/context" ) const ( diff --git a/test/e2e/storage/vsphere/nodemapper.go b/test/e2e/storage/vsphere/nodemapper.go index 7bdab0cf160..88122128553 100644 --- a/test/e2e/storage/vsphere/nodemapper.go +++ b/test/e2e/storage/vsphere/nodemapper.go @@ -17,14 +17,15 @@ limitations under the License. package vsphere import ( + "context" "errors" - "github.com/vmware/govmomi/object" - "github.com/vmware/govmomi/vim25/types" - "golang.org/x/net/context" - "k8s.io/api/core/v1" - "k8s.io/kubernetes/test/e2e/framework" "strings" "sync" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/vim25/types" + "k8s.io/api/core/v1" + "k8s.io/kubernetes/test/e2e/framework" ) type NodeMapper struct { diff --git a/test/e2e/storage/vsphere/vsphere.go b/test/e2e/storage/vsphere/vsphere.go index d5c52055997..f19a2d5f7aa 100644 --- a/test/e2e/storage/vsphere/vsphere.go +++ b/test/e2e/storage/vsphere/vsphere.go @@ -17,6 +17,7 @@ limitations under the License. package vsphere import ( + "context" "fmt" "path/filepath" "strconv" @@ -28,7 +29,6 @@ import ( "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" - "golang.org/x/net/context" "k8s.io/kubernetes/test/e2e/framework" ) diff --git a/test/e2e/storage/vsphere/vsphere_utils.go b/test/e2e/storage/vsphere/vsphere_utils.go index 51a21b029b9..f4fb2a817b1 100644 --- a/test/e2e/storage/vsphere/vsphere_utils.go +++ b/test/e2e/storage/vsphere/vsphere_utils.go @@ -17,19 +17,22 @@ limitations under the License. package vsphere import ( + "context" "fmt" "math/rand" "path/filepath" + "regexp" + "strings" "time" "github.com/golang/glog" . "github.com/onsi/gomega" + "github.com/vmware/govmomi/find" "github.com/vmware/govmomi/object" - "github.com/vmware/govmomi/vim25/mo" - vim25types "github.com/vmware/govmomi/vim25/types" - "golang.org/x/net/context" + vimtypes "github.com/vmware/govmomi/vim25/types" + "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/api/resource" @@ -40,12 +43,6 @@ import ( "k8s.io/kubernetes/pkg/volume/util" "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/storage/utils" - - "regexp" - "strings" - - "github.com/vmware/govmomi/find" - vimtypes "github.com/vmware/govmomi/vim25/types" ) const ( diff --git a/test/e2e/storage/vsphere/vsphere_volume_diskformat.go b/test/e2e/storage/vsphere/vsphere_volume_diskformat.go index 051089cfb83..9a94a5439f9 100644 --- a/test/e2e/storage/vsphere/vsphere_volume_diskformat.go +++ b/test/e2e/storage/vsphere/vsphere_volume_diskformat.go @@ -17,13 +17,14 @@ limitations under the License. package vsphere import ( + "context" "path/filepath" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" - "golang.org/x/net/context" + "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/uuid" diff --git a/test/e2e/storage/vsphere/vsphere_volume_node_delete.go b/test/e2e/storage/vsphere/vsphere_volume_node_delete.go index fe166e8d980..3daaadb8984 100644 --- a/test/e2e/storage/vsphere/vsphere_volume_node_delete.go +++ b/test/e2e/storage/vsphere/vsphere_volume_node_delete.go @@ -17,12 +17,12 @@ limitations under the License. package vsphere import ( + "context" "os" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/vmware/govmomi/object" - "golang.org/x/net/context" clientset "k8s.io/client-go/kubernetes" "k8s.io/kubernetes/test/e2e/framework" diff --git a/test/e2e/storage/vsphere/vsphere_volume_node_poweroff.go b/test/e2e/storage/vsphere/vsphere_volume_node_poweroff.go index 6cc861039ad..adf3fc7212a 100644 --- a/test/e2e/storage/vsphere/vsphere_volume_node_poweroff.go +++ b/test/e2e/storage/vsphere/vsphere_volume_node_poweroff.go @@ -17,15 +17,15 @@ limitations under the License. package vsphere import ( + "context" "fmt" "time" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "golang.org/x/net/context" - "github.com/vmware/govmomi/object" vimtypes "github.com/vmware/govmomi/vim25/types" + "k8s.io/api/core/v1" extensions "k8s.io/api/extensions/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -111,7 +111,8 @@ var _ = utils.SIGDescribe("Node Poweroff [Feature:vsphere] [Slow] [Disruptive]", nodeInfo := TestContext.NodeMapper.GetNodeInfo(node1) vm := object.NewVirtualMachine(nodeInfo.VSphere.Client.Client, nodeInfo.VirtualMachineRef) - ctx, _ := context.WithCancel(context.Background()) + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() _, err = vm.PowerOff(ctx) Expect(err).NotTo(HaveOccurred()) defer vm.PowerOn(ctx) diff --git a/test/e2e_node/system/BUILD b/test/e2e_node/system/BUILD index 0481c4dc1ea..8e21c87bd95 100644 --- a/test/e2e_node/system/BUILD +++ b/test/e2e_node/system/BUILD @@ -60,7 +60,6 @@ go_library( "//vendor/github.com/docker/docker/api/types:go_default_library", "//vendor/github.com/docker/docker/client:go_default_library", "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", ], ) diff --git a/test/e2e_node/system/docker_validator.go b/test/e2e_node/system/docker_validator.go index f6b7f03dafe..d6895fa90d4 100644 --- a/test/e2e_node/system/docker_validator.go +++ b/test/e2e_node/system/docker_validator.go @@ -17,12 +17,12 @@ limitations under the License. package system import ( + "context" "fmt" "regexp" "github.com/docker/docker/api/types" "github.com/docker/docker/client" - "golang.org/x/net/context" ) var _ Validator = &DockerValidator{}