Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build hyperkube in hack/local-up-cluster instead of separate binaries #25627

Merged
merged 1 commit into from
May 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion hack/lib/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ kube::util::host_platform() {
amd64*)
host_arch=amd64
;;
aarch64*)
host_arch=arm64
;;
arm64*)
host_arch=arm64
;;
arm*)
host_arch=arm
;;
Expand All @@ -151,7 +157,7 @@ kube::util::host_platform() {
host_arch=ppc64le
;;
*)
kube::log::error "Unsupported host arch. Must be x86_64, 386, arm, s390x or ppc64le."
kube::log::error "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le."
exit 1
;;
esac
Expand Down
24 changes: 13 additions & 11 deletions hack/local-up-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,8 @@ done

if [ "x$GO_OUT" == "x" ]; then
"${KUBE_ROOT}/hack/build-go.sh" \
cmd/kube-apiserver \
cmd/kube-controller-manager \
cmd/kube-proxy \
cmd/kubectl \
cmd/kubelet \
plugin/cmd/kube-scheduler
cmd/hyperkube
else
echo "skipped the build."
fi
Expand Down Expand Up @@ -150,6 +146,12 @@ function detect_binary {
amd64*)
host_arch=amd64
;;
aarch64*)
host_arch=arm64
;;
arm64*)
host_arch=arm64
;;
arm*)
host_arch=arm
;;
Expand All @@ -163,7 +165,7 @@ function detect_binary {
host_arch=ppc64le
;;
*)
echo "Unsupported host arch. Must be x86_64, 386, arm, s390x or ppc64le." >&2
echo "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le." >&2
exit 1
;;
esac
Expand Down Expand Up @@ -258,7 +260,7 @@ function start_apiserver {
fi

APISERVER_LOG=/tmp/kube-apiserver.log
sudo -E "${GO_OUT}/kube-apiserver" ${priv_arg} ${runtime_config}\
sudo -E "${GO_OUT}/hyperkube" apiserver ${priv_arg} ${runtime_config}\
--v=${LOG_LEVEL} \
--cert-dir="${CERT_DIR}" \
--service-account-key-file="${SERVICE_ACCOUNT_KEY}" \
Expand All @@ -285,7 +287,7 @@ function start_controller_manager {
fi

CTLRMGR_LOG=/tmp/kube-controller-manager.log
sudo -E "${GO_OUT}/kube-controller-manager" \
sudo -E "${GO_OUT}/hyperkube" controller-manager \
--v=${LOG_LEVEL} \
--service-account-private-key-file="${SERVICE_ACCOUNT_KEY}" \
--root-ca-file="${ROOT_CA_FILE}" \
Expand Down Expand Up @@ -334,7 +336,7 @@ function start_kubelet {
kubenet_plugin_args="--reconcile-cidr=true "
fi

sudo -E "${GO_OUT}/kubelet" ${priv_arg}\
sudo -E "${GO_OUT}/hyperkube" kubelet ${priv_arg}\
--v=${LOG_LEVEL} \
--chaos-chance="${CHAOS_CHANCE}" \
--container-runtime="${CONTAINER_RUNTIME}" \
Expand Down Expand Up @@ -373,14 +375,14 @@ function start_kubelet {

function start_kubeproxy {
PROXY_LOG=/tmp/kube-proxy.log
sudo -E "${GO_OUT}/kube-proxy" \
sudo -E "${GO_OUT}/hyperkube" proxy \
--v=${LOG_LEVEL} \
--hostname-override="${HOSTNAME_OVERRIDE}" \
--master="http://${API_HOST}:${API_PORT}" >"${PROXY_LOG}" 2>&1 &
PROXY_PID=$!

SCHEDULER_LOG=/tmp/kube-scheduler.log
sudo -E "${GO_OUT}/kube-scheduler" \
sudo -E "${GO_OUT}/hyperkube" scheduler \
--v=${LOG_LEVEL} \
--master="http://${API_HOST}:${API_PORT}" >"${SCHEDULER_LOG}" 2>&1 &
SCHEDULER_PID=$!
Expand Down