Handle sudo cleanly with tmp dir in generation

Also ensure meta/v1 swagger docs are generated.
parent 3c72ee21
......@@ -49,6 +49,7 @@ trap cleanup EXIT SIGINT
kube::golang::setup_env
TMP_DIR=$(mktemp -d /tmp/update-federation-swagger-spec.XXXX)
ETCD_HOST=${ETCD_HOST:-127.0.0.1}
ETCD_PORT=${ETCD_PORT:-2379}
API_PORT=${API_PORT:-8050}
......@@ -58,12 +59,13 @@ kube::etcd::start
# Start federation-apiserver
kube::log::status "Starting federation-apiserver"
sudo -E "${KUBE_OUTPUT_HOSTBIN}/hyperkube" federation-apiserver \
"${KUBE_OUTPUT_HOSTBIN}/hyperkube" federation-apiserver \
--insecure-bind-address="${API_HOST}" \
--bind-address="${API_HOST}" \
--insecure-port="${API_PORT}" \
--etcd-servers="http://${ETCD_HOST}:${ETCD_PORT}" \
--advertise-address="10.10.10.10" \
--cert-dir="${TMP_DIR}/certs" \
--service-cluster-ip-range="10.0.0.0/24" >/tmp/swagger-federation-api-server.log 2>&1 &
APISERVER_PID=$!
......
......@@ -28,7 +28,7 @@ source "${KUBE_ROOT}/hack/lib/swagger.sh"
kube::golang::setup_env
GROUP_VERSIONS=(${KUBE_AVAILABLE_GROUP_VERSIONS})
GROUP_VERSIONS=(meta/v1 ${KUBE_AVAILABLE_GROUP_VERSIONS})
# To avoid compile errors, remove the currently existing files.
for group_version in "${GROUP_VERSIONS[@]}"; do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment