From 7786872a0868ca028e848739af5f881be25a2d4a Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Fri, 9 Nov 2018 13:00:52 +0000 Subject: [PATCH] Fix panic when VPC CIDR is unset in tests --- pkg/nodebootstrap/userdata.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/nodebootstrap/userdata.go b/pkg/nodebootstrap/userdata.go index 4908fb18ea..13fda4afbe 100644 --- a/pkg/nodebootstrap/userdata.go +++ b/pkg/nodebootstrap/userdata.go @@ -86,7 +86,7 @@ func makeClientConfigData(spec *api.ClusterConfig, nodeGroupID int) ([]byte, err func clusterDNS(spec *api.ClusterConfig) string { // Default service network is 10.100.0.0, but it gets set 172.20.0.0 automatically when pod network // is anywhere within 10.0.0.0/8 - if spec.VPC.CIDR.IP[0] == 10 { + if spec.VPC.CIDR != nil && spec.VPC.CIDR.IP[0] == 10 { return "172.20.0.10" } return "10.100.0.10"