From bbb499628ade784af2511d300c8ad3e15587fdca Mon Sep 17 00:00:00 2001 From: Amanuel Engeda <74629455+engedaam@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:08:21 -0800 Subject: [PATCH] chore: Only support `Ready` Node Condition for Node Repair (#7410) --- pkg/cloudprovider/cloudprovider.go | 10 ---------- test/suites/integration/repair_policy_test.go | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/pkg/cloudprovider/cloudprovider.go b/pkg/cloudprovider/cloudprovider.go index 3faeba065877..d16e75384981 100644 --- a/pkg/cloudprovider/cloudprovider.go +++ b/pkg/cloudprovider/cloudprovider.go @@ -254,16 +254,6 @@ func (c *CloudProvider) RepairPolicies() []cloudprovider.RepairPolicy { ConditionStatus: corev1.ConditionFalse, TolerationDuration: 30 * time.Minute, }, - { - ConditionType: corev1.NodeDiskPressure, - ConditionStatus: corev1.ConditionTrue, - TolerationDuration: 30 * time.Minute, - }, - { - ConditionType: corev1.NodeMemoryPressure, - ConditionStatus: corev1.ConditionTrue, - TolerationDuration: 30 * time.Minute, - }, } } diff --git a/test/suites/integration/repair_policy_test.go b/test/suites/integration/repair_policy_test.go index 8836ec30f0ad..24b64a62d287 100644 --- a/test/suites/integration/repair_policy_test.go +++ b/test/suites/integration/repair_policy_test.go @@ -78,16 +78,6 @@ var _ = Describe("Repair Policy", func() { Status: corev1.ConditionFalse, LastTransitionTime: metav1.Time{Time: time.Now().Add(-31 * time.Minute)}, }), - Entry("DiskPressure", corev1.NodeCondition{ - Type: corev1.NodeDiskPressure, - Status: corev1.ConditionTrue, - LastTransitionTime: metav1.Time{Time: time.Now().Add(-31 * time.Minute)}, - }), - Entry("MemoryPressure", corev1.NodeCondition{ - Type: corev1.NodeMemoryPressure, - Status: corev1.ConditionTrue, - LastTransitionTime: metav1.Time{Time: time.Now().Add(-31 * time.Minute)}, - }), ) It("should ignore disruption budgets", func() { nodePool.Spec.Disruption.Budgets = []karpenterv1.Budget{