@@ -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
@@ -556,23 +556,23 @@ This is intentionally hitting various edge-cases for demonstration.
556
556
- ` status.containerStatuses[0].allocatedResources[cpu] ` = 1.5
557
557
- ` acknowledged[cpu] ` = 1
558
558
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1
559
- - ` status.conditions[type==PodResizing ] ` added
559
+ - ` status.conditions[type==PodResizeInProgress ] ` added
560
560
- actual CPU shares = 1024
561
561
562
562
1 . Resize #2 : cpu = 2
563
563
- apiserver validates the request and accepts the operation
564
564
- ` spec.containers[0].resources.requests[cpu] ` = 2
565
565
- ` status.containerStatuses[0].allocatedResources[cpu] ` = 1.5
566
566
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1
567
- - ` status.conditions[type==PodResizing ] `
567
+ - ` status.conditions[type==PodResizeInProgress ] `
568
568
- actual CPU shares = 1024
569
569
570
570
1 . Container runtime applied cpu=1.5
571
571
- ` spec.containers[0].resources.requests[cpu] ` = 2
572
572
- ` status.containerStatuses[0].allocatedResources[cpu] ` = 1.5
573
573
- ` acknowledged[cpu] ` = 1.5
574
574
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1
575
- - ` status.conditions[type==PodResizing ] `
575
+ - ` status.conditions[type==PodResizeInProgress ] `
576
576
- actual CPU shares = 1536
577
577
578
578
1 . kubelet syncs the pod, and sees resize #2 (cpu = 2)
@@ -582,7 +582,7 @@ This is intentionally hitting various edge-cases for demonstration.
582
582
- ` acknowledged[cpu] ` = 1.5
583
583
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1.5
584
584
- ` status.conditions[type==PodResizePending].type ` = ` "Deferred" `
585
- - ` status.conditions[type==PodResizing ] ` removed
585
+ - ` status.conditions[type==PodResizeInProgress ] ` removed
586
586
- actual CPU shares = 1536
587
587
588
588
1 . Resize #3 : cpu = 1.6
@@ -600,23 +600,23 @@ This is intentionally hitting various edge-cases for demonstration.
600
600
- ` acknowledged[cpu] ` = 1.5
601
601
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1.5
602
602
- ` status.conditions[type==PodResizePending] ` removed
603
- - ` status.conditions[type==PodResizing ] ` added
603
+ - ` status.conditions[type==PodResizeInProgress ] ` added
604
604
- actual CPU shares = 1536
605
605
606
606
1 . Container runtime applied cpu=1.6
607
607
- ` spec.containers[0].resources.requests[cpu] ` = 1.6
608
608
- ` status.containerStatuses[0].allocatedResources[cpu] ` = 1.6
609
609
- ` acknowledged[cpu] ` = 1.6
610
610
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1.5
611
- - ` status.conditions[type==PodResizing ] `
611
+ - ` status.conditions[type==PodResizeInProgress ] `
612
612
- actual CPU shares = 1638
613
613
614
614
1 . Kubelet syncs the pod
615
615
- ` spec.containers[0].resources.requests[cpu] ` = 1.6
616
616
- ` status.containerStatuses[0].allocatedResources[cpu] ` = 1.6
617
617
- ` acknowledged[cpu] ` = 1.6
618
618
- ` status.containerStatuses[0].resources.requests[cpu] ` = 1.6
619
- - ` status.conditions[type==PodResizing ] ` removed
619
+ - ` status.conditions[type==PodResizeInProgress ] ` removed
620
620
- actual CPU shares = 1638
621
621
622
622
1 . Resize #4 : cpu = 100
@@ -738,18 +738,18 @@ Impacts of a restart outside of resource configuration are out of scope.
738
738
1 . Updated pod is synced: Check if pod can be admitted
739
739
- No: add ` PodResizePending ` condition with type ` Deferred ` , no change to allocated resources
740
740
- Restart: redo admission check, still deferred.
741
- - Yes: add ` PodResizing ` condition, update allocated checkpoint
741
+ - Yes: add ` PodResizeInProgress ` condition, update allocated checkpoint
742
742
- Restart before update: readmit, then update allocated
743
743
- Restart after update: allocated != acknowledged --> proceed with resize
744
744
1 . Allocated != Acknowledged
745
745
- Trigger an ` UpdateContainerResources ` CRI call, then update Acknowledged resources on success
746
746
- Restart before CRI call: allocated != acknowledged, will still trigger the update call
747
747
- Restart after CRI call, before acknowledged update: will redo update call
748
748
- Restart after acknowledged update: allocated == acknowledged, condition removed
749
- - In all restart cases, ` LastTransitionTime ` is propagated from the old pod status ` PodResizing `
749
+ - In all restart cases, ` LastTransitionTime ` is propagated from the old pod status ` PodResizeInProgress `
750
750
condition, and remains unchanged.
751
751
1 . PLEG updates PodStatus cache, triggers pod sync
752
- - Pod status updated with actual resources, ` PodResizing ` condition removed
752
+ - Pod status updated with actual resources, ` PodResizeInProgress ` condition removed
753
753
- Desired == Allocated == Acknowledged, no resize changes needed.
754
754
755
755
#### Notes
0 commit comments