Skip to content

Commit

Permalink
Automator: update common-files@master in istio/istio@master (istio#28632
Browse files Browse the repository at this point in the history
)
  • Loading branch information
istio-testing authored Nov 6, 2020
1 parent f3033c2 commit cf0c572
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/.commonfiles.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
02d938cc4e1121567f67a39399386d4f58a83186
19f8b28fea87a1e78a40088cc90f8d837121c0a5
9 changes: 8 additions & 1 deletion common/scripts/kind_provisioner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +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. 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:-}"
NOMETALBINSTALL="${4:-}"

check_default_cluster_yaml

Expand Down Expand Up @@ -155,6 +157,11 @@ EOF
if [[ -n ${METRICS_SERVER_CONFIG_DIR} ]]; then
kubectl apply -f "${METRICS_SERVER_CONFIG_DIR}"
fi

# Install Metallb if not set to install explicitly
if [[ -z "${NOMETALBINSTALL}" ]]; then
install_metallb ""
fi
}

###############################################################################
Expand Down Expand Up @@ -205,7 +212,7 @@ EOF
CLUSTER_KUBECONFIG="${KUBECONFIG_DIR}/${CLUSTER_NAME}"

# 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}" "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.
Expand Down

0 comments on commit cf0c572

Please sign in to comment.