Revert "Updated deprecated flags (address and port). Added an option to pass runtime-config."

This commit is contained in:
Yu-Ju Hong 2015-08-25 14:45:06 -07:00
parent 3c0a05de4a
commit ac97aed837

View File

@ -45,17 +45,17 @@ GO_OUT=""
while getopts "o:" OPTION
do
case $OPTION in
o)
o)
echo "skipping build"
echo "using source $OPTARG"
GO_OUT="$OPTARG"
if [ $GO_OUT == "" ]; then
echo "You provided an invalid value for the build output directory."
exit
exit
fi
;;
?)
usage
usage
exit
;;
esac
@ -141,7 +141,7 @@ function detect_binary {
cleanup_dockerized_kubelet()
{
if [[ -e $KUBELET_CIDFILE ]]; then
if [[ -e $KUBELET_CIDFILE ]]; then
docker kill $(<$KUBELET_CIDFILE) > /dev/null
rm -f $KUBELET_CIDFILE
fi
@ -209,20 +209,16 @@ function start_apiserver {
if [[ -n "${ALLOW_PRIVILEGED}" ]]; then
priv_arg="--allow-privileged "
fi
runtime_config=""
if [[ -n "${RUNTIME_CONFIG}" ]]; then
runtime_config="--runtime-config=\"${RUNTIME_CONFIG}\""
fi
APISERVER_LOG=/tmp/kube-apiserver.log
sudo -E "${GO_OUT}/kube-apiserver" ${priv_arg} ${runtime_config} \
sudo -E "${GO_OUT}/kube-apiserver" ${priv_arg}\
--v=${LOG_LEVEL} \
--cert-dir="${CERT_DIR}" \
--service-account-key-file="${SERVICE_ACCOUNT_KEY}" \
--service-account-lookup="${SERVICE_ACCOUNT_LOOKUP}" \
--admission-control="${ADMISSION_CONTROL}" \
--insecure-bind-address="${API_HOST}" \
--insecure-port="${API_PORT}" \
--address="${API_HOST}" \
--port="${API_PORT}" \
--etcd-servers="http://127.0.0.1:4001" \
--service-cluster-ip-range="10.0.0.0/24" \
--cors-allowed-origins="${API_CORS_ALLOWED_ORIGINS}" >"${APISERVER_LOG}" 2>&1 &
@ -314,7 +310,7 @@ test_docker
test_apiserver_off
### IF the user didn't supply an output/ for the build... Then we detect.
if [ "$GO_OUT" == "" ]; then
if [ "$GO_OUT" == "" ]; then
detect_binary
fi
echo "Detected host and ready to start services. Doing some housekeeping first..."