mirror of https://github.com/k3s-io/k3s
Merge pull request #14740 from piosz/autoscaling-e2e
Fixed flakiness in autoscaling e2e with no scheduling podspull/6/head
commit
718c6f11e3
|
@ -53,10 +53,10 @@ var _ = Describe("Autoscaling", func() {
|
||||||
})
|
})
|
||||||
|
|
||||||
It("[Skipped][Autoscaling Suite] should scale cluster size based on cpu utilization", func() {
|
It("[Skipped][Autoscaling Suite] should scale cluster size based on cpu utilization", func() {
|
||||||
setUpAutoscaler("cpu/node_utilization", 0.5, nodeCount, nodeCount+1)
|
setUpAutoscaler("cpu/node_utilization", 0.4, nodeCount, nodeCount+1)
|
||||||
|
|
||||||
// Consume 60% CPU
|
// Consume 50% CPU
|
||||||
millicoresPerReplica := 600
|
millicoresPerReplica := 500
|
||||||
rc := NewStaticResourceConsumer("cpu-utilization", nodeCount*coresPerNode, millicoresPerReplica*nodeCount*coresPerNode, 0, int64(millicoresPerReplica), 100, f)
|
rc := NewStaticResourceConsumer("cpu-utilization", nodeCount*coresPerNode, millicoresPerReplica*nodeCount*coresPerNode, 0, int64(millicoresPerReplica), 100, f)
|
||||||
expectNoError(waitForClusterSize(f.Client, nodeCount+1, 20*time.Minute))
|
expectNoError(waitForClusterSize(f.Client, nodeCount+1, 20*time.Minute))
|
||||||
|
|
||||||
|
|
|
@ -260,14 +260,16 @@ func runServiceAndRCForResourceConsumer(c *client.Client, ns, name string, repli
|
||||||
})
|
})
|
||||||
expectNoError(err)
|
expectNoError(err)
|
||||||
config := RCConfig{
|
config := RCConfig{
|
||||||
Client: c,
|
Client: c,
|
||||||
Image: image,
|
Image: image,
|
||||||
Name: name,
|
Name: name,
|
||||||
Namespace: ns,
|
Namespace: ns,
|
||||||
Timeout: timeoutRC,
|
Timeout: timeoutRC,
|
||||||
Replicas: replicas,
|
Replicas: replicas,
|
||||||
CpuLimit: cpuLimitMillis,
|
CpuRequest: cpuLimitMillis,
|
||||||
MemLimit: memLimitMb * 1024 * 1024, // MemLimit is in bytes
|
CpuLimit: cpuLimitMillis,
|
||||||
|
MemRequest: memLimitMb * 1024 * 1024, // MemLimit is in bytes
|
||||||
|
MemLimit: memLimitMb * 1024 * 1024,
|
||||||
}
|
}
|
||||||
expectNoError(RunRC(config))
|
expectNoError(RunRC(config))
|
||||||
// Make sure endpoints are propagated.
|
// Make sure endpoints are propagated.
|
||||||
|
|
Loading…
Reference in New Issue