Skip to content

Commit

Permalink
Fix panic when VPC CIDR is unset in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Nov 9, 2018
1 parent f2868ae commit 7786872
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/nodebootstrap/userdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 7786872

Please sign in to comment.