mirror of https://github.com/kubernetes/kops.git
Add validation that prevents using dedicated API servers for clusters without DNS
This commit is contained in:
parent
87240bd5a1
commit
7c7350d77c
|
|
@ -223,8 +223,13 @@ func CrossValidateInstanceGroup(g *kops.InstanceGroup, cluster *kops.Cluster, cl
|
|||
allErrs = append(allErrs, ValidateMasterInstanceGroup(g, cluster)...)
|
||||
}
|
||||
|
||||
if g.Spec.Role == kops.InstanceGroupRoleAPIServer && cluster.Spec.GetCloudProvider() != kops.CloudProviderAWS {
|
||||
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "role"), "Apiserver role only supported on AWS"))
|
||||
if g.Spec.Role == kops.InstanceGroupRoleAPIServer {
|
||||
if cluster.Spec.GetCloudProvider() != kops.CloudProviderAWS {
|
||||
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "role"), "APIServer role only supported on AWS"))
|
||||
}
|
||||
if cluster.UsesNoneDNS() {
|
||||
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "role"), "APIServer cannot be used with topology.dns.type=None"))
|
||||
}
|
||||
}
|
||||
|
||||
// Check that instance groups are defined in subnets that are defined in the cluster
|
||||
|
|
|
|||
Loading…
Reference in New Issue