mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Merge pull request #44720 from FengyunPan/use-const
Automatic merge from submit-queue Use const value for pod's conditions None
This commit is contained in:
commit
f99e9a5082
@ -68,7 +68,7 @@ func AnalysePods(selectorv1 *metav1.LabelSelector, allPods []util.FederatedObjec
|
|||||||
} else {
|
} else {
|
||||||
if condition.Type == api_v1.PodScheduled &&
|
if condition.Type == api_v1.PodScheduled &&
|
||||||
condition.Status == api_v1.ConditionFalse &&
|
condition.Status == api_v1.ConditionFalse &&
|
||||||
condition.Reason == "Unschedulable" &&
|
condition.Reason == api_v1.PodReasonUnschedulable &&
|
||||||
condition.LastTransitionTime.Add(UnschedulableThreshold).Before(currentTime) {
|
condition.LastTransitionTime.Add(UnschedulableThreshold).Before(currentTime) {
|
||||||
|
|
||||||
status.Unschedulable++
|
status.Unschedulable++
|
||||||
|
@ -49,7 +49,7 @@ func TestAnalyze(t *testing.T) {
|
|||||||
{
|
{
|
||||||
Type: api_v1.PodScheduled,
|
Type: api_v1.PodScheduled,
|
||||||
Status: api_v1.ConditionFalse,
|
Status: api_v1.ConditionFalse,
|
||||||
Reason: "Unschedulable",
|
Reason: api_v1.PodReasonUnschedulable,
|
||||||
LastTransitionTime: metav1.Time{Time: now.Add(-10 * time.Minute)},
|
LastTransitionTime: metav1.Time{Time: now.Add(-10 * time.Minute)},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user