- Go 1.22+: Language runtime
- Docker: Container builds
- kubectl: Kubernetes CLI
- kind or minikube: Local Kubernetes cluster
- golangci-lint: Linting (auto-installed by Make)
- bpftool: eBPF debugging and vmlinux.h generation
- clang/llvm: eBPF compilation
git clone https://github.com/terraboops/natra.git
cd natra./scripts/verify-kernel.shShould show:
- Kernel 5.x+ (minimum)
- tcx support (kernel 6.6+, preferred)
- BTF available
yay -S bpftool clang llvmsudo apt-get install clang llvm linux-tools-common linux-tools-generic# Build CNI plugin
make build-cni
# Build Docker image
make docker-build# Unit tests
make test# Format code
make fmt
# Vet code
make vet
# Lint
make lint
# All checks
make check# Create Kind cluster
kind create cluster --name natra-dev
# Build and load image
make docker-build
kind load docker-image ghcr.io/terraboops/natra:latest --name natra-dev
# Deploy CNI installer
kubectl apply -f deploy/cni-installer.yaml
# Check status
kubectl get pods -n kube-system -l app=natranatra/
├── cmd/
│ └── natra/ # CNI plugin entry point
├── pkg/
│ └── cni/
│ └── config/ # Configuration parsing
├── deploy/
│ ├── docker/ # Dockerfiles
│ ├── cni-installer.yaml # DaemonSet installer
│ └── cni-config.json # Example CNI config
├── scripts/
│ ├── verify-kernel.sh # Kernel check
│ └── generate-vmlinux.sh # vmlinux.h generation
└── docs/ # Documentation
# Test CNI plugin manually (requires CNI_* env vars)
echo '{"cniVersion":"0.4.0","name":"test"}' | CNI_COMMAND=VERSION ./bin/natra
# Check CNI logs (written to stderr, captured by kubelet)
journalctl -u kubelet | grep natra# Create test pod with bandwidth annotation
kubectl run test --image=nginx --annotations="kubernetes.io/ingress-bandwidth=10M"
# Check pod status
kubectl get pod test -o yaml- Create feature branch
- Make changes (keep PRs under 200 lines)
- Run
make check testlocally - Create PR
- CI runs automatically
- Merge after approval