From bcbd16b94b1c22ef33317f982cac991e1b49e27a Mon Sep 17 00:00:00 2001 From: Masashi Honma Date: Thu, 8 Oct 2020 18:30:52 +0900 Subject: [PATCH] test-integration: Fix using deprecated default cluster IPs The integration test for pods produces a warning caused by using deprecated default cluster IPs. $ make test-integration WHAT=./test/integration/pods GOFLAGS="-v" W1007 17:25:28.217410 100721 services.go:37] No CIDR for service cluster IPs specified. Default value which was 10.0.0.0/24 is deprecated and will be removed in future releases. Please specify it using --service-cluster-ip-range on kube-apiserver. This warning appears 36 times after running all tests. This patch removes all the warnings. Signed-off-by: Masashi Honma --- test/integration/framework/master_utils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/integration/framework/master_utils.go b/test/integration/framework/master_utils.go index 127f86bce2e..7d5a5f53bec 100644 --- a/test/integration/framework/master_utils.go +++ b/test/integration/framework/master_utils.go @@ -204,6 +204,9 @@ func startMasterOrDie(masterConfig *controlplane.Config, incomingServer *httptes ) } + if masterConfig.ExtraConfig.ServiceIPRange.IP == nil { + masterConfig.ExtraConfig.ServiceIPRange = net.IPNet{IP: net.ParseIP("10.0.0.0"), Mask: net.CIDRMask(24, 32)} + } m, err = masterConfig.Complete().New(genericapiserver.NewEmptyDelegate()) if err != nil { // We log the error first so that even if closeFn crashes, the error is shown