Merge pull request #27047 from luxas/enable-ppc64le

Automatic merge from submit-queue

Enable all ppc64le builds, except for hyperkube

Partially fixes: #25886 
Talked to @Pensu, and all other binaries seem to work fine

@david-mcmahon @ixdy @Pensu @smarterclayton
This commit is contained in:
k8s-merge-robot 2016-06-18 16:32:19 -07:00 committed by GitHub
commit 637734f003
2 changed files with 32 additions and 15 deletions

View File

@ -126,7 +126,7 @@ kube::build::get_docker_wrapped_binaries() {
kube-scheduler,ppc64le/busybox kube-scheduler,ppc64le/busybox
kube-proxy,gcr.io/google_containers/debian-iptables-ppc64le:v3 kube-proxy,gcr.io/google_containers/debian-iptables-ppc64le:v3
federation-apiserver,ppc64le/busybox federation-apiserver,ppc64le/busybox
federation-controller-manager,ppc64lebusybox federation-controller-manager,ppc64le/busybox
);; );;
esac esac
@ -690,8 +690,11 @@ function kube::release::package_hyperkube() {
if [[ -n "${KUBE_DOCKER_IMAGE_TAG-}" && -n "${KUBE_DOCKER_REGISTRY-}" ]]; then if [[ -n "${KUBE_DOCKER_IMAGE_TAG-}" && -n "${KUBE_DOCKER_REGISTRY-}" ]]; then
for arch in "${KUBE_SERVER_PLATFORMS[@]##*/}"; do for arch in "${KUBE_SERVER_PLATFORMS[@]##*/}"; do
kube::log::status "Building hyperkube image for arch: ${arch}" # TODO(IBM): Enable hyperkube builds for ppc64le again
REGISTRY="${KUBE_DOCKER_REGISTRY}" VERSION="${KUBE_DOCKER_IMAGE_TAG}" ARCH="${arch}" make -C cluster/images/hyperkube/ build if [[ ${arch} != "ppc64le" ]]; then
kube::log::status "Building hyperkube image for arch: ${arch}"
REGISTRY="${KUBE_DOCKER_REGISTRY}" VERSION="${KUBE_DOCKER_IMAGE_TAG}" ARCH="${arch}" make -C cluster/images/hyperkube/ build
fi
done done
fi fi
} }
@ -1528,18 +1531,22 @@ function kube::release::docker::release() {
for arch in "${KUBE_SERVER_PLATFORMS[@]##*/}"; do for arch in "${KUBE_SERVER_PLATFORMS[@]##*/}"; do
for binary in "${binaries[@]}"; do for binary in "${binaries[@]}"; do
local docker_target="${KUBE_DOCKER_REGISTRY}/${binary}-${arch}:${KUBE_DOCKER_IMAGE_TAG}" # TODO(IBM): Enable hyperkube builds for ppc64le again
kube::log::status "Pushing ${binary} to ${docker_target}" if [[ ${binary} != "hyperkube" || ${arch} != "ppc64le" ]]; then
"${docker_push_cmd[@]}" push "${docker_target}"
# If we have a amd64 docker image. Tag it without -amd64 also and push it for compatibility with earlier versions local docker_target="${KUBE_DOCKER_REGISTRY}/${binary}-${arch}:${KUBE_DOCKER_IMAGE_TAG}"
if [[ ${arch} == "amd64" ]]; then kube::log::status "Pushing ${binary} to ${docker_target}"
local legacy_docker_target="${KUBE_DOCKER_REGISTRY}/${binary}:${KUBE_DOCKER_IMAGE_TAG}" "${docker_push_cmd[@]}" push "${docker_target}"
"${DOCKER[@]}" tag -f "${docker_target}" "${legacy_docker_target}" 2>/dev/null # If we have a amd64 docker image. Tag it without -amd64 also and push it for compatibility with earlier versions
if [[ ${arch} == "amd64" ]]; then
local legacy_docker_target="${KUBE_DOCKER_REGISTRY}/${binary}:${KUBE_DOCKER_IMAGE_TAG}"
kube::log::status "Pushing ${binary} to ${legacy_docker_target}" "${DOCKER[@]}" tag -f "${docker_target}" "${legacy_docker_target}" 2>/dev/null
"${docker_push_cmd[@]}" push "${legacy_docker_target}"
kube::log::status "Pushing ${binary} to ${legacy_docker_target}"
"${docker_push_cmd[@]}" push "${legacy_docker_target}"
fi
fi fi
done done
done done

View File

@ -69,7 +69,7 @@ else
linux/amd64 linux/amd64
linux/arm linux/arm
linux/arm64 linux/arm64
#linux/ppc64le # temporarily disabled due to a linking error linux/ppc64le # note: hyperkube is temporarily disabled due to a linking error
) )
# If we update this we should also update the set of golang compilers we build # If we update this we should also update the set of golang compilers we build
@ -79,7 +79,7 @@ else
linux/386 linux/386
linux/arm linux/arm
linux/arm64 linux/arm64
#linux/ppc64le # temporarily disabled due to a linking error linux/ppc64le
darwin/amd64 darwin/amd64
darwin/386 darwin/386
windows/amd64 windows/amd64
@ -454,7 +454,16 @@ kube::golang::build_binaries_for_platform() {
local -a nonstatics=() local -a nonstatics=()
local -a tests=() local -a tests=()
for binary in "${binaries[@]}"; do for binary in "${binaries[@]}"; do
if [[ "${binary}" =~ ".test"$ ]]; then
# TODO(IBM): Enable hyperkube builds for ppc64le again
# The current workaround creates a text file with help text instead of a binary
# We're doing it this way so the build system isn't affected so much
if [[ "${binary}" == *"hyperkube" && "${platform}" == "linux/ppc64le" ]]; then
echo "hyperkube build for ppc64le is disabled. Creating dummy text file instead."
local outfile=$(kube::golang::output_filename_for_binary "${binary}" "${platform}")
mkdir -p $(dirname ${outfile})
echo "Not available at the moment. Please see: https://github.com/kubernetes/kubernetes/issues/25886 for more information." > ${outfile}
elif [[ "${binary}" =~ ".test"$ ]]; then
tests+=($binary) tests+=($binary)
elif kube::golang::is_statically_linked_library "${binary}"; then elif kube::golang::is_statically_linked_library "${binary}"; then
statics+=($binary) statics+=($binary)
@ -462,6 +471,7 @@ kube::golang::build_binaries_for_platform() {
nonstatics+=($binary) nonstatics+=($binary)
fi fi
done done
if [[ "${#statics[@]}" != 0 ]]; then if [[ "${#statics[@]}" != 0 ]]; then
kube::golang::fallback_if_stdlib_not_installable; kube::golang::fallback_if_stdlib_not_installable;
fi fi