mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 23:03:40 +00:00
Revert #5479, don't force no cgo.
We allow cgo when available since some of our server components (mainly Kubelet) rely on it. The current driving factor for the static binaries was building Docker images from scratch. We will instead use images built from small busybox bases. Fixes #5517
This commit is contained in:
parent
0b67c9e94c
commit
d7a7d4da08
@ -296,13 +296,13 @@ kube::golang::build_binaries() {
|
||||
if [[ ${GOOS} == "windows" ]]; then
|
||||
bin="${bin}.exe"
|
||||
fi
|
||||
CGO_ENABLED=0 go build -installsuffix cgo -o "${output_path}/${bin}" \
|
||||
go build -o "${output_path}/${bin}" \
|
||||
"${goflags[@]:+${goflags[@]}}" \
|
||||
-ldflags "${version_ldflags}" \
|
||||
"${binary}"
|
||||
done
|
||||
else
|
||||
CGO_ENABLED=0 go install -installsuffix cgo "${goflags[@]:+${goflags[@]}}" \
|
||||
go install "${goflags[@]:+${goflags[@]}}" \
|
||||
-ldflags "${version_ldflags}" \
|
||||
"${binaries[@]}"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user