Merge pull request #14507 from derekwaynecarr/enable_experiemental_apis

Enable experimental API in vagrant setups
pull/6/head
Brendan Burns 2015-09-30 17:12:57 -07:00
commit 1b7e52edb4
2 changed files with 23 additions and 2 deletions

View File

@ -55,6 +55,16 @@ MASTER_PASSWD=vagrant
# Admission Controllers to invoke prior to persisting objects in cluster # Admission Controllers to invoke prior to persisting objects in cluster
ADMISSION_CONTROL=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,DenyEscalatingExec,ResourceQuota ADMISSION_CONTROL=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,DenyEscalatingExec,ResourceQuota
# Optional: Enable experimental API features
ENABLE_EXPERIMENTAL_API="${KUBE_ENABLE_EXPERIMENTAL_API:-true}"
# Optional: Enable feature for autoscaling number of pods
# Experimental feature, not ready for production use.
ENABLE_HORIZONTAL_POD_AUTOSCALER="${KUBE_ENABLE_HORIZONTAL_POD_AUTOSCALER:-true}"
if [[ "${ENABLE_HORIZONTAL_POD_AUTOSCALER}" == "true" ]]; then
ENABLE_EXPERIMENTAL_API=true
fi
# Optional: Enable node logging. # Optional: Enable node logging.
ENABLE_NODE_LOGGING=false ENABLE_NODE_LOGGING=false
LOGGING_DESTINATION=elasticsearch LOGGING_DESTINATION=elasticsearch
@ -89,8 +99,7 @@ DNS_REPLICAS=1
ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}" ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}"
# Optional: Enable setting flags for kube-apiserver to turn on behavior in active-dev # Optional: Enable setting flags for kube-apiserver to turn on behavior in active-dev
#RUNTIME_CONFIG="" RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}"
RUNTIME_CONFIG="api/v1"
# Determine extra certificate names for master # Determine extra certificate names for master
octets=($(echo "$SERVICE_CLUSTER_IP_RANGE" | sed -e 's|/.*||' -e 's/\./ /g')) octets=($(echo "$SERVICE_CLUSTER_IP_RANGE" | sed -e 's|/.*||' -e 's/\./ /g'))

View File

@ -34,6 +34,18 @@ function detect-minions {
# Verify prereqs on host machine Also sets exports USING_KUBE_SCRIPTS=true so # Verify prereqs on host machine Also sets exports USING_KUBE_SCRIPTS=true so
# that our Vagrantfile doesn't error out. # that our Vagrantfile doesn't error out.
function verify-prereqs { function verify-prereqs {
if [[ "${ENABLE_EXPERIMENTAL_API}" == "true" ]]; then
if [[ -z "${RUNTIME_CONFIG}" ]]; then
RUNTIME_CONFIG="experimental/v1alpha1"
else
# TODO: add checking if RUNTIME_CONFIG contains "experimental/v1=false" and appending "experimental/v1=true" if not.
if echo "${RUNTIME_CONFIG}" | grep -q -v "experimental/v1alpha1=true"; then
echo "Experimental API should be turned on, but is not turned on in RUNTIME_CONFIG!"
exit 1
fi
fi
fi
for x in vagrant; do for x in vagrant; do
if ! which "$x" >/dev/null; then if ! which "$x" >/dev/null; then
echo "Can't find $x in PATH, please fix and retry." echo "Can't find $x in PATH, please fix and retry."