mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-02-14 18:09:51 +00:00
🚚 Move tap directory to kubeshark/worker and use kubeshark/worker Docker image instead (#1248)
* Remove `tap` directory * Fix the depedencies and build errors * Fix the linter errors * Use `kubeshark/worker` image as tapper * Arrange the pod prefixes and suffixes * Don't install any dependencies in the CI * Remove `devops` directory * Don't generate eBPF object files in the CI * Fix `Makefile` * Update `Dockerfile`
This commit is contained in:
30
Makefile
30
Makefile
@@ -8,7 +8,7 @@ SHELL=/bin/bash
|
||||
# HELP
|
||||
# This will output the help for each task
|
||||
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
|
||||
.PHONY: help ui agent agent-debug cli tap docker bpf clean-bpf
|
||||
.PHONY: help ui agent agent-debug cli docker
|
||||
|
||||
help: ## This help.
|
||||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
||||
@@ -20,14 +20,6 @@ TS_SUFFIX="$(shell date '+%s')"
|
||||
GIT_BRANCH="$(shell git branch | grep \* | cut -d ' ' -f2 | tr '[:upper:]' '[:lower:]' | tr '/' '_')"
|
||||
BUCKET_PATH=static.up9.io/kubeshark/$(GIT_BRANCH)
|
||||
export VER?=0.0
|
||||
ARCH=$(shell uname -m)
|
||||
ifeq ($(ARCH),$(filter $(ARCH),aarch64 arm64))
|
||||
BPF_TARGET=arm64
|
||||
BPF_ARCH_SUFFIX=arm64
|
||||
else
|
||||
BPF_TARGET=amd64
|
||||
BPF_ARCH_SUFFIX=x86
|
||||
endif
|
||||
|
||||
ui: ## Build UI.
|
||||
@(cd ui; npm i ; npm run build; )
|
||||
@@ -39,14 +31,11 @@ cli: ## Build CLI.
|
||||
cli-debug: ## Build CLI.
|
||||
@echo "building cli"; cd cli && $(MAKE) build-debug
|
||||
|
||||
agent: bpf ## Build agent.
|
||||
agent: ## Build agent.
|
||||
@(echo "building kubeshark agent .." )
|
||||
@(cd agent; go build -o build/kubesharkagent main.go)
|
||||
@ls -l agent/build
|
||||
|
||||
bpf:
|
||||
BPF_TARGET="$(BPF_TARGET)" BPF_CFLAGS="-O2 -g -D__TARGET_ARCH_$(BPF_ARCH_SUFFIX)" go generate tap/tlstapper/tls_tapper.go
|
||||
|
||||
agent-debug: ## Build agent for debug.
|
||||
@(echo "building kubeshark agent for debug.." )
|
||||
@(cd agent; go build -gcflags="all=-N -l" -o build/kubesharkagent main.go)
|
||||
@@ -87,19 +76,12 @@ clean-cli: ## Clean CLI.
|
||||
clean-docker: ## Run clean docker
|
||||
@(echo "DOCKER cleanup - NOT IMPLEMENTED YET " )
|
||||
|
||||
clean-bpf:
|
||||
@(rm $(BPF_O_FILES) ; echo "bpf cleanup done" )
|
||||
|
||||
lint: ## Run lint on all modules
|
||||
cd agent && golangci-lint run
|
||||
cd shared && golangci-lint run
|
||||
cd tap && golangci-lint run
|
||||
cd cli && golangci-lint run
|
||||
cd tap/api && golangci-lint run
|
||||
cd tap/dbgctl && golangci-lint run
|
||||
cd tap/extensions/ && for D in */; do cd $$D && golangci-lint run && cd ..; done
|
||||
|
||||
test: test-cli test-agent test-shared test-extensions
|
||||
test: test-cli test-agent test-shared
|
||||
|
||||
test-cli: ## Run cli tests
|
||||
@echo "running cli tests"; cd cli && $(MAKE) test
|
||||
@@ -109,9 +91,3 @@ test-agent: ## Run agent tests
|
||||
|
||||
test-shared: ## Run shared tests
|
||||
@echo "running shared tests"; cd shared && $(MAKE) test
|
||||
|
||||
test-extensions: ## Run extensions tests
|
||||
@echo "running http tests"; cd tap/extensions/http && $(MAKE) test
|
||||
@echo "running redis tests"; cd tap/extensions/redis && $(MAKE) test
|
||||
@echo "running kafka tests"; cd tap/extensions/kafka && $(MAKE) test
|
||||
@echo "running amqp tests"; cd tap/extensions/amqp && $(MAKE) test
|
||||
|
||||
Reference in New Issue
Block a user