k3s/cluster/kubemark/gce/config-default.sh

95 lines
4.8 KiB
Bash
Raw Normal View History

2015-09-01 13:35:38 +00:00
#!/bin/bash
# Copyright 2017 The Kubernetes Authors.
2015-09-01 13:35:38 +00:00
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# A configuration for Kubemark cluster. It doesn't need to be kept in
2015-09-01 13:35:38 +00:00
# sync with gce/config-default.sh (except the filename, because I'm reusing
2015-09-01 13:35:38 +00:00
# gce/util.sh script which assumes config filename), but if some things that
# are enabled by default should not run in hollow clusters, they should be disabled here.
source "${KUBE_ROOT}/cluster/gce/config-common.sh"
2015-09-01 13:35:38 +00:00
GCLOUD=gcloud
ZONE=${KUBE_GCE_ZONE:-us-central1-b}
REGION=${ZONE%-*}
# KUBEMARK_NUM_NODES overrides NUM_NODES if set
NUM_NODES=${KUBEMARK_NUM_NODES:-${NUM_NODES:-10}}
# KUBEMARK_MASTER_SIZE overrides MASTER_SIZE if set
MASTER_SIZE=${KUBEMARK_MASTER_SIZE:-${MASTER_SIZE:-n1-standard-$(get-master-size)}}
2015-09-01 13:35:38 +00:00
MASTER_DISK_TYPE=pd-ssd
MASTER_DISK_SIZE=${MASTER_DISK_SIZE:-20GB}
MASTER_ROOT_DISK_SIZE=${KUBEMARK_MASTER_ROOT_DISK_SIZE:-10GB}
2015-09-01 13:35:38 +00:00
REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-false}
2015-11-24 03:06:47 +00:00
PREEMPTIBLE_NODE=${PREEMPTIBLE_NODE:-false}
2015-09-01 13:35:38 +00:00
MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-gci}
NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-gci}
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-cos-stable-59-9460-64-0}
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-cos-cloud}
2015-09-01 13:35:38 +00:00
NETWORK=${KUBE_GCE_NETWORK:-e2e}
INSTANCE_PREFIX="${INSTANCE_PREFIX:-"default"}"
MASTER_NAME="${INSTANCE_PREFIX}-kubemark-master"
AGGREGATOR_MASTER_NAME="${INSTANCE_PREFIX}-kubemark-aggregator"
MASTER_TAG="kubemark-master"
EVENT_STORE_NAME="${INSTANCE_PREFIX}-event-store"
2015-09-01 13:35:38 +00:00
MASTER_IP_RANGE="${MASTER_IP_RANGE:-10.246.0.0/24}"
2017-02-28 18:26:32 +00:00
CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.224.0.0/11}"
2015-09-01 13:35:38 +00:00
RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}"
2015-11-17 12:50:49 +00:00
TERMINATED_POD_GC_THRESHOLD=${TERMINATED_POD_GC_THRESHOLD:-100}
2017-02-17 13:24:08 +00:00
# Set etcd image (e.g. 3.0.17-alpha.1) and version (e.g. 3.0.17) if you need
2016-10-31 09:40:41 +00:00
# non-default version.
ETCD_IMAGE="${TEST_ETCD_IMAGE:-}"
ETCD_VERSION="${TEST_ETCD_VERSION:-}"
# Storage backend. 'etcd2' supported, 'etcd3' experimental.
STORAGE_BACKEND=${STORAGE_BACKEND:-}
# Default Log level for all components in test clusters and variables to override it in specific components.
2015-11-17 12:50:49 +00:00
TEST_CLUSTER_LOG_LEVEL="${TEST_CLUSTER_LOG_LEVEL:---v=2}"
KUBELET_TEST_LOG_LEVEL="${KUBELET_TEST_LOG_LEVEL:-$TEST_CLUSTER_LOG_LEVEL}"
API_SERVER_TEST_LOG_LEVEL="${API_SERVER_TEST_LOG_LEVEL:-$TEST_CLUSTER_LOG_LEVEL}"
CONTROLLER_MANAGER_TEST_LOG_LEVEL="${CONTROLLER_MANAGER_TEST_LOG_LEVEL:-$TEST_CLUSTER_LOG_LEVEL}"
SCHEDULER_TEST_LOG_LEVEL="${SCHEDULER_TEST_LOG_LEVEL:-$TEST_CLUSTER_LOG_LEVEL}"
KUBEPROXY_TEST_LOG_LEVEL="${KUBEPROXY_TEST_LOG_LEVEL:-$TEST_CLUSTER_LOG_LEVEL}"
2016-05-11 11:10:12 +00:00
TEST_CLUSTER_DELETE_COLLECTION_WORKERS="${TEST_CLUSTER_DELETE_COLLECTION_WORKERS:---delete-collection-workers=16}"
TEST_CLUSTER_MAX_REQUESTS_INFLIGHT="${TEST_CLUSTER_MAX_REQUESTS_INFLIGHT:-}"
2016-05-11 11:10:12 +00:00
TEST_CLUSTER_RESYNC_PERIOD="${TEST_CLUSTER_RESYNC_PERIOD:-}"
2015-11-17 12:50:49 +00:00
KUBEMARK_MASTER_COMPONENTS_QPS_LIMITS="${KUBEMARK_MASTER_COMPONENTS_QPS_LIMITS:-}"
# ContentType used by all components to communicate with apiserver.
2016-05-06 08:25:20 +00:00
TEST_CLUSTER_API_CONTENT_TYPE="${TEST_CLUSTER_API_CONTENT_TYPE:-}"
# ContentType used to store objects in underlying database.
TEST_CLUSTER_STORAGE_MEDIA_TYPE=""
if [ -n "${STORAGE_MEDIA_TYPE:-}" ]; then
TEST_CLUSTER_STORAGE_MEDIA_TYPE="--storage-media-type=${STORAGE_MEDIA_TYPE}"
fi
2016-08-24 14:38:37 +00:00
ENABLE_GARBAGE_COLLECTOR=${ENABLE_GARBAGE_COLLECTOR:-true}
USE_REAL_PROXIER=${USE_REAL_PROXIER:-true} # for hollow-proxy
CUSTOM_ADMISSION_PLUGINS="${CUSTOM_ADMISSION_PLUGINS:-Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,PodPreset,DefaultTolerationSeconds,NodeRestriction,ResourceQuota}"
KUBELET_TEST_ARGS="--max-pods=100 $TEST_CLUSTER_LOG_LEVEL ${TEST_CLUSTER_API_CONTENT_TYPE}"
APISERVER_TEST_ARGS="--runtime-config=extensions/v1beta1 ${API_SERVER_TEST_LOG_LEVEL} ${TEST_CLUSTER_STORAGE_MEDIA_TYPE} ${TEST_CLUSTER_MAX_REQUESTS_INFLIGHT} ${TEST_CLUSTER_DELETE_COLLECTION_WORKERS} --enable-garbage-collector=${ENABLE_GARBAGE_COLLECTOR}"
CONTROLLER_MANAGER_TEST_ARGS="${CONTROLLER_MANAGER_TEST_LOG_LEVEL} ${TEST_CLUSTER_RESYNC_PERIOD} ${TEST_CLUSTER_API_CONTENT_TYPE} ${KUBEMARK_MASTER_COMPONENTS_QPS_LIMITS} --enable-garbage-collector=${ENABLE_GARBAGE_COLLECTOR}"
SCHEDULER_TEST_ARGS="${SCHEDULER_TEST_LOG_LEVEL} ${TEST_CLUSTER_API_CONTENT_TYPE} ${KUBEMARK_MASTER_COMPONENTS_QPS_LIMITS}"
KUBEPROXY_TEST_ARGS="${KUBEPROXY_TEST_LOG_LEVEL} ${TEST_CLUSTER_API_CONTENT_TYPE}"
2016-02-29 10:32:23 +00:00
2015-09-01 13:35:38 +00:00
SERVICE_CLUSTER_IP_RANGE="10.0.0.0/16" # formerly PORTAL_NET
ALLOCATE_NODE_CIDRS=true