mirror of https://github.com/k3s-io/k3s
rearrange RunKubelet's parameters so that address and port are next to each other
parent
11d6451d2a
commit
587fb75a7a
|
@ -64,7 +64,7 @@ func startComponents(manifestURL string) (apiServerURL string) {
|
|||
SyncFrequency: 5 * time.Second,
|
||||
HTTPCheckFrequency: 5 * time.Second,
|
||||
}
|
||||
go myKubelet.RunKubelet("", manifestURL, servers[0], "localhost", "", 0)
|
||||
go myKubelet.RunKubelet("", "", manifestURL, servers[0], "localhost", 10250)
|
||||
|
||||
// Create a second kubelet so that the guestbook example's two redis slaves both
|
||||
// have a place they can schedule.
|
||||
|
@ -76,7 +76,7 @@ func startComponents(manifestURL string) (apiServerURL string) {
|
|||
SyncFrequency: 5 * time.Second,
|
||||
HTTPCheckFrequency: 5 * time.Second,
|
||||
}
|
||||
go otherKubelet.RunKubelet("", "", servers[0], "localhost", "", 0)
|
||||
go otherKubelet.RunKubelet("", "", "", servers[0], "localhost", 10251)
|
||||
|
||||
return apiserver.URL
|
||||
}
|
||||
|
|
|
@ -89,5 +89,5 @@ func main() {
|
|||
SyncFrequency: *syncFrequency,
|
||||
HTTPCheckFrequency: *httpCheckFrequency,
|
||||
}
|
||||
my_kubelet.RunKubelet(*config, *manifestUrl, *etcdServers, *address, *dockerEndpoint, *port)
|
||||
my_kubelet.RunKubelet(*dockerEndpoint, *config, *manifestUrl, *etcdServers, *address, *port)
|
||||
}
|
||||
|
|
|
@ -101,9 +101,9 @@ const (
|
|||
|
||||
// Starts background goroutines. If config_path, manifest_url, or address are empty,
|
||||
// they are not watched. Never returns.
|
||||
func (kl *Kubelet) RunKubelet(config_path, manifest_url, etcd_servers, address, endpoint string, port uint) {
|
||||
func (kl *Kubelet) RunKubelet(dockerEndpoint, config_path, manifest_url, etcd_servers, address string, port uint) {
|
||||
if kl.DockerPuller == nil {
|
||||
kl.DockerPuller = MakeDockerPuller(endpoint)
|
||||
kl.DockerPuller = MakeDockerPuller(dockerEndpoint)
|
||||
}
|
||||
updateChannel := make(chan manifestUpdate)
|
||||
if config_path != "" {
|
||||
|
|
Loading…
Reference in New Issue