Commit d7a7d4da authored by Victor Marmol's avatar Victor Marmol

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
parent 0b67c9e9
...@@ -296,13 +296,13 @@ kube::golang::build_binaries() { ...@@ -296,13 +296,13 @@ kube::golang::build_binaries() {
if [[ ${GOOS} == "windows" ]]; then if [[ ${GOOS} == "windows" ]]; then
bin="${bin}.exe" bin="${bin}.exe"
fi fi
CGO_ENABLED=0 go build -installsuffix cgo -o "${output_path}/${bin}" \ go build -o "${output_path}/${bin}" \
"${goflags[@]:+${goflags[@]}}" \ "${goflags[@]:+${goflags[@]}}" \
-ldflags "${version_ldflags}" \ -ldflags "${version_ldflags}" \
"${binary}" "${binary}"
done done
else else
CGO_ENABLED=0 go install -installsuffix cgo "${goflags[@]:+${goflags[@]}}" \ go install "${goflags[@]:+${goflags[@]}}" \
-ldflags "${version_ldflags}" \ -ldflags "${version_ldflags}" \
"${binaries[@]}" "${binaries[@]}"
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment