mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #52843 from aleksandra-malinowska/autoscaling-test-fix-4
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.. Improve cluster autoscaling tests logging and error checking during cleanup This adds extra logs and error checks to autoscaling tests during PodDisruptionBudgets cleanup. It should help with identifying flake causes. Follow up to #52796
This commit is contained in:
commit
995d5ca54a
@ -1410,8 +1410,18 @@ func addKubeSystemPdbs(f *framework.Framework) (func(), error) {
|
||||
|
||||
newPdbs := make([]string, 0)
|
||||
cleanup := func() {
|
||||
var finalErr error
|
||||
for _, newPdbName := range newPdbs {
|
||||
f.ClientSet.Policy().PodDisruptionBudgets("kube-system").Delete(newPdbName, &metav1.DeleteOptions{})
|
||||
By(fmt.Sprintf("Delete PodDisruptionBudget %v", newPdbName))
|
||||
err := f.ClientSet.Policy().PodDisruptionBudgets("kube-system").Delete(newPdbName, &metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
// log error, but attempt to remove other pdbs
|
||||
glog.Errorf("Failed to delete PodDisruptionBudget %v, err: %v", newPdbName, err)
|
||||
finalErr = err
|
||||
}
|
||||
}
|
||||
if finalErr != nil {
|
||||
framework.Failf("Error during PodDisruptionBudget cleanup: %v", finalErr)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user