@@ -298,7 +298,7 @@ The `ResizePolicy` field is immutable.
298
298
299
299
#### Resize Status
300
300
301
- Resize status will be tracked via 2 new pod conditions: ` PodResizePending ` and ` PodResizing ` .
301
+ Resize status will be tracked via 2 new pod conditions: ` PodResizePending ` and ` PodResizeInProgress ` .
302
302
303
303
** PodResizePending** will track states where the spec has been resized, but the Kubelet has not yet
304
304
allocated the resources. There are two reasons associated with this condition:
@@ -313,7 +313,7 @@ admitted. `lastTransitionTime` will be populated with the time the condition was
313
313
will always be ` True ` when the condition is present - if there is no longer a pending resized
314
314
(either the resize was allocated or reverted), the condition will be removed.
315
315
316
- ** PodResizing ** will track in-progress resizes, and should be present whenever allocated resources
316
+ ** PodResizeInProgress ** will track in-progress resizes, and should be present whenever allocated resources
317
317
!= acknowledged resources (see [ Resource States] ( #resource-states ) ). For successful synchronous
318
318
resizes, this condition should be short lived, and ` reason ` and ` message ` will be left blank. If an
319
319
error occurs while actuating the resize, the ` reason ` will be set to ` Error ` , and ` message ` will be
@@ -539,23 +539,23 @@ This is intentionally hitting various edge-cases for demonstration.
539
539
- ` status.containerStatuses[0].allocatedResources[cpu] ` = 1.5
540
540
- ` acknowledged[cpu] ` = 1
541
541
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1
542
- - ` status.conditions[type==PodResizing ] ` added
542
+ - ` status.conditions[type==PodResizeInProgress ] ` added
543
543
- actual CPU shares = 1024
544
544
545
545
1 . Resize #2 : cpu = 2
546
546
- apiserver validates the request and accepts the operation
547
547
- ` spec.containers[0].resources.requests[cpu] ` = 2
548
548
- ` status.containerStatuses[0].allocatedResources[cpu] ` = 1.5
549
549
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1
550
- - ` status.conditions[type==PodResizing ] `
550
+ - ` status.conditions[type==PodResizeInProgress ] `
551
551
- actual CPU shares = 1024
552
552
553
553
1 . Container runtime applied cpu=1.5
554
554
- ` spec.containers[0].resources.requests[cpu] ` = 2
555
555
- ` status.containerStatuses[0].allocatedResources[cpu] ` = 1.5
556
556
- ` acknowledged[cpu] ` = 1.5
557
557
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1
558
- - ` status.conditions[type==PodResizing ] `
558
+ - ` status.conditions[type==PodResizeInProgress ] `
559
559
- actual CPU shares = 1536
560
560
561
561
1 . kubelet syncs the pod, and sees resize #2 (cpu = 2)
@@ -565,7 +565,7 @@ This is intentionally hitting various edge-cases for demonstration.
565
565
- ` acknowledged[cpu] ` = 1.5
566
566
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1.5
567
567
- ` status.conditions[type==PodResizePending].type ` = ` "Deferred" `
568
- - ` status.conditions[type==PodResizing ] ` removed
568
+ - ` status.conditions[type==PodResizeInProgress ] ` removed
569
569
- actual CPU shares = 1536
570
570
571
571
1 . Resize #3 : cpu = 1.6
@@ -583,23 +583,23 @@ This is intentionally hitting various edge-cases for demonstration.
583
583
- ` acknowledged[cpu] ` = 1.5
584
584
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1.5
585
585
- ` status.conditions[type==PodResizePending] ` removed
586
- - ` status.conditions[type==PodResizing ] ` added
586
+ - ` status.conditions[type==PodResizeInProgress ] ` added
587
587
- actual CPU shares = 1536
588
588
589
589
1 . Container runtime applied cpu=1.6
590
590
- ` spec.containers[0].resources.requests[cpu] ` = 1.6
591
591
- ` status.containerStatuses[0].allocatedResources[cpu] ` = 1.6
592
592
- ` acknowledged[cpu] ` = 1.6
593
593
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1.5
594
- - ` status.conditions[type==PodResizing ] `
594
+ - ` status.conditions[type==PodResizeInProgress ] `
595
595
- actual CPU shares = 1638
596
596
597
597
1 . Kubelet syncs the pod
598
598
- ` spec.containers[0].resources.requests[cpu] ` = 1.6
599
599
- ` status.containerStatuses[0].allocatedResources[cpu] ` = 1.6
600
600
- ` acknowledged[cpu] ` = 1.6
601
601
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1.6
602
- - ` status.conditions[type==PodResizing ] ` removed
602
+ - ` status.conditions[type==PodResizeInProgress ] ` removed
603
603
- actual CPU shares = 1638
604
604
605
605
1 . Resize #4 : cpu = 100
@@ -721,18 +721,18 @@ Impacts of a restart outside of resource configuration are out of scope.
721
721
1 . Updated pod is synced: Check if pod can be admitted
722
722
- No: add ` PodResizePending ` condition with type ` Deferred ` , no change to allocated resources
723
723
- Restart: redo admission check, still deferred.
724
- - Yes: add ` PodResizing ` condition, update allocated checkpoint
724
+ - Yes: add ` PodResizeInProgress ` condition, update allocated checkpoint
725
725
- Restart before update: readmit, then update allocated
726
726
- Restart after update: allocated != acknowledged --> proceed with resize
727
727
1 . Allocated != Acknowledged
728
728
- Trigger an ` UpdateContainerResources ` CRI call, then update Acknowledged resources on success
729
729
- Restart before CRI call: allocated != acknowledged, will still trigger the update call
730
730
- Restart after CRI call, before acknowledged update: will redo update call
731
731
- Restart after acknowledged update: allocated == acknowledged, condition removed
732
- - In all restart cases, ` LastTransitionTime ` is propagated from the old pod status ` PodResizing `
732
+ - In all restart cases, ` LastTransitionTime ` is propagated from the old pod status ` PodResizeInProgress `
733
733
condition, and remains unchanged.
734
734
1 . PLEG updates PodStatus cache, triggers pod sync
735
- - Pod status updated with actual resources, ` PodResizing ` condition removed
735
+ - Pod status updated with actual resources, ` PodResizeInProgress ` condition removed
736
736
- Desired == Allocated == Acknowledged, no resize changes needed.
737
737
738
738
#### Notes
0 commit comments