Skip to content

Commit 4aa1755

Browse files
committed
Revert "fix: check pods for unschedulable condition"
This reverts commit 0cad9a0. Fix #1046 Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
1 parent 2cdd390 commit 4aa1755

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

pkg/library/status/check.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,6 @@ func CheckPodsState(workspaceID string, namespace string, labelSelector k8sclien
9696
if msg, err := CheckPodEvents(&pod, workspaceID, ignoredEvents, clusterAPI); err != nil || msg != "" {
9797
return msg, err
9898
}
99-
if pod.Status.Phase == corev1.PodPending {
100-
if msg := checkPodConditions(&pod); msg != "" {
101-
return msg, nil
102-
}
103-
}
10499
}
105100
return "", nil
106101
}
@@ -170,18 +165,6 @@ func checkIfUnrecoverableEventIgnored(reason string, ignoredEvents []string) (ig
170165
return false
171166
}
172167

173-
func checkPodConditions(pod *corev1.Pod) (msg string) {
174-
if pod.Status.Conditions != nil {
175-
for _, condition := range pod.Status.Conditions {
176-
// Pod unschedulable condition
177-
if condition.Type == corev1.PodScheduled && condition.Status == corev1.ConditionFalse && condition.Reason == corev1.PodReasonUnschedulable {
178-
return fmt.Sprintf("Pod is unschedulable: %s", condition.Message)
179-
}
180-
}
181-
}
182-
return ""
183-
}
184-
185168
// Returns the number of times an event has occurred.
186169
// This function exists for the following reasons:
187170
//

0 commit comments

Comments
 (0)