diff --git a/Makefile b/Makefile index be53e1eef2..6bd17629e9 100644 --- a/Makefile +++ b/Makefile @@ -331,6 +331,7 @@ TOOLS = govulncheck \ kubectl \ kustomize \ yq \ + bpf2go \ tools: ## Install required Kepler tools ./hack/tools.sh diff --git a/hack/tools.sh b/hack/tools.sh index f1514d6bf7..773a737092 100755 --- a/hack/tools.sh +++ b/hack/tools.sh @@ -26,6 +26,7 @@ GOARCH="$(go env GOARCH)" declare -r PROJECT_ROOT GOOS GOARCH declare -r LOCAL_BIN="$PROJECT_ROOT/tmp/bin" +declare -r VENDOR_DIR="$PROJECT_ROOT/vendor" # tools declare -r KUBECTL_VERSION=${KUBECTL_VERSION:-v1.28.4} @@ -36,6 +37,7 @@ declare -r JQ_VERSION=${JQ_VERSION:-1.7} declare -r JQ_INSTALL_URL="https://github.com/jqlang/jq/releases/download/jq-$JQ_VERSION" declare -r YQ_VERSION=${YQ_VERSION:-v4.34.2} declare -r YQ_INSTALL_URL="https://github.com/mikefarah/yq/releases/download/$YQ_VERSION/yq_${GOOS}_${GOARCH}" +declare -r BPF2GO_VERSION="v0.15.0" source "$PROJECT_ROOT/hack/utils.bash" @@ -139,6 +141,12 @@ install_kubectl() { } +install_bpf2go() { + # not using go_install because we need it in vendor folder + GOBIN=$VENDOR_DIR go install github.com/cilium/ebpf/cmd/bpf2go@${BPF2GO_VERSION} + ok "bpf2go version $BPF2GO_VERSION was installed successfully" +} + install_all() { info "installing all tools ..." local ret=0