Commit f99e9a50 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #44720 from FengyunPan/use-const

Automatic merge from submit-queue Use const value for pod's conditions None
parents 2425f581 1bad02cb
......@@ -68,7 +68,7 @@ func AnalysePods(selectorv1 *metav1.LabelSelector, allPods []util.FederatedObjec
} else {
if condition.Type == api_v1.PodScheduled &&
condition.Status == api_v1.ConditionFalse &&
condition.Reason == "Unschedulable" &&
condition.Reason == api_v1.PodReasonUnschedulable &&
condition.LastTransitionTime.Add(UnschedulableThreshold).Before(currentTime) {
status.Unschedulable++
......
......@@ -49,7 +49,7 @@ func TestAnalyze(t *testing.T) {
{
Type: api_v1.PodScheduled,
Status: api_v1.ConditionFalse,
Reason: "Unschedulable",
Reason: api_v1.PodReasonUnschedulable,
LastTransitionTime: metav1.Time{Time: now.Add(-10 * time.Minute)},
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment