diff --git a/cmd/controller-manager/controller-manager.go b/cmd/controller-manager/controller-manager.go index 6175f6efca..8a2d7ca03e 100644 --- a/cmd/controller-manager/controller-manager.go +++ b/cmd/controller-manager/controller-manager.go @@ -30,7 +30,7 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/client" "github.com/GoogleCloudPlatform/kubernetes/pkg/controller" _ "github.com/GoogleCloudPlatform/kubernetes/pkg/healthz" - masterPkg "github.com/GoogleCloudPlatform/kubernetes/pkg/master" + "github.com/GoogleCloudPlatform/kubernetes/pkg/master/ports" "github.com/GoogleCloudPlatform/kubernetes/pkg/service" "github.com/GoogleCloudPlatform/kubernetes/pkg/util" "github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag" @@ -38,7 +38,7 @@ import ( ) var ( - port = flag.Int("port", masterPkg.ControllerManagerPort, "The port that the controller-manager's http service runs on") + port = flag.Int("port", ports.ControllerManagerPort, "The port that the controller-manager's http service runs on") address = util.IP(net.ParseIP("127.0.0.1")) clientConfig = &client.Config{} ) diff --git a/cmd/kubelet/kubelet.go b/cmd/kubelet/kubelet.go index 0b2f1cf411..63394bb158 100644 --- a/cmd/kubelet/kubelet.go +++ b/cmd/kubelet/kubelet.go @@ -36,7 +36,7 @@ import ( _ "github.com/GoogleCloudPlatform/kubernetes/pkg/healthz" "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet" kconfig "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/config" - "github.com/GoogleCloudPlatform/kubernetes/pkg/master" + "github.com/GoogleCloudPlatform/kubernetes/pkg/master/ports" "github.com/GoogleCloudPlatform/kubernetes/pkg/util" "github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag" "github.com/coreos/go-etcd/etcd" @@ -55,7 +55,7 @@ var ( manifestURL = flag.String("manifest_url", "", "URL for accessing the container manifest") enableServer = flag.Bool("enable_server", true, "Enable the info server") address = util.IP(net.ParseIP("127.0.0.1")) - port = flag.Uint("port", master.KubeletPort, "The port for the info server to serve on") + port = flag.Uint("port", ports.KubeletPort, "The port for the info server to serve on") hostnameOverride = flag.String("hostname_override", "", "If non-empty, will use this string as identification instead of the actual hostname.") networkContainerImage = flag.String("network_container_image", kubelet.NetworkContainerImage, "The image that network containers in each pod will use.") dockerEndpoint = flag.String("docker_endpoint", "", "If non-empty, use this for the docker endpoint to communicate with") diff --git a/pkg/master/ports/doc.go b/pkg/master/ports/doc.go new file mode 100644 index 0000000000..1d9f002666 --- /dev/null +++ b/pkg/master/ports/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2014 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package ports defines ports used by various pieces of the kubernetes +// infrastructure. +package ports diff --git a/pkg/master/ports.go b/pkg/master/ports/ports.go similarity index 98% rename from pkg/master/ports.go rename to pkg/master/ports/ports.go index 2920ab7c77..8995bef1a8 100644 --- a/pkg/master/ports.go +++ b/pkg/master/ports/ports.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package master +package ports const ( // KubeletPort is the default port for the kubelet status server on each host machine. diff --git a/plugin/cmd/scheduler/scheduler.go b/plugin/cmd/scheduler/scheduler.go index ead41b7e16..1fc0927e09 100644 --- a/plugin/cmd/scheduler/scheduler.go +++ b/plugin/cmd/scheduler/scheduler.go @@ -25,7 +25,7 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/client" "github.com/GoogleCloudPlatform/kubernetes/pkg/client/record" _ "github.com/GoogleCloudPlatform/kubernetes/pkg/healthz" - masterPkg "github.com/GoogleCloudPlatform/kubernetes/pkg/master" + "github.com/GoogleCloudPlatform/kubernetes/pkg/master/ports" "github.com/GoogleCloudPlatform/kubernetes/pkg/util" "github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag" "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler" @@ -34,7 +34,7 @@ import ( ) var ( - port = flag.Int("port", masterPkg.SchedulerPort, "The port that the scheduler's http service runs on") + port = flag.Int("port", ports.SchedulerPort, "The port that the scheduler's http service runs on") address = util.IP(net.ParseIP("127.0.0.1")) clientConfig = &client.Config{} )