@@ -333,9 +333,9 @@ func checkClusterResourceSnapshot() *placementv1beta1.ClusterResourceSnapshot {
333333}
334334
335335func updateClusterSchedulingPolicySnapshotStatus (status metav1.ConditionStatus , clustersSelected bool ) * placementv1beta1.ClusterSchedulingPolicySnapshot {
336- reason := ResourceScheduleSucceededReason
336+ reason := condition . ResourceScheduleSucceededReason
337337 if status == metav1 .ConditionFalse {
338- reason = ResourceScheduleFailedReason
338+ reason = condition . ResourceScheduleFailedReason
339339 }
340340
341341 // Update scheduling condition
@@ -422,7 +422,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
422422 {
423423 Status : metav1 .ConditionUnknown ,
424424 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
425- Reason : SchedulingUnknownReason ,
425+ Reason : condition . SchedulingUnknownReason ,
426426 },
427427 },
428428 },
@@ -461,7 +461,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
461461 {
462462 Status : metav1 .ConditionTrue ,
463463 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
464- Reason : ResourceScheduleSucceededReason ,
464+ Reason : condition . ResourceScheduleSucceededReason ,
465465 },
466466 },
467467 },
@@ -479,7 +479,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
479479 {Name : ptr .To ("generation" ), Value : ptr .To (strconv .FormatInt (gotCRP .Generation , 10 ))},
480480 {Name : ptr .To ("conditionType" ), Value : ptr .To (string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ))},
481481 {Name : ptr .To ("status" ), Value : ptr .To (string (corev1 .ConditionUnknown ))},
482- {Name : ptr .To ("reason" ), Value : ptr .To (SchedulingUnknownReason )},
482+ {Name : ptr .To ("reason" ), Value : ptr .To (condition . SchedulingUnknownReason )},
483483 },
484484 Gauge : & prometheusclientmodel.Gauge {
485485 Value : ptr .To (float64 (time .Now ().UnixNano ()) / 1e9 ),
@@ -518,7 +518,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
518518 {
519519 Status : metav1 .ConditionFalse ,
520520 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
521- Reason : ResourceScheduleFailedReason ,
521+ Reason : condition . ResourceScheduleFailedReason ,
522522 },
523523 },
524524 },
@@ -535,7 +535,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
535535 {Name : ptr .To ("generation" ), Value : ptr .To (strconv .FormatInt (gotCRP .Generation , 10 ))},
536536 {Name : ptr .To ("conditionType" ), Value : ptr .To (string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ))},
537537 {Name : ptr .To ("status" ), Value : ptr .To (string (corev1 .ConditionUnknown ))},
538- {Name : ptr .To ("reason" ), Value : ptr .To (SchedulingUnknownReason )},
538+ {Name : ptr .To ("reason" ), Value : ptr .To (condition . SchedulingUnknownReason )},
539539 },
540540 Gauge : & prometheusclientmodel.Gauge {
541541 Value : ptr .To (float64 (time .Now ().UnixNano ()) / 1e9 ),
@@ -547,7 +547,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
547547 {Name : ptr .To ("generation" ), Value : ptr .To (strconv .FormatInt (gotCRP .Generation , 10 ))},
548548 {Name : ptr .To ("conditionType" ), Value : ptr .To (string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ))},
549549 {Name : ptr .To ("status" ), Value : ptr .To (string (corev1 .ConditionFalse ))},
550- {Name : ptr .To ("reason" ), Value : ptr .To (ResourceScheduleFailedReason )},
550+ {Name : ptr .To ("reason" ), Value : ptr .To (condition . ResourceScheduleFailedReason )},
551551 },
552552 Gauge : & prometheusclientmodel.Gauge {
553553 Value : ptr .To (float64 (time .Now ().UnixNano ()) / 1e9 ),
@@ -577,7 +577,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
577577 {
578578 Status : metav1 .ConditionTrue ,
579579 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
580- Reason : ResourceScheduleSucceededReason ,
580+ Reason : condition . ResourceScheduleSucceededReason ,
581581 },
582582 {
583583 Status : metav1 .ConditionUnknown ,
@@ -643,7 +643,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
643643 {Name : ptr .To ("generation" ), Value : ptr .To (strconv .FormatInt (gotCRP .Generation , 10 ))},
644644 {Name : ptr .To ("conditionType" ), Value : ptr .To (string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ))},
645645 {Name : ptr .To ("status" ), Value : ptr .To (string (corev1 .ConditionUnknown ))},
646- {Name : ptr .To ("reason" ), Value : ptr .To (SchedulingUnknownReason )},
646+ {Name : ptr .To ("reason" ), Value : ptr .To (condition . SchedulingUnknownReason )},
647647 },
648648 Gauge : & prometheusclientmodel.Gauge {
649649 Value : ptr .To (float64 (time .Now ().UnixNano ()) / 1e9 ),
@@ -672,7 +672,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
672672 {
673673 Status : metav1 .ConditionTrue ,
674674 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
675- Reason : ResourceScheduleSucceededReason ,
675+ Reason : condition . ResourceScheduleSucceededReason ,
676676 },
677677 {
678678 Status : metav1 .ConditionTrue ,
@@ -787,7 +787,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
787787 {
788788 Status : metav1 .ConditionTrue ,
789789 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
790- Reason : ResourceScheduleSucceededReason ,
790+ Reason : condition . ResourceScheduleSucceededReason ,
791791 },
792792 {
793793 Status : metav1 .ConditionUnknown ,
@@ -851,7 +851,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
851851 {Name : ptr .To ("generation" ), Value : ptr .To (strconv .FormatInt (gotCRP .Generation , 10 ))},
852852 {Name : ptr .To ("conditionType" ), Value : ptr .To (string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ))},
853853 {Name : ptr .To ("status" ), Value : ptr .To (string (corev1 .ConditionUnknown ))},
854- {Name : ptr .To ("reason" ), Value : ptr .To (SchedulingUnknownReason )},
854+ {Name : ptr .To ("reason" ), Value : ptr .To (condition . SchedulingUnknownReason )},
855855 },
856856 Gauge : & prometheusclientmodel.Gauge {
857857 Value : ptr .To (float64 (time .Now ().UnixNano ()) / 1e9 ),
@@ -880,7 +880,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
880880 {
881881 Status : metav1 .ConditionTrue ,
882882 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
883- Reason : ResourceScheduleSucceededReason ,
883+ Reason : condition . ResourceScheduleSucceededReason ,
884884 },
885885 {
886886 Status : metav1 .ConditionTrue ,
@@ -993,7 +993,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
993993 {
994994 Status : metav1 .ConditionUnknown ,
995995 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
996- Reason : SchedulingUnknownReason ,
996+ Reason : condition . SchedulingUnknownReason ,
997997 ObservedGeneration : 2 ,
998998 },
999999 {
@@ -1028,7 +1028,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
10281028 {Name : ptr .To ("generation" ), Value : ptr .To (strconv .FormatInt (gotCRP .Generation , 10 ))},
10291029 {Name : ptr .To ("conditionType" ), Value : ptr .To (string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ))},
10301030 {Name : ptr .To ("status" ), Value : ptr .To (string (corev1 .ConditionUnknown ))},
1031- {Name : ptr .To ("reason" ), Value : ptr .To (SchedulingUnknownReason )},
1031+ {Name : ptr .To ("reason" ), Value : ptr .To (condition . SchedulingUnknownReason )},
10321032 },
10331033 Gauge : & prometheusclientmodel.Gauge {
10341034 Value : ptr .To (float64 (time .Now ().UnixNano ()) / 1e9 ),
@@ -1047,7 +1047,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
10471047 {
10481048 Status : metav1 .ConditionTrue ,
10491049 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
1050- Reason : ResourceScheduleSucceededReason ,
1050+ Reason : condition . ResourceScheduleSucceededReason ,
10511051 ObservedGeneration : 2 ,
10521052 },
10531053 {
@@ -1181,7 +1181,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
11811181 {
11821182 Status : metav1 .ConditionTrue ,
11831183 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
1184- Reason : ResourceScheduleSucceededReason ,
1184+ Reason : condition . ResourceScheduleSucceededReason ,
11851185 },
11861186 {
11871187 Status : metav1 .ConditionTrue ,
@@ -1270,7 +1270,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
12701270 {Name : ptr .To ("generation" ), Value : ptr .To (strconv .FormatInt (gotCRP .Generation , 10 ))},
12711271 {Name : ptr .To ("conditionType" ), Value : ptr .To (string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ))},
12721272 {Name : ptr .To ("status" ), Value : ptr .To (string (corev1 .ConditionUnknown ))},
1273- {Name : ptr .To ("reason" ), Value : ptr .To (SchedulingUnknownReason )},
1273+ {Name : ptr .To ("reason" ), Value : ptr .To (condition . SchedulingUnknownReason )},
12741274 },
12751275 Gauge : & prometheusclientmodel.Gauge {
12761276 Value : ptr .To (float64 (time .Now ().UnixNano ()) / 1e9 ),
@@ -1439,7 +1439,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
14391439 {
14401440 Status : metav1 .ConditionUnknown ,
14411441 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
1442- Reason : SchedulingUnknownReason ,
1442+ Reason : condition . SchedulingUnknownReason ,
14431443 },
14441444 },
14451445 },
@@ -1480,7 +1480,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
14801480 {
14811481 Status : metav1 .ConditionTrue ,
14821482 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
1483- Reason : ResourceScheduleSucceededReason ,
1483+ Reason : condition . ResourceScheduleSucceededReason ,
14841484 },
14851485 {
14861486 Status : metav1 .ConditionTrue ,
@@ -1564,7 +1564,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
15641564 {Name : ptr .To ("generation" ), Value : ptr .To (strconv .FormatInt (gotCRP .Generation , 10 ))},
15651565 {Name : ptr .To ("conditionType" ), Value : ptr .To (string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ))},
15661566 {Name : ptr .To ("status" ), Value : ptr .To (string (corev1 .ConditionUnknown ))},
1567- {Name : ptr .To ("reason" ), Value : ptr .To (SchedulingUnknownReason )},
1567+ {Name : ptr .To ("reason" ), Value : ptr .To (condition . SchedulingUnknownReason )},
15681568 },
15691569 Gauge : & prometheusclientmodel.Gauge {
15701570 Value : ptr .To (float64 (time .Now ().UnixNano ()) / 1e9 ),
@@ -1663,7 +1663,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
16631663 {
16641664 Status : metav1 .ConditionTrue ,
16651665 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
1666- Reason : ResourceScheduleSucceededReason ,
1666+ Reason : condition . ResourceScheduleSucceededReason ,
16671667 },
16681668 {
16691669 Status : metav1 .ConditionTrue ,
@@ -1747,7 +1747,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
17471747 {Name : ptr .To ("generation" ), Value : ptr .To (strconv .FormatInt (gotCRP .Generation , 10 ))},
17481748 {Name : ptr .To ("conditionType" ), Value : ptr .To (string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ))},
17491749 {Name : ptr .To ("status" ), Value : ptr .To (string (corev1 .ConditionUnknown ))},
1750- {Name : ptr .To ("reason" ), Value : ptr .To (SchedulingUnknownReason )},
1750+ {Name : ptr .To ("reason" ), Value : ptr .To (condition . SchedulingUnknownReason )},
17511751 },
17521752 Gauge : & prometheusclientmodel.Gauge {
17531753 Value : ptr .To (float64 (time .Now ().UnixNano ()) / 1e9 ),
@@ -1791,7 +1791,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
17911791 {
17921792 Status : metav1 .ConditionTrue ,
17931793 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
1794- Reason : ResourceScheduleSucceededReason ,
1794+ Reason : condition . ResourceScheduleSucceededReason ,
17951795 },
17961796 {
17971797 Status : metav1 .ConditionTrue ,
@@ -1943,7 +1943,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
19431943 {
19441944 Status : metav1 .ConditionFalse ,
19451945 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
1946- Reason : InvalidResourceSelectorsReason ,
1946+ Reason : condition . InvalidResourceSelectorsReason ,
19471947 },
19481948 },
19491949 },
@@ -1958,7 +1958,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
19581958 {Name : ptr .To ("generation" ), Value : ptr .To (strconv .FormatInt (gotCRP .Generation , 10 ))},
19591959 {Name : ptr .To ("conditionType" ), Value : ptr .To (string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ))},
19601960 {Name : ptr .To ("status" ), Value : ptr .To (string (corev1 .ConditionFalse ))},
1961- {Name : ptr .To ("reason" ), Value : ptr .To (InvalidResourceSelectorsReason )},
1961+ {Name : ptr .To ("reason" ), Value : ptr .To (condition . InvalidResourceSelectorsReason )},
19621962 },
19631963 Gauge : & prometheusclientmodel.Gauge {
19641964 Value : ptr .To (float64 (time .Now ().UnixNano ()) / 1e9 ),
@@ -2017,7 +2017,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
20172017 {
20182018 Status : metav1 .ConditionUnknown ,
20192019 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
2020- Reason : SchedulingUnknownReason ,
2020+ Reason : condition . SchedulingUnknownReason ,
20212021 },
20222022 },
20232023 },
@@ -2040,7 +2040,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
20402040 {Name : ptr .To ("generation" ), Value : ptr .To (strconv .FormatInt (gotCRP .Generation , 10 ))},
20412041 {Name : ptr .To ("conditionType" ), Value : ptr .To (string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ))},
20422042 {Name : ptr .To ("status" ), Value : ptr .To (string (corev1 .ConditionUnknown ))},
2043- {Name : ptr .To ("reason" ), Value : ptr .To (SchedulingUnknownReason )},
2043+ {Name : ptr .To ("reason" ), Value : ptr .To (condition . SchedulingUnknownReason )},
20442044 },
20452045 Gauge : & prometheusclientmodel.Gauge {
20462046 Value : ptr .To (float64 (time .Now ().UnixNano ()) / 1e9 ),
@@ -2064,7 +2064,7 @@ var _ = Describe("Test ClusterResourcePlacement Controller", func() {
20642064 {
20652065 Status : metav1 .ConditionTrue ,
20662066 Type : string (placementv1beta1 .ClusterResourcePlacementScheduledConditionType ),
2067- Reason : ResourceScheduleSucceededReason ,
2067+ Reason : condition . ResourceScheduleSucceededReason ,
20682068 },
20692069 {
20702070 Status : metav1 .ConditionUnknown ,
0 commit comments