First version CNI plugin

This commit is contained in:
Scott Yeager
2025-06-19 22:26:14 -07:00
parent f71a82f785
commit 9b7dbf733d
5 changed files with 357 additions and 0 deletions

26
Makefile Normal file
View File

@@ -0,0 +1,26 @@
PLUGIN_NAME = mycelium-cni
CNI_PLUGINS_DIR = /opt/cni/bin
CNI_CONFIG_DIR = /etc/cni/net.d
.PHONY: build install clean test
build:
go build -o $(PLUGIN_NAME) .
install: build
sudo cp $(PLUGIN_NAME) $(CNI_PLUGINS_DIR)/
sudo cp 10-mycelium.conflist $(CNI_CONFIG_DIR)/
clean:
rm -f $(PLUGIN_NAME)
sudo rm -f $(CNI_PLUGINS_DIR)/$(PLUGIN_NAME)
sudo rm -f $(CNI_CONFIG_DIR)/10-mycelium.conflist
test:
go test ./...
fmt:
go fmt ./...
vet:
go vet ./...