Clean up how client is passed to Kubelet in preparation for reading pods

Also fixes how Kubelet server looks up pods by name when there are multiple
sources.
This commit is contained in:
Clayton Coleman
2015-01-07 10:18:56 -05:00
parent 880ecef6fe
commit ba53d723d3
11 changed files with 118 additions and 100 deletions

View File

@@ -100,10 +100,13 @@ func main() {
glog.Info(err)
}
client, err := standalone.GetAPIServerClient(*authPath, apiServerList)
if err != nil && len(apiServerList) > 0 {
glog.Warningf("No API client: %v", err)
}
kcfg := standalone.KubeletConfig{
Address: address,
AuthPath: *authPath,
ApiServerList: apiServerList,
AllowPrivileged: *allowPrivileged,
HostnameOverride: *hostnameOverride,
RootDirectory: *rootDirectory,
@@ -125,6 +128,7 @@ func main() {
EnableServer: *enableServer,
EnableDebuggingHandlers: *enableDebuggingHandlers,
DockerClient: util.ConnectToDockerOrDie(*dockerEndpoint),
KubeClient: client,
EtcdClient: kubelet.EtcdClientOrDie(etcdServerList, *etcdConfigFile),
}