From 12ca2dd8a2be7f15b713eac70658922fe20d68b3 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Sun, 10 Mar 2019 21:26:29 +0100 Subject: [PATCH 1/3] 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 --- test/images/nettest/nettest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/images/nettest/nettest.go b/test/images/nettest/nettest.go index 8336d7cfeb8..50b0a9df4af 100644 --- a/test/images/nettest/nettest.go +++ b/test/images/nettest/nettest.go @@ -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 {} } From f574a839a6b33680fc5b350a68779c3448bb1263 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Wed, 17 Apr 2019 11:11:02 +0200 Subject: [PATCH 2/3] Rebase nettest image from scratch to distroless --- test/images/nettest/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/images/nettest/Dockerfile b/test/images/nettest/Dockerfile index 0666e3dce03..c7b459f594e 100644 --- a/test/images/nettest/Dockerfile +++ b/test/images/nettest/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM scratch +FROM gcr.io/distroless/static:latest COPY nettest / EXPOSE 8080 ENTRYPOINT ["/nettest"] From 05222658170f9da056a608a52c34493306f8cd77 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Wed, 17 Apr 2019 11:11:27 +0200 Subject: [PATCH 3/3] Bump nettest image version --- test/images/nettest/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/images/nettest/VERSION b/test/images/nettest/VERSION index d3827e75a5c..9459d4ba2a0 100644 --- a/test/images/nettest/VERSION +++ b/test/images/nettest/VERSION @@ -1 +1 @@ -1.0 +1.1