mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Kublet watches Pods.
Added a kubelet config source for watching pods on apiserver. The pods are converted to boundpods for merging with other config sources. The preferred way to create a kubelet is now to pass an apiserver client but not an etcd client. Changed cmd/integration to use apiserver to talk to kubelets. And cmd/kubernetes. Unit, integration, and e2e tests pass, except for a failure of the pd e2e test which was unrelated.
This commit is contained in:
@@ -46,6 +46,7 @@ func init() {
|
||||
}
|
||||
|
||||
func newTestKubelet(t *testing.T) (*Kubelet, *tools.FakeEtcdClient, *dockertools.FakeDockerClient) {
|
||||
// TODO: get rid of fakeEtcdClient and return value.
|
||||
fakeEtcdClient := tools.NewFakeEtcdClient(t)
|
||||
fakeDocker := &dockertools.FakeDockerClient{
|
||||
RemovedImages: util.StringSet{},
|
||||
@@ -54,10 +55,11 @@ func newTestKubelet(t *testing.T) (*Kubelet, *tools.FakeEtcdClient, *dockertools
|
||||
kubelet := &Kubelet{}
|
||||
kubelet.dockerClient = fakeDocker
|
||||
kubelet.dockerPuller = &dockertools.FakeDockerPuller{}
|
||||
kubelet.etcdClient = fakeEtcdClient
|
||||
kubelet.rootDirectory = "/tmp/kubelet"
|
||||
kubelet.podWorkers = newPodWorkers()
|
||||
kubelet.sourceReady = func(source string) bool { return true }
|
||||
kubelet.masterServiceNamespace = api.NamespaceDefault
|
||||
kubelet.serviceLister = testServiceLister{}
|
||||
|
||||
return kubelet, fakeEtcdClient, fakeDocker
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user