normalize -etcd_servers flag across all commands

The -etcd_servers flag is used inconsistently by the Kubernetes commands,
both externally and internally.

This patch fixes the issue by using the same type to represent a list of
etcd servers internally, and declares the -etcd_servers flag consistently
across all commands.

This patch should be 100% backwards compatible with no changes in behavior.
This commit is contained in:
Kelsey Hightower
2014-07-20 07:48:47 -07:00
parent 1e63719e02
commit dc7ee7c333
6 changed files with 29 additions and 18 deletions

View File

@@ -106,7 +106,7 @@ func startComponents(manifestURL string) (apiServerURL string) {
SyncFrequency: 5 * time.Second,
HTTPCheckFrequency: 5 * time.Second,
}
go myKubelet.RunKubelet("", "", manifestURL, servers[0], "localhost", 10250)
go myKubelet.RunKubelet("", "", manifestURL, servers, "localhost", 10250)
// Create a second kubelet so that the guestbook example's two redis slaves both
// have a place they can schedule.
@@ -118,7 +118,7 @@ func startComponents(manifestURL string) (apiServerURL string) {
SyncFrequency: 5 * time.Second,
HTTPCheckFrequency: 5 * time.Second,
}
go otherKubelet.RunKubelet("", "", "", servers[0], "localhost", 10251)
go otherKubelet.RunKubelet("", "", "", servers, "localhost", 10251)
return apiserver.URL
}