[41867] Part 3: Add subnet config watcher with stateDB and BPF map sync#43438
Conversation
489d3dc to
bdd65e2
Compare
|
👋 mind addressing the test gaps in the datapath first, so that we can chase down bugs without needing the whole controlplane / e2e tests? |
#43631 adds the bpf tests. Thanks! |
gandro
left a comment
There was a problem hiding this comment.
Thanks! Overall looks okay to me, some minor things that I noticed in a first pass through.
bdd65e2 to
ce24658
Compare
|
@gandro Thanks for the review; addressed your comments and left one open for discussion. |
Signed-off-by: Anubhab Majumdar <anmajumdar@microsoft.com>
2a3e61f to
5b0bc35
Compare
|
/test |
…ting - Implement SubnetMapKey and SubnetMapValue for LPM trie lookups - Support both IPv4 and IPv6 address families - Add comprehensive unit tests for key/value operations - Add subnet/map-dump command for script testing and debugging - Map types synced with bpf/lib/subnet.h Signed-off-by: Anubhab Majumdar <anmajumdar@microsoft.com>
- Add subnet-identities stateDB table to store CIDR->Identity mappings - Register reconciler to sync table entries to bpf map (cilium_subnet_map) - Introduce maps/subnet cell Signed-off-by: Anubhab Majumdar <anmajumdar@microsoft.com>
- Introduce subnet-map config to supply underlying subnet configuration - Implement a watcher for above config that parse and adds the entries into subnet-identities stateDB - Provide a cell for pkg/subnet Signed-off-by: Anubhab Majumdar <anmajumdar@microsoft.com>
Add script based tests to verify subnet configuration flows configmap to stateDB to bpf map. Signed-off-by: Anubhab Majumdar <anmajumdar@microsoft.com>
5b0bc35 to
262bade
Compare
|
/test |
|
/ci-gateway-api |
|
/ci-ginkgo |
|
The |
smagnani96
left a comment
There was a problem hiding this comment.
LGTM, thanks 💯
Left one conversation open just to make sure we're not causing disruptions.
(In case, I expect we will catch it in subsequent PRs where we will test this in CI).
Description
The motivation behind adding a new routing mode is discussed in this CFP .
Part-1 : #41868
Part-2 : #43631
This PR introduces subnet-to-identity mapping infrastructure in control plane to support hybrid
routing mode in Cilium. We introduce a StateDB for caching and reconciliation, with a
Kubernetes ConfigMap-driven configuration model. The stateDB data is sync'd to already introduce eBPF map.
Key Changes
This PR adds infrastructure for subnet-to-identity mapping in hybrid routing mode:
RoutingModeHybridconstant to routing mode optionscilium_subnet_mapunderpkg/mapssubnet-identitiesStateDB table to cache subnet topologyTesting Done
Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXXline if the commit addresses a particularGitHub issue.
Fixes: <commit-id>tag, thenplease add the commit author[s] as reviewer[s] to this issue.
Fixes: #41867