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/70248

Signed-off-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
k3s-v1.15.3
Antonio Ojea 2019-03-10 21:26:29 +01:00
parent 0b4275b6c7
commit 12ca2dd8a2
No known key found for this signature in database
GPG Key ID: E4833AA228D4E824
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ func main() {
http.HandleFunc("/write", state.serveWrite)
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 {}
}