Skip to content

Commit b1e9bd8

Browse files
committed
cni: set default CNI ingress rules for IPv6 support
Calico does not support IP-in-IP on IPv6. The users must configure Calico to use VXLAN instead. This adds the necessary default ingress rule for VXLAN.
1 parent 3a1bb09 commit b1e9bd8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

api/v1beta2/defaults.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ func SetDefaults_NetworkSpec(obj *NetworkSpec) { //nolint:golint,stylecheck
5050
},
5151
},
5252
}
53+
// To support IPv6, calico must be configured to use VXLAN.
54+
// According to https://github.com/projectcalico/calico/issues/5206,
55+
// IP-in-IP is not yet supported on IPv6.
56+
if obj.VPC.IsIPv6Enabled() {
57+
obj.CNI.CNIIngressRules = append(obj.CNI.CNIIngressRules, CNIIngressRule{
58+
Description: "VXLAN (calico)",
59+
Protocol: SecurityGroupProtocolUDP,
60+
FromPort: 4789,
61+
ToPort: 4789,
62+
})
63+
}
5364
}
5465
}
5566

0 commit comments

Comments
 (0)