Automator: update common-files@master in istio/istio.io@master (#8454)

This commit is contained in:
Istio Automation 2020-11-06 08:59:40 -08:00 committed by GitHub
parent 32b75b14ca
commit 4eeaa8c900
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View File

@ -1 +1 @@
6486a8d7f2ee1a548488da3e6a083039adf9d540
19f8b28fea87a1e78a40088cc90f8d837121c0a5

View File

@ -111,14 +111,14 @@ function check_default_cluster_yaml() {
# 1. NAME: Name of the Kind cluster (optional)
# 2. IMAGE: Node image used by KinD (optional)
# 3. CONFIG: KinD cluster configuration YAML file. If not specified then DEFAULT_CLUSTER_YAML is used
# 4. KUBECONFIG: Kubeconfig file for this cluster.
# 4. NOMETALBINSTALL: Dont install matllb if set.
# This function returns 0 when everything goes well, or 1 otherwise
# If Kind cluster was already created then it would be cleaned up in case of errors
function setup_kind_cluster() {
NAME="${1:-istio-testing}"
IMAGE="${2:-gcr.io/istio-testing/kindest/node:v1.19.1}"
CONFIG="${3:-}"
KUBECONFIG="${4:-}"
NOMETALBINSTALL="${4:-}"
check_default_cluster_yaml
@ -158,8 +158,10 @@ EOF
kubectl apply -f "${METRICS_SERVER_CONFIG_DIR}"
fi
# Install Metallb
install_metallb "${KUBECONFIG}"
# Install Metallb if not set to install explicitly
if [[ -z "${NOMETALBINSTALL}" ]]; then
install_metallb ""
fi
}
###############################################################################
@ -210,7 +212,7 @@ EOF
CLUSTER_KUBECONFIG="${KUBECONFIG_DIR}/${CLUSTER_NAME}"
# Create the clusters.
KUBECONFIG="${CLUSTER_KUBECONFIG}" setup_kind_cluster "${CLUSTER_NAME}" "${IMAGE}" "${CLUSTER_YAML}" "${CLUSTER_KUBECONFIG}"
KUBECONFIG="${CLUSTER_KUBECONFIG}" setup_kind_cluster "${CLUSTER_NAME}" "${IMAGE}" "${CLUSTER_YAML}" "true"
# Kind currently supports getting a kubeconfig for internal or external usage. To simplify our tests,
# its much simpler if we have a single kubeconfig that can be used internally and externally.
@ -232,10 +234,14 @@ EOF
wait "${pid}" || exit 1
done
# keep track of the list of Kubeconfig files that will be exported later
# Install MetalLB for LoadBalancer support. Must be done synchronously since METALLB_IPS is shared.
# and keep track of the list of Kubeconfig files that will be exported later
export KUBECONFIGS
for CLUSTER_NAME in "${CLUSTER_NAMES[@]}"; do
KUBECONFIG_FILE="${KUBECONFIG_DIR}/${CLUSTER_NAME}"
if [[ ${NUM_CLUSTERS} -gt 1 ]]; then
install_metallb "${KUBECONFIG_FILE}"
fi
KUBECONFIGS+=("${KUBECONFIG_FILE}")
done