You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a Go CNI IPAM binary embedding upstream host-local allocation and disk storage.
Require a bounded, versioned protobuf exchange over a local Unix socket for ADD; retain offline DEL, CHECK, and VERSION.
Reject caller-supplied allocation pools, including case-folded runtime overrides and duplicate top-level IPAM aliases, and preserve network-scoped reservation compatibility.
Include build wiring, dependency notices, protocol/lifecycle tests, and reboot/reassignment subprocess coverage.
Scope
First layer of the IPAM stack. Agent integration and deployment are in #943. This layer does not switch the active CNI configuration.
Review fixes
0b56dcb57: reject noncanonical case-folded top-level IPAM keys before agent communication or reservation writes. Regression cases include both ipam and an alias carrying caller-supplied subnet and storage settings.
a81637dae: hold a persistent per-socket ownership lock across stale-socket recovery and shutdown, with concurrent recovery and restart coverage.
6c2b16f92: reject null requested-IP entries using the upstream decoder schema, with valid/null CNI subprocess cases for runtime and args inputs.
Validation
Focused package tests passed during pre-publication review. Combined implementation was exercised on managed Unbounded CNI and delegated Cilium AKS clusters, including concurrent allocation, offline cleanup, delayed assignment, and API/controller outages.
For the review fixes, reproduced the alias bypass, null-IP panic, and missing socket ownership exclusion before the changes. Full IPAM package race tests, repeated concurrent socket recovery, and repository formatting/lint checks passed afterward.
Limitations
GC and STATUS are unsupported. ADD intentionally fails without an eligible local agent; agent implementation follows in #943.
Embed upstream host-local allocation and storage behind a bounded protobuf exchange. Require verified agent ranges for ADD while keeping DEL, CHECK, and VERSION independent of the agent. Cover reboot reassignment, protocol boundaries, socket lifecycle, and standard CNI result versions.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8bb0fa01-6bf2-4bcd-9143-5c3f634e282f
Include the reviewed range-override fix in the standalone plugin layer before agent integration.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8bb0fa01-6bf2-4bcd-9143-5c3f634e282f
Adds a host-local-backed CNI IPAM plugin requiring agent-provided allocation ranges over a Unix socket. Agent integration follows in #943; active CNI configuration remains unchanged.
Changes:
Adds verified ADD allocation and offline DEL/CHECK support.
Introduces bounded, versioned protobuf communication and lifecycle tests.
Adds build targets, dependencies, and notices.
File
Description
NOTICE
Adds CNI dependency notices.
Makefile
Adds plugin build targets.
internal/net/ipam/transport.go
Implements Unix-socket protocol and lifecycle.
internal/net/ipam/subprocess_test.go
Tests CNI commands and reassignment scenarios.
internal/net/ipam/proto/ipam.proto
Defines configuration protocol.
internal/net/ipam/proto/ipam.pb.go
Adds generated protobuf bindings.
internal/net/ipam/proto/generate.go
Adds protobuf generation command.
internal/net/ipam/plugin.go
Implements allocation, validation, and cleanup.
internal/net/ipam/ipam_test.go
Tests allocation, transport, and cleanup behavior.
Reject ambiguous top-level IPAM keys before contacting the agent or creating reservations. Cover duplicate aliases with verified-range and reservation-directory overrides.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6b70e00f-eec0-4611-97c6-1b6200092b62
Validate requested IP lists to prevent nil-pointer panic
internal/net/ipam/plugin.go:125
With a ready agent, "runtimeConfig":{"ips":[null]} or "args":{"cni":{"ips":[null]}} reaches this loader. Host-local v1.9.1 decodes these entries as *ip.IP and calls ToIP() without a nil check, causing ADD to panic instead of returning a structured CNI error. Validate both requested-IP lists before invoking the loader, using the same decoder so case-folded field names are covered, and add subprocess regressions for both forms.
Hold a persistent per-socket flock across stale-socket inspection, listener creation, and identity-safe cleanup. Make shutdown idempotent and cover contention, concurrent recovery, restart, and unsafe lock paths.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6b70e00f-eec0-4611-97c6-1b6200092b62
Decode requested-IP fields with the upstream allocator schema and reject null entries before its unchecked dereference. Cover valid and null runtimeConfig and args.cni requests, including case-folded names, through the CNI subprocess.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6b70e00f-eec0-4611-97c6-1b6200092b62
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scope
First layer of the IPAM stack. Agent integration and deployment are in #943. This layer does not switch the active CNI configuration.
Review fixes
0b56dcb57: reject noncanonical case-folded top-level IPAM keys before agent communication or reservation writes. Regression cases include bothipamand an alias carrying caller-supplied subnet and storage settings.a81637dae: hold a persistent per-socket ownership lock across stale-socket recovery and shutdown, with concurrent recovery and restart coverage.6c2b16f92: reject null requested-IP entries using the upstream decoder schema, with valid/null CNI subprocess cases for runtime and args inputs.Validation
Focused package tests passed during pre-publication review. Combined implementation was exercised on managed Unbounded CNI and delegated Cilium AKS clusters, including concurrent allocation, offline cleanup, delayed assignment, and API/controller outages.
For the review fixes, reproduced the alias bypass, null-IP panic, and missing socket ownership exclusion before the changes. Full IPAM package race tests, repeated concurrent socket recovery, and repository formatting/lint checks passed afterward.
Limitations
GC and STATUS are unsupported. ADD intentionally fails without an eligible local agent; agent implementation follows in #943.