Skip to content

feat: replace SRv6 endpoint routing with IPAM-managed pod subnet alloc#132

Merged
privateip merged 1 commit into
mainfrom
feat/testvpc
Jun 25, 2026
Merged

feat: replace SRv6 endpoint routing with IPAM-managed pod subnet alloc#132
privateip merged 1 commit into
mainfrom
feat/testvpc

Conversation

@privateip

Copy link
Copy Markdown
Contributor

Summary

This patch adds a new resource that can be used to test and exercise the
CNI connection. The once the containerlab deployment is active running
task deploy:testvpc will deploy pods to each cluster and craete a VPC
between them

Changes

  • Add internal/cni/ipam package with PoolAllocator and StaticAllocator for IPv6 /80 subnet allocation from a CIDR pool
  • Rewrite cmdAdd to configure IPAM, set IP address and default route on the guest interface inside the container netns, and advertise the allocated pod subnet in the BGPAdvertisement CRD
  • Rewrite cmdDel to deallocate IPAM by reading the allocated subnet from the BGPAdvertisement CRD annotation keyed by container ID
  • Remove SRv6 ingress route setup from CNI; the controller now derives the SRv6 endpoint from the pod subnet and installs the ingress route
  • Add idempotency guards to veth.Add and vrf.Add so a leftover interface from a prior failed cmdAdd does not cause cmdAdd to fail
  • Wrap galactic-cni binary with a shell script that exports NODE_NAME and KUBECONFIG so the CNI binary can reach the API server in Kind
  • Add containerlab test VPC resources (NAD, nginx deployment, RBAC) and install-testvpc.sh script to deploy cross-cluster connectivity
  • Create /var/run/galactic-cni directory in Dockerfile for IPAM state
  • Update BGPVRFInstance route target format to drop "rt:" prefix

…cation

This patch adds a new resource that can be used to test and exercise the
CNI connection.   The once the containerlab deployment is active running
`task deploy:testvpc` will deploy pods to each cluster and craete a VPC
between them

- Add internal/cni/ipam package with PoolAllocator and StaticAllocator
  for IPv6 /80 subnet allocation from a CIDR pool
- Rewrite cmdAdd to configure IPAM, set IP address and default route
  on the guest interface inside the container netns, and advertise the
  allocated pod subnet in the BGPAdvertisement CRD
- Rewrite cmdDel to deallocate IPAM by reading the allocated subnet
  from the BGPAdvertisement CRD annotation keyed by container ID
- Remove SRv6 ingress route setup from CNI; the controller now derives
  the SRv6 endpoint from the pod subnet and installs the ingress route
- Add idempotency guards to veth.Add and vrf.Add so a leftover interface
  from a prior failed cmdAdd does not cause cmdAdd to fail
- Wrap galactic-cni binary with a shell script that exports NODE_NAME
  and KUBECONFIG so the CNI binary can reach the API server in Kind
- Add containerlab test VPC resources (NAD, nginx deployment, RBAC)
  and install-testvpc.sh script to deploy cross-cluster connectivity
- Create /var/run/galactic-cni directory in Dockerfile for IPAM state
- Update BGPVRFInstance route target format to drop "rt:" prefix
@privateip privateip requested a review from a team as a code owner June 25, 2026 21:17
@privateip privateip requested a review from bmertens-datum June 25, 2026 21:17

@scotwells scotwells left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Assume this IPAM CNI is just for testing? Ignore me! I just read the description

@privateip privateip merged commit d0e4760 into main Jun 25, 2026
5 checks passed
@privateip privateip deleted the feat/testvpc branch June 25, 2026 21:42
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