From e0ab76019e958ee6804db7ceaf986f9d4b705cef Mon Sep 17 00:00:00 2001 From: Harry Zhang Date: Sun, 3 Jul 2016 09:02:11 -0400 Subject: [PATCH] Rename runnter pkg name --- cmd/kubelet/app/server.go | 1 - pkg/genericapiserver/genericapiserver.go | 3 ++- pkg/master/controller.go | 6 +++--- pkg/util/async/runner.go | 2 +- pkg/util/async/runner_test.go | 2 +- pkg/util/resourcecontainer/resource_container_linux.go | 1 - pkg/util/rlimit/rlimit_linux.go | 2 +- pkg/util/rlimit/rlimit_unsupported.go | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-) diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index 1001107525..6059eb0835 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -70,7 +70,6 @@ import ( "k8s.io/kubernetes/pkg/util/mount" nodeutil "k8s.io/kubernetes/pkg/util/node" "k8s.io/kubernetes/pkg/util/oom" - "k8s.io/kubernetes/pkg/util/resourcecontainer" "k8s.io/kubernetes/pkg/util/rlimit" "k8s.io/kubernetes/pkg/util/runtime" "k8s.io/kubernetes/pkg/util/wait" diff --git a/pkg/genericapiserver/genericapiserver.go b/pkg/genericapiserver/genericapiserver.go index 9b0cc5baf2..849f483a2f 100644 --- a/pkg/genericapiserver/genericapiserver.go +++ b/pkg/genericapiserver/genericapiserver.go @@ -47,6 +47,7 @@ import ( "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/ui" "k8s.io/kubernetes/pkg/util" + "k8s.io/kubernetes/pkg/util/async" "k8s.io/kubernetes/pkg/util/crypto" utilnet "k8s.io/kubernetes/pkg/util/net" utilruntime "k8s.io/kubernetes/pkg/util/runtime" @@ -220,7 +221,7 @@ type GenericAPIServer struct { PublicReadWritePort int ServiceReadWriteIP net.IP ServiceReadWritePort int - masterServices *util.Runner + masterServices *async.Runner ExtraServicePorts []api.ServicePort ExtraEndpointPorts []api.EndpointPort diff --git a/pkg/master/controller.go b/pkg/master/controller.go index 6fad85f94c..fdf5e92b0c 100644 --- a/pkg/master/controller.go +++ b/pkg/master/controller.go @@ -31,7 +31,7 @@ import ( "k8s.io/kubernetes/pkg/registry/service" servicecontroller "k8s.io/kubernetes/pkg/registry/service/ipallocator/controller" portallocatorcontroller "k8s.io/kubernetes/pkg/registry/service/portallocator/controller" - "k8s.io/kubernetes/pkg/util" + "k8s.io/kubernetes/pkg/util/async" "k8s.io/kubernetes/pkg/util/intstr" utilnet "k8s.io/kubernetes/pkg/util/net" "k8s.io/kubernetes/pkg/util/runtime" @@ -68,7 +68,7 @@ type Controller struct { PublicServicePort int KubernetesServiceNodePort int - runner *util.Runner + runner *async.Runner } // Start begins the core controller loops that must exist for bootstrapping @@ -95,7 +95,7 @@ func (c *Controller) Start() { glog.Errorf("Unable to perform initial Kubernetes service initialization: %v", err) } - c.runner = util.NewRunner(c.RunKubernetesNamespaces, c.RunKubernetesService, repairClusterIPs.RunUntil, repairNodePorts.RunUntil) + c.runner = async.NewRunner(c.RunKubernetesNamespaces, c.RunKubernetesService, repairClusterIPs.RunUntil, repairNodePorts.RunUntil) c.runner.Start() } diff --git a/pkg/util/async/runner.go b/pkg/util/async/runner.go index 9e977ee1e9..924f1d168b 100644 --- a/pkg/util/async/runner.go +++ b/pkg/util/async/runner.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package util +package async import ( "sync" diff --git a/pkg/util/async/runner_test.go b/pkg/util/async/runner_test.go index d05db5eddc..b2f0b4c738 100644 --- a/pkg/util/async/runner_test.go +++ b/pkg/util/async/runner_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package util +package async import ( "fmt" diff --git a/pkg/util/resourcecontainer/resource_container_linux.go b/pkg/util/resourcecontainer/resource_container_linux.go index dc8e1909a9..f7c2046a09 100644 --- a/pkg/util/resourcecontainer/resource_container_linux.go +++ b/pkg/util/resourcecontainer/resource_container_linux.go @@ -20,7 +20,6 @@ package resourcecontainer import ( "os" - "syscall" "github.com/opencontainers/runc/libcontainer/cgroups/fs" "github.com/opencontainers/runc/libcontainer/configs" diff --git a/pkg/util/rlimit/rlimit_linux.go b/pkg/util/rlimit/rlimit_linux.go index c7d383d809..d1ea855341 100644 --- a/pkg/util/rlimit/rlimit_linux.go +++ b/pkg/util/rlimit/rlimit_linux.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/rlimit/rlimit_unsupported.go b/pkg/util/rlimit/rlimit_unsupported.go index 6759681b36..25f57be2c3 100644 --- a/pkg/util/rlimit/rlimit_unsupported.go +++ b/pkg/util/rlimit/rlimit_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.