...
1#!/usr/bin/env bash
2
3# Copyright 2018 The Kubernetes Authors.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# Cloud information
18RANDGEN=$(dd if=/dev/urandom bs=64 count=1 2>/dev/null | base64 | tr -d "=+/" | dd bs=16 count=1 2>/dev/null | sed 's/[A-Z]//g')
19# shellcheck disable=2034 # Variable sourced in other scripts.
20KUBE_NAMESPACE="kubemark_${RANDGEN}"
21KUBEMARK_IMAGE_TAG="${KUBEMARK_IMAGE_TAG:-2}"
22KUBEMARK_IMAGE_LOCATION="${KUBEMARK_IMAGE_LOCATION:-${KUBE_ROOT}/cluster/images/kubemark}"
23KUBEMARK_INIT_TAG="${KUBEMARK_INIT_TAG:-${PROJECT}:${KUBEMARK_IMAGE_TAG}}"
24CLUSTER_LOCATION="${CLUSTER_LOCATION:-wdc06}"
25REGISTRY_LOGIN_URL="${REGISTRY_LOGIN_URL:-https://api.ng.bluemix.net}"
26
27# User defined
28# number of real workers in spawnTester cluster
29NUM_NODES="${NUM_NODES:-2}"
30# spec of real workers in spawnTester cluster
31NODE_SIZE=${NODE_SIZE:-u2c.2x4}
32DESIRED_NODES="${DESIRED_NODES:-10}"
33# number of hollow nodes
34# TODO: once IKS supports `kubetest`, i.e. the base cluster provisioning implemented in `kubetest`
35# we can use NUM_NODES=${KUBEMARK_NUM_NODES:-10} to avoid usage of KUBEMARK_NUM_NODES
36# more context, see https://github.com/kubernetes/kubernetes/pull/76909#discussion_r277735942
37KUBEMARK_NUM_NODES="${KUBEMARK_NUM_NODES:-10}"
38ENABLE_KUBEMARK_CLUSTER_AUTOSCALER="${ENABLE_KUBEMARK_CLUSTER_AUTOSCALER:-true}"
39ENABLE_KUBEMARK_KUBE_DNS="${ENABLE_KUBEMARK_KUBE_DNS:-false}"
40KUBELET_TEST_LOG_LEVEL="${KUBELET_TEST_LOG_LEVEL:-"--v=2"}"
41KUBEPROXY_TEST_LOG_LEVEL="${KUBEPROXY_TEST_LOG_LEVEL:-"--v=4"}"
42USE_REAL_PROXIER=${USE_REAL_PROXIER:-false}
43NODE_INSTANCE_PREFIX=${NODE_INSTANCE_PREFIX:-node}
44USE_EXISTING=${USE_EXISTING:-}
View as plain text