mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	remove useless code in kubelet
This commit is contained in:
		@@ -210,10 +210,6 @@ func makeHostsMount(podDir, podIP, hostName, hostDomainName string, hostAliases
 | 
				
			|||||||
// ensureHostsFile ensures that the given host file has an up-to-date ip, host
 | 
					// ensureHostsFile ensures that the given host file has an up-to-date ip, host
 | 
				
			||||||
// name, and domain name.
 | 
					// name, and domain name.
 | 
				
			||||||
func ensureHostsFile(fileName, hostIP, hostName, hostDomainName string, hostAliases []v1.HostAlias) error {
 | 
					func ensureHostsFile(fileName, hostIP, hostName, hostDomainName string, hostAliases []v1.HostAlias) error {
 | 
				
			||||||
	if _, err := os.Stat(fileName); os.IsExist(err) {
 | 
					 | 
				
			||||||
		glog.V(4).Infof("kubernetes-managed etc-hosts file exits. Will not be recreated: %q", fileName)
 | 
					 | 
				
			||||||
		return nil
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	content := hostsFileContent(hostIP, hostName, hostDomainName, hostAliases)
 | 
						content := hostsFileContent(hostIP, hostName, hostDomainName, hostAliases)
 | 
				
			||||||
	return ioutil.WriteFile(fileName, content, 0644)
 | 
						return ioutil.WriteFile(fileName, content, 0644)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user