mirror of https://github.com/istio/istio.io.git
Automator: update common-files@master in istio/istio.io@master (#8451)
This commit is contained in:
parent
e4a1769569
commit
6d4c8b1e7d
|
@ -1 +1 @@
|
||||||
76afed1c62c367a3c5152c502da82d5057161d4b
|
6486a8d7f2ee1a548488da3e6a083039adf9d540
|
||||||
|
|
|
@ -111,12 +111,14 @@ function check_default_cluster_yaml() {
|
||||||
# 1. NAME: Name of the Kind cluster (optional)
|
# 1. NAME: Name of the Kind cluster (optional)
|
||||||
# 2. IMAGE: Node image used by KinD (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
|
# 3. CONFIG: KinD cluster configuration YAML file. If not specified then DEFAULT_CLUSTER_YAML is used
|
||||||
|
# 4. KUBECONFIG: Kubeconfig file for this cluster.
|
||||||
# This function returns 0 when everything goes well, or 1 otherwise
|
# 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
|
# If Kind cluster was already created then it would be cleaned up in case of errors
|
||||||
function setup_kind_cluster() {
|
function setup_kind_cluster() {
|
||||||
NAME="${1:-istio-testing}"
|
NAME="${1:-istio-testing}"
|
||||||
IMAGE="${2:-gcr.io/istio-testing/kindest/node:v1.19.1}"
|
IMAGE="${2:-gcr.io/istio-testing/kindest/node:v1.19.1}"
|
||||||
CONFIG="${3:-}"
|
CONFIG="${3:-}"
|
||||||
|
KUBECONFIG="${4:-}"
|
||||||
|
|
||||||
check_default_cluster_yaml
|
check_default_cluster_yaml
|
||||||
|
|
||||||
|
@ -157,7 +159,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install Metallb
|
# Install Metallb
|
||||||
install_metallb ""
|
install_metallb "${KUBECONFIG}"
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -208,7 +210,7 @@ EOF
|
||||||
CLUSTER_KUBECONFIG="${KUBECONFIG_DIR}/${CLUSTER_NAME}"
|
CLUSTER_KUBECONFIG="${KUBECONFIG_DIR}/${CLUSTER_NAME}"
|
||||||
|
|
||||||
# Create the clusters.
|
# Create the clusters.
|
||||||
KUBECONFIG="${CLUSTER_KUBECONFIG}" setup_kind_cluster "${CLUSTER_NAME}" "${IMAGE}" "${CLUSTER_YAML}"
|
KUBECONFIG="${CLUSTER_KUBECONFIG}" setup_kind_cluster "${CLUSTER_NAME}" "${IMAGE}" "${CLUSTER_YAML}" "${CLUSTER_KUBECONFIG}"
|
||||||
|
|
||||||
# Kind currently supports getting a kubeconfig for internal or external usage. To simplify our tests,
|
# 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.
|
# its much simpler if we have a single kubeconfig that can be used internally and externally.
|
||||||
|
@ -230,12 +232,10 @@ EOF
|
||||||
wait "${pid}" || exit 1
|
wait "${pid}" || exit 1
|
||||||
done
|
done
|
||||||
|
|
||||||
# Install MetalLB for LoadBalancer support. Must be done synchronously since METALLB_IPS is shared.
|
# keep track of the list of Kubeconfig files that will be exported later
|
||||||
# and keep track of the list of Kubeconfig files that will be exported later
|
|
||||||
export KUBECONFIGS
|
export KUBECONFIGS
|
||||||
for CLUSTER_NAME in "${CLUSTER_NAMES[@]}"; do
|
for CLUSTER_NAME in "${CLUSTER_NAMES[@]}"; do
|
||||||
KUBECONFIG_FILE="${KUBECONFIG_DIR}/${CLUSTER_NAME}"
|
KUBECONFIG_FILE="${KUBECONFIG_DIR}/${CLUSTER_NAME}"
|
||||||
install_metallb "${KUBECONFIG_FILE}"
|
|
||||||
KUBECONFIGS+=("${KUBECONFIG_FILE}")
|
KUBECONFIGS+=("${KUBECONFIG_FILE}")
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue