Skip to content

Commit

Permalink
Automator: update common-files@master in istio/client-go@master (#2212)
Browse files Browse the repository at this point in the history
  • Loading branch information
istio-testing committed Aug 21, 2024
1 parent 9e6e289 commit 722b64b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion common/.commonfiles.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
98eb07882dd76d4a572404095b6658bf13799dd6
82facb861038e3d797d9dc306ebcebbbb89fd14e
11 changes: 5 additions & 6 deletions common/scripts/kind_provisioner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ set -x
# DEFAULT_KIND_IMAGE is used to set the Kubernetes version for KinD unless overridden in params to setup_kind_cluster(s)
DEFAULT_KIND_IMAGE="gcr.io/istio-testing/kind-node:v1.28.4"

# the default kind cluster should be ipv4 if not otherwise specified
IP_FAMILY="${IP_FAMILY:-ipv4}"

# COMMON_SCRIPTS contains the directory this file is in.
COMMON_SCRIPTS=$(dirname "${BASH_SOURCE:-$0}")

Expand Down Expand Up @@ -174,11 +177,6 @@ function setup_kind_cluster() {
CONFIG=${DEFAULT_CLUSTER_YAML}
fi

# Configure the ipFamily of the cluster
if [ -n "${IP_FAMILY}" ]; then
yq eval ".networking.ipFamily = \"${IP_FAMILY}\"" -i "${CONFIG}"
fi

KIND_WAIT_FLAG="--wait=180s"
KIND_DISABLE_CNI="false"
if [[ -n "${KUBERNETES_CNI:-}" ]]; then
Expand All @@ -187,7 +185,8 @@ function setup_kind_cluster() {
fi

# Create KinD cluster
if ! (yq eval "${CONFIG}" --expression ".networking.disableDefaultCNI = ${KIND_DISABLE_CNI}" | \
if ! (yq eval "${CONFIG}" --expression ".networking.disableDefaultCNI = ${KIND_DISABLE_CNI}" \
--expression ".networking.ipFamily = \"${IP_FAMILY}\"" | \
kind create cluster --name="${NAME}" -v4 --retain --image "${IMAGE}" ${KIND_WAIT_FLAG:+"$KIND_WAIT_FLAG"} --config -); then
echo "Could not setup KinD environment. Something wrong with KinD setup. Exporting logs."
return 9
Expand Down

0 comments on commit 722b64b

Please sign in to comment.