diff --git a/test/images/port-forward-tester/Makefile b/test/images/port-forward-tester/Makefile index 573786d235..5c277e13cb 100644 --- a/test/images/port-forward-tester/Makefile +++ b/test/images/port-forward-tester/Makefile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -TAG = 1.0 +TAG = 1.1 PREFIX = gcr.io/google_containers all: push diff --git a/test/images/port-forward-tester/portforwardtester.go b/test/images/port-forward-tester/portforwardtester.go index 66e82bc78c..f1e721cdbb 100644 --- a/test/images/port-forward-tester/portforwardtester.go +++ b/test/images/port-forward-tester/portforwardtester.go @@ -48,8 +48,12 @@ func getEnvInt(name string) int { } func main() { + bindAddress := os.Getenv("BIND_ADDRESS") + if bindAddress == "" { + bindAddress = "localhost" + } bindPort := os.Getenv("BIND_PORT") - listener, err := net.Listen("tcp", fmt.Sprintf("localhost:%s", bindPort)) + listener, err := net.Listen("tcp", fmt.Sprintf("%s:%s", bindAddress, bindPort)) if err != nil { fmt.Printf("Error listening: %v\n", err) os.Exit(1)