This repository was archived by the owner on Jul 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ func runCmdStart(cmd *cobra.Command, args []string) error {
4545
4646 // TODO: this should likely move into bootkube.Run() eventually.
4747 if startOpts .selfHostedEtcd {
48- if err := etcdutil .StartEtcd (); err != nil {
48+ if err := etcdutil .StartEtcd (startOpts . etcdServer ); err != nil {
4949 return fmt .Errorf ("fail to start etcd: %v" , err )
5050 }
5151 }
Original file line number Diff line number Diff line change @@ -9,20 +9,20 @@ import (
99 "github.com/golang/glog"
1010)
1111
12- func StartEtcd () error {
12+ func StartEtcd (endpoint string ) error {
1313 if err := ioutil .WriteFile ("/etc/kubernetes/manifests/boot-etcd.yaml" , []byte (etcdPodYaml ), 0600 ); err != nil {
1414 return fmt .Errorf ("fail to write file '/etc/kubernetes/manifests/boot-etcd.yaml': %v" , err )
1515 }
1616 glog .Info ("etcd server has been defined to run by kubelet. Please wait..." )
17- return waitEtcdUp ()
17+ return waitEtcdUp (endpoint )
1818}
1919
20- func waitEtcdUp () error {
20+ func waitEtcdUp (endpoint string ) error {
2121 httpcli := & http.Client {
2222 Timeout : 10 * time .Second ,
2323 }
2424 for {
25- _ , err := httpcli .Get ("http://127.0.0.1:2379 /version" )
25+ _ , err := httpcli .Get (endpoint + " /version" )
2626 if err != nil {
2727 glog .Infof ("couldn't talk to etcd server (retrying 10s later): %v\n " , err )
2828 time .Sleep (10 * time .Second )
You can’t perform that action at this time.
0 commit comments