@@ -80,7 +80,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
80
80
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
81
81
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
82
82
},
83
- expectResult : expectationDiffs {deleteReadyLimit : 1 },
83
+ expectResult : expectationDiffs {deleteAvailableLimit : 1 },
84
84
},
85
85
{
86
86
name : "specified delete 1 pod (all ready) (step 2/3)" ,
@@ -115,7 +115,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
115
115
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
116
116
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
117
117
},
118
- expectResult : expectationDiffs {deleteReadyLimit : 1 },
118
+ expectResult : expectationDiffs {deleteAvailableLimit : 1 },
119
119
},
120
120
{
121
121
name : "specified delete 2 pod (all ready) (step 2/6)" ,
@@ -150,7 +150,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
150
150
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
151
151
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ), // new creation
152
152
},
153
- expectResult : expectationDiffs {deleteReadyLimit : 1 },
153
+ expectResult : expectationDiffs {deleteAvailableLimit : 1 },
154
154
},
155
155
{
156
156
name : "specified delete 2 pod (all ready) (step 5/6)" ,
@@ -185,7 +185,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
185
185
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
186
186
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
187
187
},
188
- expectResult : expectationDiffs {deleteReadyLimit : 2 },
188
+ expectResult : expectationDiffs {deleteAvailableLimit : 2 },
189
189
},
190
190
{
191
191
name : "specified delete 2 pod and replicas to 4 (step 2/3)" ,
@@ -316,7 +316,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
316
316
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
317
317
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
318
318
},
319
- expectResult : expectationDiffs {deleteReadyLimit : 1 , useSurge : 1 },
319
+ expectResult : expectationDiffs {deleteAvailableLimit : 1 , useSurge : 1 },
320
320
},
321
321
{
322
322
name : "specified delete with maxSurge (step 4/4)" ,
@@ -366,7 +366,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
366
366
createTestPod (newRevision , appspub .LifecycleStateUpdating , false , false ), // new in-place update
367
367
createTestPod (newRevision , appspub .LifecycleStateNormal , false , false ), // new creation
368
368
},
369
- expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteReadyLimit : 0 },
369
+ expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteAvailableLimit : 0 },
370
370
},
371
371
{
372
372
name : "update in-place partition=3 with maxSurge (step 4/4)" ,
@@ -379,7 +379,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
379
379
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ), // new in-place update
380
380
createTestPod (newRevision , appspub .LifecycleStateNormal , false , false ), // new creation
381
381
},
382
- expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteReadyLimit : 1 },
382
+ expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteAvailableLimit : 1 },
383
383
},
384
384
{
385
385
name : "update recreate partition=3 with maxSurge (step 1/7)" ,
@@ -417,7 +417,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
417
417
createTestPod (oldRevision , appspub .LifecycleStateNormal , true , true ), // begin to recreate
418
418
createTestPod (newRevision , appspub .LifecycleStateNormal , false , false ), // new creation
419
419
},
420
- expectResult : expectationDiffs {useSurge : 1 , useSurgeOldRevision : 1 , deleteReadyLimit : 1 , updateNum : 1 , updateMaxUnavailable : 2 },
420
+ expectResult : expectationDiffs {useSurge : 1 , useSurgeOldRevision : 1 , deleteAvailableLimit : 1 , updateNum : 1 , updateMaxUnavailable : 2 },
421
421
},
422
422
{
423
423
name : "update recreate partition=3 with maxSurge (step 4/7)" ,
@@ -442,7 +442,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
442
442
createTestPod (newRevision , appspub .LifecycleStateNormal , false , false ), // new creation
443
443
createTestPod (newRevision , appspub .LifecycleStateNormal , false , false ), // new creation for update
444
444
},
445
- expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteReadyLimit : 0 },
445
+ expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteAvailableLimit : 0 },
446
446
},
447
447
{
448
448
name : "update recreate partition=3 with maxSurge (step 6/7)" ,
@@ -455,7 +455,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
455
455
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ), // new creation
456
456
createTestPod (newRevision , appspub .LifecycleStateNormal , false , false ), // new creation for update
457
457
},
458
- expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteReadyLimit : 1 },
458
+ expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteAvailableLimit : 1 },
459
459
},
460
460
{
461
461
name : "update recreate partition=3 with maxSurge (step 7/7)" ,
@@ -492,7 +492,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
492
492
createTestPod (oldRevision , appspub .LifecycleStateNormal , true , false ),
493
493
createTestPod (newRevision , appspub .LifecycleStateNormal , false , false ), // new creation
494
494
},
495
- expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteReadyLimit : 3 },
495
+ expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteAvailableLimit : 3 },
496
496
},
497
497
{
498
498
name : "update recreate partition=99% with maxUnavailable=3, maxSurge=2 (step 3/3)" ,
@@ -529,7 +529,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
529
529
createTestPod (oldRevision , appspub .LifecycleStateNormal , true , false ),
530
530
createTestPod (newRevision , appspub .LifecycleStateNormal , false , false ), // new creation
531
531
},
532
- expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteReadyLimit : 2 },
532
+ expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteAvailableLimit : 2 },
533
533
},
534
534
{
535
535
name : "update recreate partition=99% with maxUnavailable=40%, maxSurge=30% (step 3/3)" ,
@@ -566,7 +566,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
566
566
createTestPod (oldRevision , appspub .LifecycleStateNormal , true , false ),
567
567
createTestPod (newRevision , appspub .LifecycleStateNormal , false , false ), // new creation
568
568
},
569
- expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteReadyLimit : 1 },
569
+ expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 1 , deleteAvailableLimit : 1 },
570
570
},
571
571
{
572
572
name : "update recreate partition=99% with maxUnavailable=30%, maxSurge=30% (step 3/3)" ,
@@ -656,7 +656,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
656
656
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
657
657
},
658
658
revisionConsistent : true ,
659
- expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 2 , deleteReadyLimit : 2 , updateNum : 1 , updateMaxUnavailable : 2 },
659
+ expectResult : expectationDiffs {scaleDownNum : 1 , scaleDownNumOldRevision : 2 , deleteAvailableLimit : 2 , updateNum : 1 , updateMaxUnavailable : 2 },
660
660
},
661
661
{
662
662
name : "disable rollback feature-gate" ,
@@ -705,7 +705,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
705
705
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
706
706
createTestPod (newRevision , appspub .LifecycleStateNormal , true , true ),
707
707
},
708
- expectResult : expectationDiffs {deleteReadyLimit : 1 },
708
+ expectResult : expectationDiffs {deleteAvailableLimit : 1 },
709
709
},
710
710
{
711
711
name : "[scalingExcludePreparingDelete=false] specific delete a pod with lifecycle hook (step 2/4)" ,
@@ -745,7 +745,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
745
745
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
746
746
createTestPod (newRevision , appspub .LifecycleStateNormal , true , true ),
747
747
},
748
- expectResult : expectationDiffs {deleteReadyLimit : 1 },
748
+ expectResult : expectationDiffs {deleteAvailableLimit : 1 },
749
749
},
750
750
{
751
751
name : "[scalingExcludePreparingDelete=true] specific delete a pod with lifecycle hook (step 2/4)" ,
@@ -791,7 +791,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
791
791
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
792
792
createTestPod (newRevision , appspub .LifecycleStateNormal , true , true ),
793
793
},
794
- expectResult : expectationDiffs {deleteReadyLimit : 1 },
794
+ expectResult : expectationDiffs {deleteAvailableLimit : 1 },
795
795
},
796
796
{
797
797
name : "[scalingExcludePreparingDelete=true] specific delete a pod with lifecycle hook and then cancel (step 2/5)" ,
@@ -826,7 +826,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
826
826
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ), // it has been changed to normal by managePreparingDelete
827
827
createTestPod (newRevision , appspub .LifecycleStateNormal , false , false ),
828
828
},
829
- expectResult : expectationDiffs {scaleDownNum : 1 , deleteReadyLimit : 1 },
829
+ expectResult : expectationDiffs {scaleDownNum : 1 , deleteAvailableLimit : 1 },
830
830
},
831
831
{
832
832
name : "[scalingExcludePreparingDelete=true] specific delete a pod with lifecycle hook and then cancel (step 5/5)" ,
@@ -859,7 +859,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
859
859
createTestPod (newRevision , appspub .LifecycleStateNormal , true , false ),
860
860
createTestPod (newRevision , appspub .LifecycleStateNormal , true , true ),
861
861
},
862
- expectResult : expectationDiffs {deleteReadyLimit : 2 },
862
+ expectResult : expectationDiffs {deleteAvailableLimit : 2 },
863
863
},
864
864
{
865
865
name : "[scalingExcludePreparingDelete=true] specific scale down with lifecycle hook, then scale up pods (step 3/6)" ,
@@ -950,7 +950,7 @@ func TestCalculateDiffsWithExpectation(t *testing.T) {
950
950
createTestPod (oldRevision , appspub .LifecycleStateNormal , true , false ),
951
951
createTestPod (oldRevision , appspub .LifecycleStateNormal , true , false ),
952
952
},
953
- expectResult : expectationDiffs {scaleDownNum : 2 , scaleDownNumOldRevision : 5 , deleteReadyLimit : 2 , updateNum : 3 , updateMaxUnavailable : 2 },
953
+ expectResult : expectationDiffs {scaleDownNum : 2 , scaleDownNumOldRevision : 5 , deleteAvailableLimit : 2 , updateNum : 3 , updateMaxUnavailable : 2 },
954
954
},
955
955
{
956
956
name : "[UpdateStrategyPaused=true] create 0 newRevision pods with maxSurge=3,maxUnavailable=0" ,
0 commit comments