Skip to content

Conversation

danehans
Copy link
Contributor

@danehans danehans commented Feb 8, 2024

Previously, the IPAM Node type represented IP information such as pools, allocations, etc. that are specific to IPv4. This PR introduces the following changes:

  • Adds the IPAllocAttrs type to represent IP-specific allocation attributes.
  • Updates the Node type to expose separate attributes for IPv4 and IPv6.
  • Updates Node instantiation, methods, etc. for the Node type changes introduced in this PR.
  • Updates the internal resyncStats API to expose separate attributes for IPv4
    and IPv6 node statistics.
  • Updates the AllocationAction API to expose separate IP allocation attributes for IPv4
    and IPv6.
  • Updates cloud provider IPAM pkgs for API changes.

Note: This PR does not implement IPv6 Node attributes.

Supports: #19251

@danehans danehans requested a review from a team as a code owner February 8, 2024 21:19
@danehans danehans requested a review from tommyp1ckles February 8, 2024 21:19
@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 Feb 8, 2024
@danehans
Copy link
Contributor Author

danehans commented Feb 8, 2024

/test

@danehans danehans force-pushed the issue_19251_ipam_api_refactor branch 2 times, most recently from 6efd000 to e733a51 Compare February 21, 2024 22:30
@danehans danehans requested review from a team as code owners February 21, 2024 22:30
@danehans danehans requested a review from aanm February 21, 2024 22:30
@danehans danehans force-pushed the issue_19251_ipam_api_refactor branch from e733a51 to 620b4a7 Compare February 21, 2024 22:44
@danehans danehans changed the title pkg/ipam: Refactors Node Type to Support IP Families IPAM: Refactors Node API Types to Support Separate IP Families Feb 21, 2024
@danehans danehans force-pushed the issue_19251_ipam_api_refactor branch from 620b4a7 to 0b266af Compare February 21, 2024 23:12
Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

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

It's nice to see preparation / refactoring PRs outside of the implementation PR 💯

@aanm aanm added kind/cleanup This includes no functional changes. release-note/misc This PR makes changes that have no direct user impact. labels Feb 22, 2024
@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 Feb 22, 2024
@aanm
Copy link
Member

aanm commented Feb 22, 2024

/test

Copy link
Member

@christarazi christarazi left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. A few comments:

  1. See below
  2. For the change to EmptyInterfaceSlots, I didn't see any justification for it in the commit msg, but from the context of the changes, I deduce that EmptyInterfaceSlots is not subject to IP family, so it has been moved out of the IP family-specific struct. Is that right? If so, please add that context to the commit msg.

@danehans
Copy link
Contributor Author

For the change to EmptyInterfaceSlots, I didn't see any justification for it in the commit msg, but from the context of the changes, I deduce that EmptyInterfaceSlots is not subject to IP family, so it has been moved out of the IP family-specific struct.

@christarazi you are correct, EmptyInterfaceSlots is not IP family specific, so it remains a Statistics field. I will update the commit message accordingly.

@danehans danehans force-pushed the issue_19251_ipam_api_refactor branch from 0b266af to a620529 Compare February 27, 2024 18:19
@christarazi christarazi added sig/ipam area/ipam IP address management, including cloud IPAM labels Feb 28, 2024
@danehans danehans force-pushed the issue_19251_ipam_api_refactor branch from a620529 to 27e061b Compare March 4, 2024 19:42
@danehans
Copy link
Contributor Author

/ci-ipsec-upgrade

@danehans
Copy link
Contributor Author

/ci-ipsec-e2e

@danehans
Copy link
Contributor Author

/ci-clustermesh

@danehans
Copy link
Contributor Author

danehans commented Apr 1, 2024

/ci-ginkgo

@danehans
Copy link
Contributor Author

danehans commented Apr 1, 2024

/ci-e2e

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Apr 1, 2024
@aanm aanm added this pull request to the merge queue Apr 1, 2024
Merged via the queue into cilium:main with commit 7f505d7 Apr 1, 2024
@danehans danehans deleted the issue_19251_ipam_api_refactor branch April 1, 2024 16:58
danehans added a commit to danehans/cilium that referenced this pull request Apr 6, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request Apr 24, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request Apr 24, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request Apr 24, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request Apr 24, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request May 2, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request May 3, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request May 3, 2024
Adds datapath support for ENI IPv6 prefix delegation.

Supports cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request May 3, 2024
Previously, ENI prefix delegation support was limited to IPv4.
This PR updates existing structs, methods, etc. to support IPv6
prefix delegation. The overall implementation follows the existing
approach taken for IPv4 prefix delegation.

Although AWS assigns a /80 prefix to an ENI, 64 addresses are the
maximum number of allocatable addresses. This restriction can be user
configurable in the future if needed.

Supports cilium#30684

Note: IPv6 metrics are still unsupported and will be added in a
future PR.

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request May 3, 2024
- Updates all providers to support changes to IPAM NodeOpertions interface.
- Updates pkg/aws/ec2 to manage ENI, VPC, etc. IPv6 attributes.
- Updates pkg/aws/eni to manage IPv6 prefix delegation, e.g. address allocation,
  resyncing interfaces, etc.

Supports cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request May 3, 2024
Adds the `awsEnableIPv6PrefixDelegation` boolean flag for
enabling IPv6 prefix delegation for the ENI IPAM mode. This
flag is disabled by default.

Supports cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request May 7, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request May 8, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request May 10, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
danehans added a commit to danehans/cilium that referenced this pull request May 14, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
aanm pushed a commit to danehans/cilium that referenced this pull request Jun 17, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
github-merge-queue bot pushed a commit that referenced this pull request Jun 17, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: #30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
sgargan pushed a commit to sgargan/cilium that referenced this pull request Jun 19, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
youngnick pushed a commit to youngnick/cilium that referenced this pull request Jun 20, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
jrajahalme pushed a commit to jrajahalme/cilium that referenced this pull request Oct 13, 2024
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: cilium#30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipam IP address management, including cloud IPAM kind/cleanup This includes no functional changes. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. 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.

4 participants