Merge pull request #94552 from justaugustus/fix-go-runner-arch

build: Fix go-runner arch in server images
This commit is contained in:
Kubernetes Prow Robot 2020-09-08 04:54:21 -07:00 committed by GitHub
commit 73375fbdac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 7 deletions

View File

@ -93,8 +93,6 @@ readonly KUBE_CONTAINER_RSYNC_PORT=8730
#
# $1 - server architecture
kube::build::get_docker_wrapped_binaries() {
local arch=$1
local debian_base_version=v2.1.3
local debian_iptables_version=v12.1.2
local go_runner_version=buster-v2.0.0
### If you change any of these lists, please also update DOCKERIZED_BINARIES
@ -103,7 +101,7 @@ kube::build::get_docker_wrapped_binaries() {
"kube-apiserver,${KUBE_BASE_IMAGE_REGISTRY}/go-runner:${go_runner_version}"
"kube-controller-manager,${KUBE_BASE_IMAGE_REGISTRY}/go-runner:${go_runner_version}"
"kube-scheduler,${KUBE_BASE_IMAGE_REGISTRY}/go-runner:${go_runner_version}"
"kube-proxy,${KUBE_BASE_IMAGE_REGISTRY}/debian-iptables-${arch}:${debian_iptables_version}"
"kube-proxy,${KUBE_BASE_IMAGE_REGISTRY}/debian-iptables:${debian_iptables_version}"
)
echo "${targets[@]}"

View File

@ -118,8 +118,6 @@ dependencies:
- name: "k8s.gcr.io/debian-base: dependents"
version: 2.1.3
refPaths:
- path: build/common.sh
match: debian_base_version=
- path: build/workspace.bzl
match: tag =
- path: cluster/images/etcd/Makefile

View File

@ -334,7 +334,7 @@ function kube::release::create_docker_images_for_server() {
local images_dir
binary_dir="$1"
arch="$2"
binaries=$(kube::build::get_docker_wrapped_binaries "${arch}")
binaries=$(kube::build::get_docker_wrapped_binaries)
images_dir="${RELEASE_IMAGES}/${arch}"
mkdir -p "${images_dir}"
@ -375,7 +375,7 @@ function kube::release::create_docker_images_for_server() {
ln "${KUBE_ROOT}/build/nsswitch.conf" "${docker_build_path}/nsswitch.conf"
chmod 0644 "${docker_build_path}/nsswitch.conf"
cat <<EOF > "${docker_file_path}"
FROM ${base_image}
FROM --platform=linux/${arch} ${base_image}
COPY ${binary_name} /usr/local/bin/${binary_name}
EOF
# ensure /etc/nsswitch.conf exists so go's resolver respects /etc/hosts