config-default.sh 2.1 KB

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