gardener / autoscaler

Customised fork of cluster-autoscaler to support machine-controller-manager
Apache License 2.0
16 stars 25 forks source link

Sync with `upstream-release-v1.27.1` #225

Closed ashwani2k closed 1 year ago

ashwani2k commented 1 year ago

What this PR does / why we need it: Sync autoscaler with upstream v1.27.0/1

Which issue(s) this PR fixes: Fixes #191

Special notes for your reviewer: With release of v1.27 they have released v1.27.1 and v1.27.0 as mirror releases. So for future ease I have synced with v1.27.1 Please read the SYNC_CHANGES-1.27 for what has changed with this release. The integration tests have passed and can be checked below.

Expand to see integration test results ```yaml ❯ make test-integration ../.ci/local_integration_test Starting integration tests... Running Suite: Integration Suite ================================ Random Seed: 1684832585 Will run 11 of 11 specs Scaling Cluster Autoscaler to 0 replicas STEP: Marking nodes present before the tests as unschedulable STEP: Taint node ip-10-180-15-232.ec2.internal STEP: Starting Cluster Autoscaler.... Cluster Autoscaler test Scale up and down nodes by deploying new workload requesting more resources should not lead to any errors and add 1 more node in target cluster /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:92 STEP: Checking autoscaler process is running STEP: Deploying workload... STEP: Validating Scale up • [SLOW TEST:232.280 seconds] Cluster Autoscaler test /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:31 Scale up and down nodes /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:90 by deploying new workload requesting more resources /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:91 should not lead to any errors and add 1 more node in target cluster /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:92 ------------------------------ Cluster Autoscaler test Scale up and down nodes by scaling deployed workload to 3 replicas should not lead to any errors and add 3 more node in target cluster /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:107 STEP: Checking autoscaler process is running STEP: Scaling up workload to 3 replicas... STEP: Validating Scale up • [SLOW TEST:127.149 seconds] Cluster Autoscaler test /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:31 Scale up and down nodes /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:90 by scaling deployed workload to 3 replicas /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:106 should not lead to any errors and add 3 more node in target cluster /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:107 ------------------------------ Cluster Autoscaler test Scale up and down nodes by scaling down the deployed workload to 0 should not lead to any errors and 3 nodes to be removed from the target cluster /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:122 STEP: Checking autoscaler process is running STEP: Scaling down workload to zero... STEP: Validating Scale down STEP: Deleting workload • [SLOW TEST:38.790 seconds] Cluster Autoscaler test /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:31 Scale up and down nodes /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:90 by scaling down the deployed workload to 0 /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:121 should not lead to any errors and 3 nodes to be removed from the target cluster /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:122 ------------------------------ Cluster Autoscaler test testing annotation to skip scaledown by adding annotation and then scaling the workload to zero should not scale down the extra node and should log correspondingly /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:139 STEP: Checking autoscaler process is running STEP: adding the annotation after deploy workload to 1 STEP: Validating Scale up STEP: getting the latest added node and adding annotation to it. STEP: getting the latest added node and adding annotation to it. STEP: getting the latest added node and adding annotation to it. STEP: Scaling down workload to zero... • [SLOW TEST:148.777 seconds] Cluster Autoscaler test /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:31 testing annotation to skip scaledown /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:137 by adding annotation and then scaling the workload to zero /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:138 should not scale down the extra node and should log correspondingly /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:139 ------------------------------ Cluster Autoscaler test testing annotation to skip scaledown by adding annotation and then scaling the workload to zero Should remove the unwanted node once scale down disable annotation is removed /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:164 STEP: Checking autoscaler process is running STEP: getting the latest added node and removing annotation from it. STEP: getting the latest added node and removing annotation from it. STEP: Validating Scale down STEP: Deleting workload • [SLOW TEST:29.536 seconds] Cluster Autoscaler test /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:31 testing annotation to skip scaledown /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:137 by adding annotation and then scaling the workload to zero /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:138 Should remove the unwanted node once scale down disable annotation is removed /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:164 ------------------------------ Cluster Autoscaler test testing min and max limit for Cluster autoscaler by increasing the workload to above max shouldn't scale beyond max number of workers /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:185 STEP: Checking autoscaler process is running STEP: Deploying workload with replicas = max+4 STEP: Validating Scale up • [SLOW TEST:125.027 seconds] Cluster Autoscaler test /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:31 testing min and max limit for Cluster autoscaler /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:183 by increasing the workload to above max /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:184 shouldn't scale beyond max number of workers /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:185 ------------------------------ Cluster Autoscaler test testing min and max limit for Cluster autoscaler by decreasing the workload to below min shouldn't scale down beyond min number of workers /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:197 STEP: Checking autoscaler process is running STEP: Scaling down workload to zero... STEP: Validating Scale down STEP: Deleting workload • [SLOW TEST:38.847 seconds] Cluster Autoscaler test /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:31 testing min and max limit for Cluster autoscaler /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:183 by decreasing the workload to below min /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:196 shouldn't scale down beyond min number of workers /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:197 ------------------------------ Cluster Autoscaler test testing scaling due to taints make current nodes unschedulable should spawn more nodes for accommodating new workload /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:213 STEP: Checking autoscaler process is running STEP: making the only node available, to be unschedulable STEP: Taint node ip-10-180-15-232.ec2.internal STEP: Increasing the workload STEP: Validating Scale up • [SLOW TEST:109.027 seconds] Cluster Autoscaler test /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:31 testing scaling due to taints /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:211 make current nodes unschedulable /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:212 should spawn more nodes for accommodating new workload /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:213 ------------------------------ Cluster Autoscaler test testing scaling due to taints make current nodes unschedulable should remove the node as the taint has been removed and node has low utilization /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:230 STEP: Checking autoscaler process is running STEP: making the node available to be schedulable STEP: Remove taint(s) from node ip-10-180-15-232.ec2.internal STEP: Validating Scale down STEP: Deleting workload • [SLOW TEST:43.924 seconds] Cluster Autoscaler test /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:31 testing scaling due to taints /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:211 make current nodes unschedulable /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:212 should remove the node as the taint has been removed and node has low utilization /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:230 ------------------------------ Cluster Autoscaler test testing scaling due to volume pending create a volume in a zone with no node and a pod requesting it should create a node in the zone with volume and hence scale up /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:249 STEP: Checking autoscaler process is running STEP: Creating StorageClass with topology restrictions • ------------------------------ Cluster Autoscaler test testing not able to scale due to excess demand create a pod requiring more resources than a single machine can provide shouldn't scale up and log the error /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:326 STEP: Checking autoscaler process is running STEP: Deploying the workload STEP: checking that scale up didn't trigger because of no machine satisfying the requirement STEP: Deleting workload • [SLOW TEST:10.468 seconds] Cluster Autoscaler test /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:31 testing not able to scale due to excess demand /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:324 create a pod requiring more resources than a single machine can provide /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:325 shouldn't scale up and log the error /Users/i030268/go/src/k8s.io/autoscaler/cluster-autoscaler/integration/integration_test.go:326 ------------------------------ STEP: Running CleanUp STEP: Deleting workload STEP: Deleting workload STEP: Turning nodes present before the tests, back to schedulable STEP: Remove taint(s) from node ip-10-180-15-232.ec2.internal STEP: Scaling CA back up to 1 in the Shoot namespace Scaling Cluster Autoscaler to 1 replicas Ran 11 of 11 Specs in 913.847 seconds SUCCESS! -- 11 Passed | 0 Failed | 0 Pending | 0 Skipped PASS Ginkgo ran 1 suite in 15m34.007788545s Test Suite Passed ```

Release note:

Synced the changes till v1.27.1 of upstream autoscaler.