From ae9bc28f8b098bdf9f4bc51bec35f31f2732a8b3 Mon Sep 17 00:00:00 2001 From: Eric Tune Date: Wed, 11 Mar 2015 16:40:20 -0700 Subject: [PATCH] Remove mentions of etcd in kubelet. --- cmd/kubelet/app/server.go | 5 +++-- pkg/kubelet/kubelet.go | 2 +- pkg/kubelet/kubelet_test.go | 20 ++++++++++---------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index b670f72a1a..311705fde1 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -187,7 +187,8 @@ func (s *KubeletServer) Run(_ []string) error { func (s *KubeletServer) setupRunOnce() { if s.RunOnce { - // Don't use remote (etcd or apiserver) sources + // Don't use apiserver source, on the presumption that this flag is used + // for bootstrapping some system pods. if len(s.APIServerList) > 0 { glog.Fatalf("invalid option: --runonce and --api_servers are mutually exclusive") } @@ -227,7 +228,7 @@ func (s *KubeletServer) createAPIServerClient() (*client.Client, error) { return c, nil } -// SimpleRunKubelet is a simple way to start a Kubelet talking to dockerEndpoint, using an etcdClient. +// SimpleRunKubelet is a simple way to start a Kubelet talking to dockerEndpoint, using an API Client. // Under the hood it calls RunKubelet (below) func SimpleRunKubelet(client *client.Client, dockerClient dockertools.DockerInterface, diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index f85abf49c8..04c5ef2551 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -1534,7 +1534,7 @@ func (kl *Kubelet) handleUpdate(u PodUpdate) { } // syncLoop is the main loop for processing changes. It watches for changes from -// four channels (file, etcd, server, and http) and creates a union of them. For +// three channels (file, apiserver, and http) and creates a union of them. For // any new change seen, will run a sync against desired state and running state. If // no changes are seen to the configuration, will synchronize the last known desired // state every sync_frequency seconds. Never returns. diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index 2479b4ff88..bc2b835ddb 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -1390,7 +1390,7 @@ func TestRunInContainerNoSuchPod(t *testing.T) { kubelet.runner = &fakeCommandRunner podName := "podFoo" - podNamespace := "etcd" + podNamespace := "nsFoo" containerName := "containerFoo" output, err := kubelet.RunInContainer( GetPodFullName(&api.BoundPod{ObjectMeta: api.ObjectMeta{Name: podName, Namespace: podNamespace}}), @@ -1412,7 +1412,7 @@ func TestRunInContainer(t *testing.T) { containerID := "abc1234" podName := "podFoo" - podNamespace := "etcd" + podNamespace := "nsFoo" containerName := "containerFoo" fakeDocker.ContainerList = []docker.APIContainers{ @@ -1452,7 +1452,7 @@ func TestRunHandlerExec(t *testing.T) { containerID := "abc1234" podName := "podFoo" - podNamespace := "etcd" + podNamespace := "nsFoo" containerName := "containerFoo" fakeDocker.ContainerList = []docker.APIContainers{ @@ -1499,7 +1499,7 @@ func TestRunHandlerHttp(t *testing.T) { kubelet.httpClient = &fakeHttp podName := "podFoo" - podNamespace := "etcd" + podNamespace := "nsFoo" containerName := "containerFoo" container := api.Container{ @@ -2694,7 +2694,7 @@ func TestExecInContainerNoSuchPod(t *testing.T) { kubelet.runner = &fakeCommandRunner podName := "podFoo" - podNamespace := "etcd" + podNamespace := "nsFoo" containerName := "containerFoo" err := kubelet.ExecInContainer( GetPodFullName(&api.BoundPod{ObjectMeta: api.ObjectMeta{Name: podName, Namespace: podNamespace}}), @@ -2720,7 +2720,7 @@ func TestExecInContainerNoSuchContainer(t *testing.T) { kubelet.runner = &fakeCommandRunner podName := "podFoo" - podNamespace := "etcd" + podNamespace := "nsFoo" containerID := "containerFoo" fakeDocker.ContainerList = []docker.APIContainers{ @@ -2772,7 +2772,7 @@ func TestExecInContainer(t *testing.T) { kubelet.runner = &fakeCommandRunner podName := "podFoo" - podNamespace := "etcd" + podNamespace := "nsFoo" containerID := "containerFoo" command := []string{"ls"} stdin := &bytes.Buffer{} @@ -2831,7 +2831,7 @@ func TestPortForwardNoSuchPod(t *testing.T) { kubelet.runner = &fakeCommandRunner podName := "podFoo" - podNamespace := "etcd" + podNamespace := "nsFoo" var port uint16 = 5000 err := kubelet.PortForward( @@ -2854,7 +2854,7 @@ func TestPortForwardNoSuchContainer(t *testing.T) { kubelet.runner = &fakeCommandRunner podName := "podFoo" - podNamespace := "etcd" + podNamespace := "nsFoo" var port uint16 = 5000 fakeDocker.ContainerList = []docker.APIContainers{ @@ -2888,7 +2888,7 @@ func TestPortForward(t *testing.T) { kubelet.runner = &fakeCommandRunner podName := "podFoo" - podNamespace := "etcd" + podNamespace := "nsFoo" containerID := "containerFoo" var port uint16 = 5000 stream := &fakeReadWriteCloser{}