mirror of https://github.com/k3s-io/k3s
commit
c5553af281
|
@ -249,6 +249,21 @@ function detect-minion-names {
|
||||||
echo "MINION_NAMES=${MINION_NAMES[*]}"
|
echo "MINION_NAMES=${MINION_NAMES[*]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Detect instance group name generated by gke
|
||||||
|
#
|
||||||
|
# Assumed vars:
|
||||||
|
# GCLOUD
|
||||||
|
# PROJECT
|
||||||
|
# ZONE
|
||||||
|
# CLUSTER_NAME
|
||||||
|
# Vars set:
|
||||||
|
# NODE_INSTANCE_GROUP
|
||||||
|
function detect-node-instance-group {
|
||||||
|
NODE_INSTANCE_GROUP=$("${GCLOUD}" alpha container clusters describe \
|
||||||
|
--project="${PROJECT}" --zone="${ZONE}" "${CLUSTER_NAME}" \
|
||||||
|
| grep instanceGroupManagers | cut -d '/' -f 11)
|
||||||
|
}
|
||||||
|
|
||||||
# SSH to a node by name ($1) and run a command ($2).
|
# SSH to a node by name ($1) and run a command ($2).
|
||||||
#
|
#
|
||||||
# Assumed vars:
|
# Assumed vars:
|
||||||
|
|
|
@ -83,6 +83,10 @@ else
|
||||||
NODE_INSTANCE_GROUP=""
|
NODE_INSTANCE_GROUP=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${KUBERNETES_PROVIDER}" == "gke" ]]; then
|
||||||
|
detect-node-instance-group
|
||||||
|
fi
|
||||||
|
|
||||||
ginkgo_args=()
|
ginkgo_args=()
|
||||||
if [[ ${GINKGO_PARALLEL} =~ ^[yY]$ ]]; then
|
if [[ ${GINKGO_PARALLEL} =~ ^[yY]$ ]]; then
|
||||||
ginkgo_args+=("-p")
|
ginkgo_args+=("-p")
|
||||||
|
|
|
@ -77,7 +77,7 @@ func waitForNodeInstanceGroupSize(size int) error {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if currentSize != size {
|
if currentSize != size {
|
||||||
Logf("Waiting for node istance group size %d, current size %d", size, currentSize)
|
Logf("Waiting for node instance group size %d, current size %d", size, currentSize)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
Logf("Node instance group has reached the desired size %d", size)
|
Logf("Node instance group has reached the desired size %d", size)
|
||||||
|
@ -224,7 +224,7 @@ func waitForPodsCreatedRunningResponding(c *client.Client, ns, name string, repl
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ = Describe("Nodes", func() {
|
var _ = Describe("Nodes", func() {
|
||||||
supportedProviders := []string{"gce"}
|
supportedProviders := []string{"gce", "gke"}
|
||||||
var testName string
|
var testName string
|
||||||
var c *client.Client
|
var c *client.Client
|
||||||
var ns string
|
var ns string
|
||||||
|
|
Loading…
Reference in New Issue