c09c62fbaafe08f9e479177e40d18eb509ea1f6b
Build flock Image / build (push) Has been cancelled
Core building block for M2 CNI ADD. Pure logic (no netlink), mutex- serialized, seedable from committed state via MarkInUse. Hooks into pkg/embed for ip-algo IID derivation. - resolveEffective() implements the design-doc cidr6/cidr4 annotation rules: equal→node, supernet→node, subnet→ann, disjoint→error. First-match-wins across multiple annotation CIDRs. - allocV6() random IID within the effective CIDR; on ip-algo, defers to embed.Embed. 16-retry on collision (regenerates IID or N nibble). - allocV4() linear scan skipping .0 (network), .1 (gateway), .<last> (broadcast). Smallest supported block: /30 with 1 usable address. - Deterministic fakeRand in tests covers: intersection matrix, random IID, embed path, collision→retry, v4 skip-gateway, v4 exhaustion, dual-stack, release-then-reallocate, family mismatch rejection. No agent Run-loop integration yet — NewIPAM(nc.Spec.CIDR6, nc.Spec.CIDR4) will be called from Server.Run once netlink + RPC are in place. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
flock
Kubernetes CNI for sjc001. Per-pod IPv4 opt-in, IID embedding, Ready-gated anycast via BGP.
Design doc: k8s-manager/dfritz-cni.md (in the operator's k8s-manager repo).
Status: M1 scaffold. Not functional. See milestones table in the design doc.
Layout
cmd/flock— CNI plugin binary (kubelet-invoked)cmd/flock-agent— DaemonSet binarypkg/api/v1alpha1—NodeConfigCRD typespkg/cni— CNI plugin internals + RPC clientpkg/agent— agent server, IPAM, state file, anycast, NetworkPolicypkg/embed—ip-algoIID embedding (pure)pkg/routing/{bird,ospf}— routing backendsdeploy/— CRDs, RBAC, DaemonSet manifests
License
Apache 2.0.
Description
Kubernetes CNI for sjc001 — per-pod IPv4 opt-in, IID embedding, Ready-gated anycast via BGP
Languages
Go
99.7%
Dockerfile
0.3%