Skip to content

ipam: Decouple ENI device configuration from CRD allocator#45027

Open
HadrienPatte wants to merge 1 commit intomainfrom
pr/HadrienPatte/ENIDeviceConfigurator
Open

ipam: Decouple ENI device configuration from CRD allocator#45027
HadrienPatte wants to merge 1 commit intomainfrom
pr/HadrienPatte/ENIDeviceConfigurator

Conversation

@HadrienPatte
Copy link
Copy Markdown
Member

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

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 27, 2026
@HadrienPatte HadrienPatte added area/eni Impacts ENI based IPAM. area/ipam IP address management, including cloud IPAM release-note/misc This PR makes changes that have no direct user impact. labels Mar 27, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 27, 2026
@HadrienPatte
Copy link
Copy Markdown
Member Author

/test

@HadrienPatte HadrienPatte force-pushed the pr/HadrienPatte/ENIDeviceConfigurator branch from 412548a to 592ee1e Compare March 27, 2026 22:28
@cilium-ariane
Copy link
Copy Markdown

cilium-ariane bot commented Mar 27, 2026

/test

@HadrienPatte HadrienPatte force-pushed the pr/HadrienPatte/ENIDeviceConfigurator branch from 592ee1e to 1ac0d93 Compare March 28, 2026 12:17
@HadrienPatte
Copy link
Copy Markdown
Member Author

/test

@HadrienPatte HadrienPatte changed the title ipam: decouple ENI device configuration from CRD allocator ipam: Decouple ENI device configuration from CRD allocator Mar 28, 2026
@HadrienPatte HadrienPatte marked this pull request as ready for review March 28, 2026 18:00
@HadrienPatte HadrienPatte requested a review from a team as a code owner March 28, 2026 18:00
@HadrienPatte HadrienPatte requested a review from pippolo84 March 28, 2026 18:00
return nil
}

configureENIDevices(logger, prevNode, ev.Object, mtuConfig, sysctl)
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.

Shouldn't we also validate the ENI config here (and avoid the devices config if not valid) like we did before in updateLocalNodeResource? Otherwise I'm afraid we will reintroduce the issue fixed in #41760

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.

Good catch 👍 I moved the validateENIConfig call from updateLocalNodeResource to startENIDeviceConfigurator along with the previously moved configureENIDevices call.

While at it I also moved the validateENIConfig function definition from crd.go to eni.go (and its tests from crd_test.go to eni_test.go)

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 HadrienPatte force-pushed the pr/HadrienPatte/ENIDeviceConfigurator branch from 1ac0d93 to ce15d92 Compare March 30, 2026 14:21
@HadrienPatte HadrienPatte requested a review from pippolo84 March 30, 2026 14:26
@HadrienPatte
Copy link
Copy Markdown
Member Author

/test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/eni Impacts ENI based IPAM. area/ipam IP address management, including cloud IPAM release-note/misc This PR makes changes that have no direct user impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants