mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
enable scale to 0 test for gke
This commit is contained in:
parent
ac33bfd53b
commit
0e430b0863
@ -619,8 +619,20 @@ var _ = SIGDescribe("Cluster size autoscaling [Slow]", func() {
|
|||||||
framework.ExpectNoError(waitForAllCaPodsReadyInNamespace(f, c))
|
framework.ExpectNoError(waitForAllCaPodsReadyInNamespace(f, c))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("Should be able to scale a node group down to 0[Feature:ClusterSizeAutoscalingScaleDown]", func() {
|
It("Should be able to scale a node group down to 0[Feature:ClusterSizeAutoscalingXScaleDown]", func() {
|
||||||
framework.SkipUnlessAtLeast(len(originalSizes), 2, "At least 2 node groups are needed for scale-to-0 tests")
|
// Determine whether we want to run & adjust the setup if necessary
|
||||||
|
if len(originalSizes) < 2 {
|
||||||
|
if framework.ProviderIs("gke") {
|
||||||
|
const extraPoolName = "extra-pool"
|
||||||
|
addNodePool(extraPoolName, "n1-standard-4", 1)
|
||||||
|
defer deleteNodePool(extraPoolName)
|
||||||
|
err := enableAutoscaler(extraPoolName, 0, 1)
|
||||||
|
framework.ExpectNoError(err)
|
||||||
|
} else {
|
||||||
|
framework.Skipf("At least 2 node groups are needed for scale-to-0 tests")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
By("Find smallest node group and manually scale it to a single node")
|
By("Find smallest node group and manually scale it to a single node")
|
||||||
minMig := ""
|
minMig := ""
|
||||||
minSize := nodeCount
|
minSize := nodeCount
|
||||||
|
Loading…
Reference in New Issue
Block a user