Skip to content

Commit 6562c4b

Browse files
authored
Merge pull request #17832 from hakman/calico-encapsulation
azure: Use VXLAN encapsulation for pod traffic with Calico
2 parents 838bed6 + 79672af commit 6562c4b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

pkg/apis/kops/validation/validation.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,6 +1569,11 @@ func validateNetworkingCalico(c *kops.ClusterSpec, v *kops.CalicoNetworkingSpec,
15691569
// backend in order to allow use of BGP to distribute routes for pod traffic.
15701570
allErrs = append(allErrs, field.Forbidden(fldPath.Child("encapsulationMode"), "encapsulationMode \"none\" is only supported for IPv6 clusters"))
15711571
}
1572+
1573+
if v.EncapsulationMode != "vxlan" && c.CloudProvider.Azure != nil {
1574+
// IPIP packets are blocked by the Azure network fabric. This requires the use of VXLAN encapsulation for pod traffic.
1575+
allErrs = append(allErrs, field.Forbidden(fldPath.Child("encapsulationMode"), "Azure requires an encapsulationMode of \"vxlan\""))
1576+
}
15721577
}
15731578

15741579
if v.IPIPMode != "" {

pkg/model/components/calico.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,10 @@ func (b *CalicoOptionsBuilder) BuildOptions(o *kops.Cluster) error {
4040
c.EncapsulationMode = "none"
4141
}
4242

43+
if o.GetCloudProvider() == kops.CloudProviderAzure {
44+
c.EncapsulationMode = "vxlan"
45+
c.VXLANMode = "Always"
46+
}
47+
4348
return nil
4449
}

0 commit comments

Comments
 (0)