Flag-compatible IP type

This commit is contained in:
Tim Hockin
2014-10-03 21:34:30 -07:00
parent a0bb739609
commit 0ad0a247c4
10 changed files with 74 additions and 28 deletions

View File

@@ -21,6 +21,7 @@ package main
import (
"encoding/json"
"io/ioutil"
"net"
"net/http"
"net/http/httptest"
"os"
@@ -150,7 +151,7 @@ func startComponents(manifestURL string) (apiServerURL string) {
myKubelet := kubelet.NewIntegrationTestKubelet(machineList[0], testRootDir, &fakeDocker1)
go util.Forever(func() { myKubelet.Run(cfg1.Updates()) }, 0)
go util.Forever(func() {
kubelet.ListenAndServeKubeletServer(myKubelet, cfg1.Channel("http"), "localhost", 10250)
kubelet.ListenAndServeKubeletServer(myKubelet, cfg1.Channel("http"), net.ParseIP("127.0.0.1"), 10250)
}, 0)
// Kubelet (machine)
@@ -161,7 +162,7 @@ func startComponents(manifestURL string) (apiServerURL string) {
otherKubelet := kubelet.NewIntegrationTestKubelet(machineList[1], testRootDir, &fakeDocker2)
go util.Forever(func() { otherKubelet.Run(cfg2.Updates()) }, 0)
go util.Forever(func() {
kubelet.ListenAndServeKubeletServer(otherKubelet, cfg2.Channel("http"), "localhost", 10251)
kubelet.ListenAndServeKubeletServer(otherKubelet, cfg2.Channel("http"), net.ParseIP("127.0.0.1"), 10251)
}, 0)
return apiServer.URL