Skip to content

CFP-18405: ENI IPAM Multi-Pool Migration#87

Open
HadrienPatte wants to merge 2 commits intocilium:mainfrom
HadrienPatte:pr/HadrienPatte/eni-ipam-multi-pool
Open

CFP-18405: ENI IPAM Multi-Pool Migration#87
HadrienPatte wants to merge 2 commits intocilium:mainfrom
HadrienPatte:pr/HadrienPatte/eni-ipam-multi-pool

Conversation

@HadrienPatte
Copy link
Copy Markdown
Member

This CFP is a more detailed version of the design I mentioned in cilium/cilium#19251 (comment)

Copy link
Copy Markdown
Member

@gandro gandro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am so happy to see this being tackled! 🥹

The plan here sounds very reasonable and implementable to me. I have left some comments on the key questions, but the major concerns of such a change are already addressed in the document from my perspective, so I am approving of this.

* `Spec.IPAM.Pool` remains populated on all nodes even when all agents have upgraded, until 1.21.
* Slightly more data written per CiliumNode object.

#### Option 2: Temporary Opt-Out Flag to Disable Dual-Write
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm mildly in favor of providing this.

We could even go a step further and and enable this by default for new installations. While it is a potentially dangerous flag to enable, I do feel like with proper documentation this risk is mitigated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an established way of doing "if new installation" type of logic today? I feel like a lot of the great options on this page currently default to being disabled (even on new installations) because they're not safe to be enabled on existing clusters.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we do, the upgradeCompatibility flag. Though it is possible that many users are not using it when upgrading, which would of course be pretty bad for them. If we want to be safe, maybe your original proposal to make this strictly opt-in is the way to go.

https://docs.cilium.io/en/stable/operations/upgrade/#step-2-use-helm-to-upgrade-your-cilium-deployment

Update based on feedback

Signed-off-by: Hadrien Patte <[email protected]>
@HadrienPatte
Copy link
Copy Markdown
Member Author

The plan here sounds very reasonable and implementable to me. I have left some comments on the key questions, but the major concerns of such a change are already addressed in the document from my perspective, so I am approving of this.

Thanks, I have updated the CFP based on your comments and changed its status from draft to implementable. Will leave it open for more people to comment.

HadrienPatte added a commit to cilium/cilium that referenced this pull request Mar 27, 2026
Extend `NewCIDRRange` with a `WithAllowFirstLastIPs` functional option
that includes the first and last IPs of a CIDR in the allocatable range.
This is needed for AWS ENI prefix delegation where /28 prefixes are
exclusively assigned to a node and all 16 IPs are usable as there is no
shared network segment requiring base/broadcast reservation.

Also refactor `ForEach` to use `r.base` directly instead of assuming a +1
offset from the CIDR base, making it correct for both default and
`AllowFirstLastIPs` ranges.

Relates to [cilium/design-cfps#87](cilium/design-cfps#87)

Followup to #34618

See #28637 (comment)

Signed-off-by: Hadrien Patte <[email protected]>
HadrienPatte added a commit to cilium/cilium that referenced this pull request Mar 27, 2026
Extract ENI device configuration into a standalone CiliumNode observer
that runs independently of the IPAM allocator. Previously,
`configureENIDevices` was called from
`nodeStore.updateLocalNodeResource`, coupling ENI network device setup to
the CRD allocator code path.

The new observer follows the same `job.Observer` pattern used by
`startLocalNodeAllocCIDRsSync` in the multi-pool allocator. It watches
CiliumNode updates and configures newly attached ENI devices regardless
of which allocator is active.

Relates to [cilium/design-cfps#87](cilium/design-cfps#87)

Signed-off-by: Hadrien Patte <[email protected]>
HadrienPatte added a commit to cilium/cilium that referenced this pull request Mar 27, 2026
Extract ENI device configuration into a standalone CiliumNode observer
that runs independently of the IPAM allocator. Previously,
`configureENIDevices` was called from
`nodeStore.updateLocalNodeResource`, coupling ENI network device setup to
the CRD allocator code path.

The new observer follows the same `job.Observer` pattern used by
`startLocalNodeAllocCIDRsSync` in the multi-pool allocator. It watches
CiliumNode updates and configures newly attached ENI devices regardless
of which allocator is active.

Relates to [cilium/design-cfps#87](cilium/design-cfps#87)

Signed-off-by: Hadrien Patte <[email protected]>
HadrienPatte added a commit to cilium/cilium that referenced this pull request Mar 28, 2026
Extract ENI device configuration into a standalone CiliumNode observer
that runs independently of the IPAM allocator. Previously,
`configureENIDevices` was called from
`nodeStore.updateLocalNodeResource`, coupling ENI network device setup to
the CRD allocator code path.

The new observer follows the same `job.Observer` pattern used by
`startLocalNodeAllocCIDRsSync` in the multi-pool allocator. It watches
CiliumNode updates and configures newly attached ENI devices regardless
of which allocator is active.

Relates to [cilium/design-cfps#87](cilium/design-cfps#87)

Signed-off-by: Hadrien Patte <[email protected]>
HadrienPatte added a commit to cilium/cilium that referenced this pull request Mar 30, 2026
Extend `NewCIDRRange` with a `WithAllowFirstLastIPs` functional option
that includes the first and last IPs of a CIDR in the allocatable range.
This is needed for AWS ENI prefix delegation where /28 prefixes are
exclusively assigned to a node and all 16 IPs are usable as there is no
shared network segment requiring base/broadcast reservation.

Also refactor `ForEach` to use `r.base` directly instead of assuming a +1
offset from the CIDR base, making it correct for both default and
`AllowFirstLastIPs` ranges.

Relates to [cilium/design-cfps#87](cilium/design-cfps#87)

Followup to #34618

See #28637 (comment)

Signed-off-by: Hadrien Patte <[email protected]>
HadrienPatte added a commit to cilium/cilium that referenced this pull request Mar 30, 2026
Extend `NewCIDRRange` with a `WithAllowFirstLastIPs` functional option
that includes the first and last IPs of a CIDR in the allocatable range.
This is needed for AWS ENI prefix delegation where /28 prefixes are
exclusively assigned to a node and all 16 IPs are usable as there is no
shared network segment requiring base/broadcast reservation.

Also refactor `ForEach` to use `r.base` directly instead of assuming a +1
offset from the CIDR base, making it correct for both default and
`AllowFirstLastIPs` ranges.

Relates to [cilium/design-cfps#87](cilium/design-cfps#87)

Followup to #34618

See #28637 (comment)

Signed-off-by: Hadrien Patte <[email protected]>
HadrienPatte added a commit to cilium/cilium that referenced this pull request Mar 30, 2026
Extract ENI device configuration into a standalone CiliumNode observer
that runs independently of the IPAM allocator. Previously,
`configureENIDevices` was called from
`nodeStore.updateLocalNodeResource`, coupling ENI network device setup to
the CRD allocator code path.

The new observer follows the same `job.Observer` pattern used by
`startLocalNodeAllocCIDRsSync` in the multi-pool allocator. It watches
CiliumNode updates and configures newly attached ENI devices regardless
of which allocator is active.

Relates to [cilium/design-cfps#87](cilium/design-cfps#87)

Signed-off-by: Hadrien Patte <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants