Fetch deps on first build
This commit is contained in:
		
							
								
								
									
										7
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								Makefile
									
									
									
									
									
								
							| @@ -2,9 +2,12 @@ PLUGIN_NAME = mycelium-cni | ||||
| CNI_PLUGINS_DIR = /opt/cni/bin | ||||
| CNI_CONFIG_DIR = /etc/cni/net.d | ||||
|  | ||||
| .PHONY: build install clean test | ||||
| .PHONY: build install clean test deps | ||||
|  | ||||
| build: | ||||
| deps: | ||||
| 	go mod tidy | ||||
|  | ||||
| build: deps | ||||
| 	go build -o $(PLUGIN_NAME) . | ||||
|  | ||||
| install: build | ||||
|   | ||||
| @@ -15,13 +15,15 @@ This CNI plugin integrates with the Mycelium overlay network to provide IPv6 con | ||||
| ## Installation | ||||
|  | ||||
| ```bash | ||||
| # Build the plugin | ||||
| # Download dependencies and build the plugin | ||||
| make build | ||||
|  | ||||
| # Install plugin and configuration | ||||
| make install | ||||
| ``` | ||||
|  | ||||
| > **Note**: The first build will download Go dependencies automatically via `go mod tidy`. | ||||
|  | ||||
| ## Configuration | ||||
|  | ||||
| The plugin uses a CNI configuration file (`10-mycelium.conflist`) that specifies the Mycelium interface name: | ||||
| @@ -86,7 +88,7 @@ sudo systemctl enable --now mycelium | ||||
| On each Kubernetes node: | ||||
|  | ||||
| ```bash | ||||
| # Build and install the plugin | ||||
| # Download dependencies, build and install the plugin | ||||
| make build | ||||
| sudo make install | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user