Revision 6d8b5be5fc1f758ceb28c808c8ecaf9d27f0aa5d authored by Sebastian Wicki on 10 March 2021, 15:14:30 UTC, committed by Sebastian Wicki on 10 March 2021, 17:47:52 UTC
A VPC on EC2 can have secondary CIDRs which are routable within the VPC.
Subnets which are used in Cilium's ENI IPAM mode might be derived from
these secondary CIDRs, therefore we must also install routes for these
secondary CIDRs.

This commit ensures that we populate the
`CiliumNode.Status.ENI.ENIS[].VPC.CIDRs` field with these secondary
CIDRs if present. The IPAM code on the agent is already set up to
install routes for these additional CIDRs [1], but since this field was
never populated, the rules were also missing. Therefore, this fixes a
bug where routes were missing in ENI IPAM mode, causing arbitrary
connecitivty issues.

With this commit, routes are only added for CIDRs which are present when
the IP is allocated. A subsequent PR will add the functionality to
update the routes dynamically in case CIDRs are added or removed from a
VPC.

[1] https://github.com/cilium/cilium/blob/2110b11c989fe7ef8c7d9c5510c53a55cdaaa54c/pkg/ipam/crd.go#L488

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
1 parent 69a53d9
History
File Mode Size
cilium-cni
cilium-docker
Makefile -rw-r--r-- 444 bytes

back to top