{"id":50808662,"url":"https://github.com/see-quick/netdev-cni","last_synced_at":"2026-06-13T03:07:29.166Z","repository":{"id":359544911,"uuid":"1245020760","full_name":"see-quick/netdev-cni","owner":"see-quick","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-22T12:08:15.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-22T16:49:40.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/see-quick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-20T20:40:52.000Z","updated_at":"2026-05-22T12:08:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/see-quick/netdev-cni","commit_stats":null,"previous_names":["see-quick/netdev-cni"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/see-quick/netdev-cni","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/see-quick%2Fnetdev-cni","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/see-quick%2Fnetdev-cni/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/see-quick%2Fnetdev-cni/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/see-quick%2Fnetdev-cni/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/see-quick","download_url":"https://codeload.github.com/see-quick/netdev-cni/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/see-quick%2Fnetdev-cni/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34270420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-13T03:07:28.444Z","updated_at":"2026-06-13T03:07:29.161Z","avatar_url":"https://github.com/see-quick.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netdev-cni\n\n\u003e [!NOTE] \n\u003e This project is for learning purposes only. It is not production-ready and should not be used in real environments.\n\nA learning/reference CNI plugin for Kubernetes demonstrating three progressive network device technologies:\n\n| Layer | Technology           | Mode                              |\n|-------|----------------------|-----------------------------------|\n| 1     | SR-IOV (`netdevice`) | VF moved into pod netns           |\n| 2     | DPDK (`vfio-pci`)    | PCI address written to pod volume |\n| 3     | RoCE / RDMA (`rdma`) | VF + soft-RoCE (`rdma_rxe`)       |\n\nOn clusters without real SR-IOV hardware (e.g. kind), the agent detects simulation mode and creates **veth pairs** instead of VFs.\n\n## Architecture\n\n```\n┌──────────────────────────────────────┐\n│  Cluster Operator (controller-runtime)│\n│  Reconciles SriovNetworkNodePolicy   │\n│  → SriovNetworkNodeState             │\n│  Reconciles SriovNetwork             │\n│  → Multus NetworkAttachmentDefinition│\n└──────────────────────────────────────┘\n              ↓ per node\n┌──────────────────────────────────────┐\n│  Node Agent (DaemonSet)              │\n│  Detects VFs or creates veth pairs   │\n│  Manages VF pool                     │\n│  Unix socket: /var/run/netdev-cni/   │\n└──────────────────────────────────────┘\n              ↓ CNI ADD/DEL\n┌──────────────────────────────────────┐\n│  CNI Binary (/opt/cni/bin/netdev-cni)│\n│  Calls agent to allocate/release VF  │\n│  Moves interface into pod netns      │\n└──────────────────────────────────────┘\n```\n\n## Quick Start (kind simulation)\n\n```bash\n# 1. Build container images\nmake docker-build\n\n# 2. Create kind cluster\nkind create cluster --config deploy/kind/cluster.yaml\n\n# 3. Load images\nkind load docker-image localhost/netdev-cni/node-agent:latest localhost/netdev-cni/operator:latest localhost/netdev-cni/cni-plugin:latest\n\n# 4. Install CRDs and Multus\nkubectl apply -f deploy/crds/\n\n# 5. Deploy operator and agent\nkubectl apply -f deploy/operator.yaml\nkubectl apply -f deploy/daemonset.yaml\n\n# 6. Create SR-IOV network policy and network\nkubectl apply -f deploy/kind/sriov-net.yaml\n\n# 7. Test layer 1 (netdevice)\nkubectl apply -f deploy/kind/test-pod-layer1.yaml\nkubectl exec test-layer1 -- ip link show net1\n```\n\n## Packages\n\n| Package             | Purpose                                                                      |\n|---------------------|------------------------------------------------------------------------------|\n| `pkg/apis/v1alpha1` | CRD types: `SriovNetworkNodePolicy`, `SriovNetwork`, `SriovNetworkNodeState` |\n| `pkg/simulation`    | Veth-pair simulation backend for kind                                        |\n| `pkg/agent`         | VF pool, Unix socket server, IPC protocol                                    |\n| `pkg/netns`         | Move interfaces into pod network namespaces                                  |\n| `pkg/cni`           | CNI ADD/DEL/CHECK handlers (Linux only)                                      |\n| `pkg/controllers`   | Operator reconcilers                                                         |\n\n## Testing\n\n```bash\n# Unit tests\nKUBEBUILDER_ASSETS=~/envtest-binaries/k8s/1.29.5-darwin-arm64 go test ./... -short\n\n# Integration tests (requires a running kind cluster with the stack deployed)\ngo test -tags integration ./test/integration/ -v\n```\n\n## CRD Generation\n\n```bash\ngo install sigs.k8s.io/controller-tools/cmd/controller-gen@latest\ncontroller-gen crd paths=\"./pkg/apis/...\" output:crd:artifacts:config=deploy/crds\ncontroller-gen object paths=\"./pkg/apis/...\"\n```\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsee-quick%2Fnetdev-cni","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsee-quick%2Fnetdev-cni","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsee-quick%2Fnetdev-cni/lists"}