@@ -1559,15 +1559,17 @@ func validateNetworkingCalico(c *kops.ClusterSpec, v *kops.CalicoNetworkingSpec,
15591559 valid := []string {"ipip" , "vxlan" , "none" }
15601560 allErrs = append (allErrs , IsValidValue (fldPath .Child ("encapsulationMode" ), & v .EncapsulationMode , valid )... )
15611561
1562- if v .EncapsulationMode != "none" && c .IsIPv6Only () {
1563- // IPv6 doesn't support encapsulation and kops only uses the "none" networking backend.
1564- // The bird networking backend could also be added in the future if there's any valid use case.
1565- allErrs = append (allErrs , field .Forbidden (fldPath .Child ("encapsulationMode" ), "IPv6 requires an encapsulationMode of \" none\" " ))
1566- } else if v .EncapsulationMode == "none" && ! c .IsIPv6Only () {
1567- // Don't tolerate "None" for now, which would disable encapsulation in the default IPPool
1568- // object. Note that with no encapsulation, we'd need to select the "bird" networking
1569- // backend in order to allow use of BGP to distribute routes for pod traffic.
1570- allErrs = append (allErrs , field .Forbidden (fldPath .Child ("encapsulationMode" ), "encapsulationMode \" none\" is only supported for IPv6 clusters" ))
1562+ if c .CloudProvider .Azure == nil {
1563+ if v .EncapsulationMode != "none" && c .IsIPv6Only () {
1564+ // IPv6 doesn't support encapsulation and kops only uses the "none" networking backend.
1565+ // The bird networking backend could also be added in the future if there's any valid use case.
1566+ allErrs = append (allErrs , field .Forbidden (fldPath .Child ("encapsulationMode" ), "IPv6 requires an encapsulationMode of \" none\" " ))
1567+ } else if v .EncapsulationMode == "none" && ! c .IsIPv6Only () {
1568+ // Don't tolerate "None" for now, which would disable encapsulation in the default IPPool
1569+ // object. Note that with no encapsulation, we'd need to select the "bird" networking
1570+ // backend in order to allow use of BGP to distribute routes for pod traffic.
1571+ allErrs = append (allErrs , field .Forbidden (fldPath .Child ("encapsulationMode" ), "encapsulationMode \" none\" is only supported for IPv6 clusters" ))
1572+ }
15711573 }
15721574 }
15731575
0 commit comments