Skip to content

Commit

Permalink
chore: Add Unknown Kubelet Ready condition into Repair Policies (#7514)
Browse files Browse the repository at this point in the history
  • Loading branch information
engedaam authored Dec 11, 2024
1 parent 0e677b6 commit fe32aae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pkg/cloudprovider/cloudprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ func (c *CloudProvider) RepairPolicies() []cloudprovider.RepairPolicy {
ConditionStatus: corev1.ConditionFalse,
TolerationDuration: 30 * time.Minute,
},
{
ConditionType: corev1.NodeReady,
ConditionStatus: corev1.ConditionUnknown,
TolerationDuration: 30 * time.Minute,
},
}
}

Expand Down
7 changes: 6 additions & 1 deletion test/suites/integration/repair_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,16 @@ var _ = Describe("Repair Policy", func() {
env.EventuallyExpectNotFound(pod, node)
env.EventuallyExpectHealthyPodCount(selector, numPods)
},
Entry("Readiness", corev1.NodeCondition{
Entry("Node Ready False", corev1.NodeCondition{
Type: corev1.NodeReady,
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.Time{Time: time.Now().Add(-31 * time.Minute)},
}),
Entry("Node Ready Unknown", corev1.NodeCondition{
Type: corev1.NodeReady,
Status: corev1.ConditionUnknown,
LastTransitionTime: metav1.Time{Time: time.Now().Add(-31 * time.Minute)},
}),
)
It("should ignore disruption budgets", func() {
nodePool.Spec.Disruption.Budgets = []karpenterv1.Budget{
Expand Down

0 comments on commit fe32aae

Please sign in to comment.