@@ -33,6 +33,12 @@ import (
33
33
kopsversion "k8s.io/kops"
34
34
)
35
35
36
+ const (
37
+ defaultAWSNetworkCIDR = "172.20.0.0/16"
38
+ defaultAzureNetworkCIDR = "10.0.0.0/16"
39
+ defaultNonMasqueradeCIDR = "100.64.0.0/10"
40
+ )
41
+
36
42
// PerformAssignments populates values that are required and immutable
37
43
// For example, it assigns stable Keys to InstanceGroups & Masters, and
38
44
// it assigns CIDRs to subnets
@@ -85,7 +91,7 @@ func PerformAssignments(c *kops.Cluster, vfsContext *vfs.VFSContext, cloud fi.Cl
85
91
}
86
92
} else {
87
93
// TODO: Choose non-overlapping networking CIDRs for VPCs, using vpcInfo
88
- c .Spec .Networking .NetworkCIDR = "172.20.0.0/16"
94
+ c .Spec .Networking .NetworkCIDR = defaultAWSNetworkCIDR
89
95
}
90
96
91
97
// Amazon VPC CNI uses the same network
@@ -111,12 +117,12 @@ func PerformAssignments(c *kops.Cluster, vfsContext *vfs.VFSContext, cloud fi.Cl
111
117
return fmt .Errorf ("unable to infer NetworkCIDR from Network ID, please specify --network-cidr" )
112
118
}
113
119
} else {
114
- c .Spec .Networking .NetworkCIDR = "10.0.0.0/16"
120
+ c .Spec .Networking .NetworkCIDR = defaultAzureNetworkCIDR
115
121
}
116
122
}
117
123
118
124
if c .Spec .Networking .NonMasqueradeCIDR == "" {
119
- c .Spec .Networking .NonMasqueradeCIDR = "100.64.0.0/10"
125
+ c .Spec .Networking .NonMasqueradeCIDR = defaultNonMasqueradeCIDR
120
126
}
121
127
122
128
// TODO: Unclear this should be here - it isn't too hard to change
0 commit comments