|
35 | 35 | DEFAULT_KIND_IMAGE="gcr.io/istio-testing/kind-node:v1.32.0"
|
36 | 36 |
|
37 | 37 | # the default kind cluster should be ipv4 if not otherwise specified
|
38 |
| -IP_FAMILY="${IP_FAMILY:-ipv4}" |
| 38 | +KIND_IP_FAMILY="${KIND_IP_FAMILY:-ipv4}" |
39 | 39 |
|
40 | 40 | # COMMON_SCRIPTS contains the directory this file is in.
|
41 | 41 | COMMON_SCRIPTS=$(dirname "${BASH_SOURCE:-$0}")
|
@@ -147,7 +147,7 @@ function setup_kind_cluster_retry() {
|
147 | 147 | # 1. NAME: Name of the Kind cluster (optional)
|
148 | 148 | # 2. IMAGE: Node image used by KinD (optional)
|
149 | 149 | # 3. CONFIG: KinD cluster configuration YAML file. If not specified then DEFAULT_CLUSTER_YAML is used
|
150 |
| -# 4. NOMETALBINSTALL: Dont install matllb if set. |
| 150 | +# 4. NOMETALBINSTALL: Dont install metalb if set. |
151 | 151 | # This function returns 0 when everything goes well, or 1 otherwise
|
152 | 152 | # If Kind cluster was already created then it would be cleaned up in case of errors
|
153 | 153 | function setup_kind_cluster() {
|
@@ -186,7 +186,7 @@ function setup_kind_cluster() {
|
186 | 186 |
|
187 | 187 | # Create KinD cluster
|
188 | 188 | if ! (yq eval "${CONFIG}" --expression ".networking.disableDefaultCNI = ${KIND_DISABLE_CNI}" \
|
189 |
| - --expression ".networking.ipFamily = \"${IP_FAMILY}\"" | \ |
| 189 | + --expression ".networking.ipFamily = \"${KIND_IP_FAMILY}\"" | \ |
190 | 190 | kind create cluster --name="${NAME}" -v4 --retain --image "${IMAGE}" ${KIND_WAIT_FLAG:+"$KIND_WAIT_FLAG"} --config -); then
|
191 | 191 | echo "Could not setup KinD environment. Something wrong with KinD setup. Exporting logs."
|
192 | 192 | return 9
|
@@ -230,7 +230,7 @@ function setup_kind_cluster() {
|
230 | 230 | # https://github.com/coredns/coredns/issues/2494#issuecomment-457215452
|
231 | 231 | # CoreDNS should handle those domains and answer with NXDOMAIN instead of SERVFAIL
|
232 | 232 | # otherwise pods stops trying to resolve the domain.
|
233 |
| - if [ "${IP_FAMILY}" = "ipv6" ] || [ "${IP_FAMILY}" = "dual" ]; then |
| 233 | + if [ "${KIND_IP_FAMILY}" = "ipv6" ] || [ "${KIND_IP_FAMILY}" = "dual" ]; then |
234 | 234 | # Get the current config
|
235 | 235 | original_coredns=$(kubectl get -oyaml -n=kube-system configmap/coredns)
|
236 | 236 | echo "Original CoreDNS config:"
|
@@ -267,14 +267,14 @@ function cleanup_kind_clusters() {
|
267 | 267 | # setup_kind_clusters sets up a given number of kind clusters with given topology
|
268 | 268 | # as specified in cluster topology configuration file.
|
269 | 269 | # 1. IMAGE = docker image used as node by KinD
|
270 |
| -# 2. IP_FAMILY = either ipv4 or ipv6 |
| 270 | +# 2. KIND_IP_FAMILY = either ipv4 or ipv6 or dual |
271 | 271 | #
|
272 | 272 | # NOTE: Please call load_cluster_topology before calling this method as it expects
|
273 | 273 | # cluster topology information to be loaded in advance
|
274 | 274 | function setup_kind_clusters() {
|
275 | 275 | IMAGE="${1:-"${DEFAULT_KIND_IMAGE}"}"
|
276 | 276 | KUBECONFIG_DIR="${ARTIFACTS:-$(mktemp -d)}/kubeconfig"
|
277 |
| - IP_FAMILY="${2:-ipv4}" |
| 277 | + KIND_IP_FAMILY="${2:-ipv4}" |
278 | 278 |
|
279 | 279 | check_default_cluster_yaml
|
280 | 280 |
|
|
0 commit comments