Add IPv6 support to the nettest image

The test [sig-node] PreStop should call prestop when killing a pod [Conformance] use the nettest image for testing, but it turns out that this image is configured to listen in the address 0.0.0.0. Removing the address from the function http.ListenAndServe makes it start listening on both IPv4 and IPv6 addresses. Reference: https://github.com/kubernetes/kubernetes/issues/70248Signed-off-by: 's avatarAntonio Ojea <antonio.ojea.garcia@gmail.com>
parent 0b4275b6
...@@ -210,7 +210,7 @@ func main() { ...@@ -210,7 +210,7 @@ func main() {
http.HandleFunc("/write", state.serveWrite) http.HandleFunc("/write", state.serveWrite)
http.HandleFunc("/status", state.serveStatus) http.HandleFunc("/status", state.serveStatus)
go log.Fatal(http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", *port), nil)) go log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", *port), nil))
select {} select {}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment