Skip to content

CFP: Config option to customize the default IP Pool when using MultiPool #27131

@LAMRobinson

Description

@LAMRobinson

Cilium Feature Proposal

Describe the feature you'd like

With the new MultiPool IPAM mode, I want to be able to set the default IP Pools a node uses, so I can have nodes in different datacenters using IP ranges within the over-arching IP summary for that DC.

For example:

  • DC1 - 10.0.0.0/16
    • Node 1 - 10.0.0.0/24
    • Node 2 - 10.0.1.0/24
  • DC2 - 10.1.0.0/16
    • Node 3 - 10.1.0.0/24
    • Node 4 - 10.1.1.0/24

I'd need to be able to apply different default IP pools to different nodes based on Node label.

Pod / Namespace specified IPPools should naturally take priority.

(Optional) Describe your proposed solution

As per the conversation in Slack, we already have a Const PoolDefault which is used here as the fallback if the pod/namespace doesn't specify a specific pool.

The proposed solution is to change that const to a var and set it via a new default-ip-pool (DefaultIPPool) option in the Daemon Configuration, which would have a default value of default (to match current behaviour).

This can then be set at a cluster level, but more importantly for this issue, at a node level using CiliumNodeConfig. The above use case could be solved by creating a CiliumNodeConfig for each DC, use a label selector like topology.kubernetes.io/zone == DCX, and set the new DefaultIPPool option to the IPPool for DCX.

A future enhancement would be to allow the selection of a DefaultIPPool using a labelselector, to avoid hard coding in configs, but that would be a next step / in-addition.

I will log a PR with these changes once I get an initial go ahead here. Please do let me know what I should name this new flag.

Once the CFP is close to being finalized, please add it as a PR to the design-cfps repo for final approval.

Metadata

Metadata

Assignees

Labels

area/agentCilium agent related.area/ipamIP address management, including cloud IPAMarea/multipoolAffects Multi-Pool IPAMhelp-wantedPlease volunteer for this by adding yourself as an assignee!kind/featureThis introduces new functionality.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions