File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -147,11 +147,11 @@ create_cluster() {
147147# and any statement must be idempotent so that subsequent retry attempts can make forward progress.
148148get_cidrs () {
149149 # Get cluster CIDRs from Cluster object
150- CIDR0=$( ${KUBECTL} get cluster " ${CLUSTER_NAME} " -o=jsonpath=' {.spec.clusterNetwork.pods.cidrBlocks[0]}' )
150+ CIDR0=$( ${KUBECTL} --kubeconfig " ${REPO_ROOT} / ${KIND_CLUSTER_NAME} .kubeconfig " get cluster " ${CLUSTER_NAME} " -o=jsonpath=' {.spec.clusterNetwork.pods.cidrBlocks[0]}' )
151151 export CIDR0
152- CIDR_LENGTH=$( ${KUBECTL} get cluster " ${CLUSTER_NAME} " -o=jsonpath=' {.spec.clusterNetwork.pods.cidrBlocks}' | jq ' . | length' )
152+ CIDR_LENGTH=$( ${KUBECTL} --kubeconfig " ${REPO_ROOT} / ${KIND_CLUSTER_NAME} .kubeconfig " get cluster " ${CLUSTER_NAME} " -o=jsonpath=' {.spec.clusterNetwork.pods.cidrBlocks}' | jq ' . | length' )
153153 if [[ " ${CIDR_LENGTH} " == " 2" ]]; then
154- CIDR1=$( ${KUBECTL} get cluster " ${CLUSTER_NAME} " -o=jsonpath=' {.spec.clusterNetwork.pods.cidrBlocks[1]}' )
154+ CIDR1=$( ${KUBECTL} get cluster --kubeconfig " ${REPO_ROOT} / ${KIND_CLUSTER_NAME} .kubeconfig " " ${CLUSTER_NAME} " -o=jsonpath=' {.spec.clusterNetwork.pods.cidrBlocks[1]}' )
155155 export CIDR1
156156 fi
157157}
@@ -161,7 +161,7 @@ get_cidrs() {
161161# retry it using a `until get_cloud_provider; do sleep 5; done` pattern;
162162# and any statement must be idempotent so that subsequent retry attempts can make forward progress.
163163get_cloud_provider () {
164- CLOUD_PROVIDER=$( " ${KUBECTL} " get kubeadmcontrolplane -l cluster.x-k8s.io/cluster-name=" ${CLUSTER_NAME} " -o=jsonpath=' {.items[0].spec.kubeadmConfigSpec.clusterConfiguration.controllerManager.extraArgs.cloud-provider}' )
164+ CLOUD_PROVIDER=$( " ${KUBECTL} " --kubeconfig " ${REPO_ROOT} / ${KIND_CLUSTER_NAME} .kubeconfig " get kubeadmcontrolplane -l cluster.x-k8s.io/cluster-name=" ${CLUSTER_NAME} " -o=jsonpath=' {.items[0].spec.kubeadmConfigSpec.clusterConfiguration.controllerManager.extraArgs.cloud-provider}' )
165165 if [[ " ${CLOUD_PROVIDER:- } " = " azure" ]]; then
166166 IN_TREE=" true"
167167 export IN_TREE
You can’t perform that action at this time.
0 commit comments