mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	Integration tests should do a faster status sync loop
This commit is contained in:
		@@ -222,13 +222,17 @@ func startComponents(manifestURL, apiVersion string) (string, string) {
 | 
			
		||||
	testRootDir := makeTempDirOrDie("kubelet_integ_1.", "")
 | 
			
		||||
	configFilePath := makeTempDirOrDie("config", testRootDir)
 | 
			
		||||
	glog.Infof("Using %s as root dir for kubelet #1", testRootDir)
 | 
			
		||||
	kubeletapp.SimpleRunKubelet(cl, &fakeDocker1, machineList[0], testRootDir, manifestURL, "127.0.0.1", 10250, api.NamespaceDefault, empty_dir.ProbeVolumePlugins(), nil, cadvisorInterface, configFilePath)
 | 
			
		||||
	kcfg := kubeletapp.SimpleKubelet(cl, &fakeDocker1, machineList[0], testRootDir, manifestURL, "127.0.0.1", 10250, api.NamespaceDefault, empty_dir.ProbeVolumePlugins(), nil, cadvisorInterface, configFilePath)
 | 
			
		||||
	kcfg.PodStatusUpdateFrequency = 1 * time.Second
 | 
			
		||||
	kubeletapp.RunKubelet(kcfg)
 | 
			
		||||
	// Kubelet (machine)
 | 
			
		||||
	// Create a second kubelet so that the guestbook example's two redis slaves both
 | 
			
		||||
	// have a place they can schedule.
 | 
			
		||||
	testRootDir = makeTempDirOrDie("kubelet_integ_2.", "")
 | 
			
		||||
	glog.Infof("Using %s as root dir for kubelet #2", testRootDir)
 | 
			
		||||
	kubeletapp.SimpleRunKubelet(cl, &fakeDocker2, machineList[1], testRootDir, "", "127.0.0.1", 10251, api.NamespaceDefault, empty_dir.ProbeVolumePlugins(), nil, cadvisorInterface, "")
 | 
			
		||||
	kcfg = kubeletapp.SimpleKubelet(cl, &fakeDocker2, machineList[1], testRootDir, "", "127.0.0.1", 10251, api.NamespaceDefault, empty_dir.ProbeVolumePlugins(), nil, cadvisorInterface, "")
 | 
			
		||||
	kcfg.PodStatusUpdateFrequency = 1 * time.Second
 | 
			
		||||
	kubeletapp.RunKubelet(kcfg)
 | 
			
		||||
	return apiServer.URL, configFilePath
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -262,7 +262,7 @@ func (s *KubeletServer) createAPIServerClient() (*client.Client, error) {
 | 
			
		||||
 | 
			
		||||
// 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,
 | 
			
		||||
func SimpleKubelet(client *client.Client,
 | 
			
		||||
	dockerClient dockertools.DockerInterface,
 | 
			
		||||
	hostname, rootDir, manifestURL, address string,
 | 
			
		||||
	port uint,
 | 
			
		||||
@@ -270,7 +270,7 @@ func SimpleRunKubelet(client *client.Client,
 | 
			
		||||
	volumePlugins []volume.VolumePlugin,
 | 
			
		||||
	tlsOptions *kubelet.TLSOptions,
 | 
			
		||||
	cadvisorInterface cadvisor.Interface,
 | 
			
		||||
	configFilePath string) {
 | 
			
		||||
	configFilePath string) *KubeletConfig {
 | 
			
		||||
 | 
			
		||||
	imageGCPolicy := kubelet.ImageGCPolicy{
 | 
			
		||||
		HighThresholdPercent: 90,
 | 
			
		||||
@@ -302,7 +302,7 @@ func SimpleRunKubelet(client *client.Client,
 | 
			
		||||
		ConfigFile:               configFilePath,
 | 
			
		||||
		ImageGCPolicy:            imageGCPolicy,
 | 
			
		||||
	}
 | 
			
		||||
	RunKubelet(&kcfg)
 | 
			
		||||
	return &kcfg
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// RunKubelet is responsible for setting up and running a kubelet.  It is used in three different applications:
 | 
			
		||||
 
 | 
			
		||||
@@ -150,7 +150,8 @@ func startComponents(etcdClient tools.EtcdClient, cl *client.Client, addr net.IP
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		glog.Fatalf("Failed to create cAdvisor: %v", err)
 | 
			
		||||
	}
 | 
			
		||||
	kubeletapp.SimpleRunKubelet(cl, dockerClient, machineList[0], "/tmp/kubernetes", "", "127.0.0.1", 10250, *masterServiceNamespace, kubeletapp.ProbeVolumePlugins(), nil, cadvisorInterface, "")
 | 
			
		||||
	kcfg := kubeletapp.SimpleKubelet(cl, dockerClient, machineList[0], "/tmp/kubernetes", "", "127.0.0.1", 10250, *masterServiceNamespace, kubeletapp.ProbeVolumePlugins(), nil, cadvisorInterface, "")
 | 
			
		||||
	kubeletapp.RunKubelet(kcfg)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func newApiClient(addr net.IP, port int) *client.Client {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user