Skip to content

Commit

Permalink
Merge pull request kubernetes#41526 from xilabao/add-swagger-ui-option
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 41756, 36344, 34259, 40843, 41526)

add swagger ui in local cluster

use `ENABLE_SWAGGER_UI=true hack/local-up-cluster.sh`
  • Loading branch information
Kubernetes Submit Queue authored Feb 20, 2017
2 parents 9c0e46b + 363bfaa commit caa9bd1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion hack/local-up-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ CLOUD_PROVIDER=${CLOUD_PROVIDER:-""}
CLOUD_CONFIG=${CLOUD_CONFIG:-""}
FEATURE_GATES=${FEATURE_GATES:-"AllAlpha=true"}

# enable swagger ui
ENABLE_SWAGGER_UI=${ENABLE_SWAGGER_UI:-false}

# RBAC Mode options
ALLOW_ANY_TOKEN=${ALLOW_ANY_TOKEN:-false}
ENABLE_RBAC=${ENABLE_RBAC:-false}
Expand Down Expand Up @@ -376,6 +379,11 @@ function start_apiserver {
# This is the default dir and filename where the apiserver will generate a self-signed cert
# which should be able to be used as the CA to verify itself

swagger_arg=""
if [[ "${ENABLE_SWAGGER_UI}" = true ]]; then
swagger_arg="--enable-swagger-ui=true "
fi

anytoken_arg=""
if [[ "${ALLOW_ANY_TOKEN}" = true ]]; then
anytoken_arg="--insecure-allow-any-token "
Expand Down Expand Up @@ -426,7 +434,7 @@ function start_apiserver {


APISERVER_LOG=/tmp/kube-apiserver.log
${CONTROLPLANE_SUDO} "${GO_OUT}/hyperkube" apiserver ${anytoken_arg} ${authorizer_arg} ${priv_arg} ${runtime_config}\
${CONTROLPLANE_SUDO} "${GO_OUT}/hyperkube" apiserver ${swagger_arg} ${anytoken_arg} ${authorizer_arg} ${priv_arg} ${runtime_config}\
${advertise_address} \
--v=${LOG_LEVEL} \
--cert-dir="${CERT_DIR}" \
Expand Down

0 comments on commit caa9bd1

Please sign in to comment.