mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-02 17:57:33 +00:00
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:
@@ -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),
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user