Skip to content

Commit

Permalink
Merge pull request #1846 from vimalk78/tools-bpf2go
Browse files Browse the repository at this point in the history
chore(tools): Update script to download bpf2go
  • Loading branch information
sthaha authored Nov 14, 2024
2 parents 9f9aefb + 7b10fb0 commit eba0372
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ TOOLS = govulncheck \
kubectl \
kustomize \
yq \
bpf2go \

tools: ## Install required Kepler tools
./hack/tools.sh
Expand Down
8 changes: 8 additions & 0 deletions hack/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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"

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit eba0372

Please sign in to comment.