mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08: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.", "")
 | 
						testRootDir := makeTempDirOrDie("kubelet_integ_1.", "")
 | 
				
			||||||
	configFilePath := makeTempDirOrDie("config", testRootDir)
 | 
						configFilePath := makeTempDirOrDie("config", testRootDir)
 | 
				
			||||||
	glog.Infof("Using %s as root dir for kubelet #1", 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)
 | 
						// Kubelet (machine)
 | 
				
			||||||
	// Create a second kubelet so that the guestbook example's two redis slaves both
 | 
						// Create a second kubelet so that the guestbook example's two redis slaves both
 | 
				
			||||||
	// have a place they can schedule.
 | 
						// have a place they can schedule.
 | 
				
			||||||
	testRootDir = makeTempDirOrDie("kubelet_integ_2.", "")
 | 
						testRootDir = makeTempDirOrDie("kubelet_integ_2.", "")
 | 
				
			||||||
	glog.Infof("Using %s as root dir for kubelet #2", testRootDir)
 | 
						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
 | 
						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.
 | 
					// SimpleRunKubelet is a simple way to start a Kubelet talking to dockerEndpoint, using an API Client.
 | 
				
			||||||
// Under the hood it calls RunKubelet (below)
 | 
					// Under the hood it calls RunKubelet (below)
 | 
				
			||||||
func SimpleRunKubelet(client *client.Client,
 | 
					func SimpleKubelet(client *client.Client,
 | 
				
			||||||
	dockerClient dockertools.DockerInterface,
 | 
						dockerClient dockertools.DockerInterface,
 | 
				
			||||||
	hostname, rootDir, manifestURL, address string,
 | 
						hostname, rootDir, manifestURL, address string,
 | 
				
			||||||
	port uint,
 | 
						port uint,
 | 
				
			||||||
@@ -270,7 +270,7 @@ func SimpleRunKubelet(client *client.Client,
 | 
				
			|||||||
	volumePlugins []volume.VolumePlugin,
 | 
						volumePlugins []volume.VolumePlugin,
 | 
				
			||||||
	tlsOptions *kubelet.TLSOptions,
 | 
						tlsOptions *kubelet.TLSOptions,
 | 
				
			||||||
	cadvisorInterface cadvisor.Interface,
 | 
						cadvisorInterface cadvisor.Interface,
 | 
				
			||||||
	configFilePath string) {
 | 
						configFilePath string) *KubeletConfig {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	imageGCPolicy := kubelet.ImageGCPolicy{
 | 
						imageGCPolicy := kubelet.ImageGCPolicy{
 | 
				
			||||||
		HighThresholdPercent: 90,
 | 
							HighThresholdPercent: 90,
 | 
				
			||||||
@@ -302,7 +302,7 @@ func SimpleRunKubelet(client *client.Client,
 | 
				
			|||||||
		ConfigFile:               configFilePath,
 | 
							ConfigFile:               configFilePath,
 | 
				
			||||||
		ImageGCPolicy:            imageGCPolicy,
 | 
							ImageGCPolicy:            imageGCPolicy,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	RunKubelet(&kcfg)
 | 
						return &kcfg
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// RunKubelet is responsible for setting up and running a kubelet.  It is used in three different applications:
 | 
					// 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 {
 | 
						if err != nil {
 | 
				
			||||||
		glog.Fatalf("Failed to create cAdvisor: %v", err)
 | 
							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 {
 | 
					func newApiClient(addr net.IP, port int) *client.Client {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user