k8s.io/kubernetes@v1.31.0-alpha.0.0.20240520171757-56147500dadc/cluster/kubemark/iks/config-default.sh (about)

     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
    18  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')
    19  # shellcheck disable=2034 # Variable sourced in other scripts.
    20  KUBE_NAMESPACE="kubemark_${RANDGEN}"
    21  KUBEMARK_IMAGE_TAG="${KUBEMARK_IMAGE_TAG:-2}"
    22  KUBEMARK_IMAGE_LOCATION="${KUBEMARK_IMAGE_LOCATION:-${KUBE_ROOT}/cluster/images/kubemark}"
    23  KUBEMARK_INIT_TAG="${KUBEMARK_INIT_TAG:-${PROJECT}:${KUBEMARK_IMAGE_TAG}}"
    24  CLUSTER_LOCATION="${CLUSTER_LOCATION:-wdc06}"
    25  REGISTRY_LOGIN_URL="${REGISTRY_LOGIN_URL:-https://api.ng.bluemix.net}"
    26  
    27  # User defined
    28  # number of real workers in spawnTester cluster
    29  NUM_NODES="${NUM_NODES:-2}"
    30  # spec of real workers in spawnTester cluster
    31  NODE_SIZE=${NODE_SIZE:-u2c.2x4}
    32  DESIRED_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
    37  KUBEMARK_NUM_NODES="${KUBEMARK_NUM_NODES:-10}"
    38  ENABLE_KUBEMARK_CLUSTER_AUTOSCALER="${ENABLE_KUBEMARK_CLUSTER_AUTOSCALER:-true}"
    39  ENABLE_KUBEMARK_KUBE_DNS="${ENABLE_KUBEMARK_KUBE_DNS:-false}"
    40  KUBELET_TEST_LOG_LEVEL="${KUBELET_TEST_LOG_LEVEL:-"--v=2"}"
    41  KUBEPROXY_TEST_LOG_LEVEL="${KUBEPROXY_TEST_LOG_LEVEL:-"--v=4"}"
    42  USE_REAL_PROXIER=${USE_REAL_PROXIER:-false}
    43  NODE_INSTANCE_PREFIX=${NODE_INSTANCE_PREFIX:-node}
    44  USE_EXISTING=${USE_EXISTING:-}