Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/apis/kops/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,11 @@ func validateNetworkingCalico(c *kops.ClusterSpec, v *kops.CalicoNetworkingSpec,
// backend in order to allow use of BGP to distribute routes for pod traffic.
allErrs = append(allErrs, field.Forbidden(fldPath.Child("encapsulationMode"), "encapsulationMode \"none\" is only supported for IPv6 clusters"))
}

if v.EncapsulationMode != "vxlan" && c.CloudProvider.Azure != nil {
// IPIP packets are blocked by the Azure network fabric. This requires the use of VXLAN encapsulation for pod traffic.
allErrs = append(allErrs, field.Forbidden(fldPath.Child("encapsulationMode"), "Azure requires an encapsulationMode of \"vxlan\""))
}
}

if v.IPIPMode != "" {
Expand Down
5 changes: 5 additions & 0 deletions pkg/model/components/calico.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,10 @@ func (b *CalicoOptionsBuilder) BuildOptions(o *kops.Cluster) error {
c.EncapsulationMode = "none"
}

if o.GetCloudProvider() == kops.CloudProviderAzure {
c.EncapsulationMode = "vxlan"
c.VXLANMode = "Always"
}

return nil
}
Loading