From d21188fcf11639fc060d7405d5d419d369c00dba Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Thu, 26 Nov 2020 10:47:45 +0100 Subject: [PATCH] Make parallel build memory threshold configurable The amount of memory required to build binaries in parallel is right now set to 40GiB. We now make this variable to be able to build artifacts in parallel even with a lower amount of memory. This enables SIG Release to speed-up the build time drastically in Google Cloud Build (GCB). Signed-off-by: Sascha Grunert --- hack/lib/golang.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index bef1d837703e2..7c391a5ca90d5 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -305,9 +305,10 @@ readonly KUBE_TEST_SERVER_BINARIES=("${KUBE_TEST_SERVER_TARGETS[@]##*/}") readonly KUBE_TEST_SERVER_PLATFORMS=("${KUBE_SERVER_PLATFORMS[@]:+"${KUBE_SERVER_PLATFORMS[@]}"}") # Gigabytes necessary for parallel platform builds. -# As of January 2018, RAM usage is exceeding 30G -# Setting to 40 to provide some headroom -readonly KUBE_PARALLEL_BUILD_MEMORY=40 +# As of January 2018, RAM usage is exceeding 30G. +# This variable can be overwritten at your own risk. +# It's defaulting to 40G to provide some headroom +readonly KUBE_PARALLEL_BUILD_MEMORY=${KUBE_PARALLEL_BUILD_MEMORY:-40} readonly KUBE_ALL_TARGETS=( "${KUBE_SERVER_TARGETS[@]}"