rearrange RunKubelet's parameters so that address and port are next to each other

This commit is contained in:
Daniel Smith 2014-07-01 16:47:37 -07:00
parent 11d6451d2a
commit 587fb75a7a
3 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ func startComponents(manifestURL string) (apiServerURL string) {
SyncFrequency: 5 * time.Second, SyncFrequency: 5 * time.Second,
HTTPCheckFrequency: 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 // 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.
@ -76,7 +76,7 @@ func startComponents(manifestURL string) (apiServerURL string) {
SyncFrequency: 5 * time.Second, SyncFrequency: 5 * time.Second,
HTTPCheckFrequency: 5 * time.Second, HTTPCheckFrequency: 5 * time.Second,
} }
go otherKubelet.RunKubelet("", "", servers[0], "localhost", "", 0) go otherKubelet.RunKubelet("", "", "", servers[0], "localhost", 10251)
return apiserver.URL return apiserver.URL
} }

View File

@ -89,5 +89,5 @@ func main() {
SyncFrequency: *syncFrequency, SyncFrequency: *syncFrequency,
HTTPCheckFrequency: *httpCheckFrequency, HTTPCheckFrequency: *httpCheckFrequency,
} }
my_kubelet.RunKubelet(*config, *manifestUrl, *etcdServers, *address, *dockerEndpoint, *port) my_kubelet.RunKubelet(*dockerEndpoint, *config, *manifestUrl, *etcdServers, *address, *port)
} }

View File

@ -101,9 +101,9 @@ const (
// Starts background goroutines. If config_path, manifest_url, or address are empty, // Starts background goroutines. If config_path, manifest_url, or address are empty,
// they are not watched. Never returns. // 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 { if kl.DockerPuller == nil {
kl.DockerPuller = MakeDockerPuller(endpoint) kl.DockerPuller = MakeDockerPuller(dockerEndpoint)
} }
updateChannel := make(chan manifestUpdate) updateChannel := make(chan manifestUpdate)
if config_path != "" { if config_path != "" {