Skip to content

Commit 2091f02

Browse files
committed
Rename Acknowledged resources to Actuated to match implementation
1 parent 6dae73e commit 2091f02

File tree

1 file changed

+28
-28
lines changed
  • keps/sig-node/1287-in-place-update-pod-resources

1 file changed

+28
-28
lines changed

keps/sig-node/1287-in-place-update-pod-resources/README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ will always be `True` when the condition is present - if there is no longer a pe
314314
(either the resize was allocated or reverted), the condition will be removed.
315315

316316
**PodResizeInProgress** will track in-progress resizes, and should be present whenever allocated resources
317-
!= acknowledged resources (see [Resource States](#resource-states)). For successful synchronous
317+
!= actuated resources (see [Resource States](#resource-states)). For successful synchronous
318318
resizes, this condition should be short lived, and `reason` and `message` will be left blank. If an
319319
error occurs while actuating the resize, the `reason` will be set to `Error`, and `message` will be
320320
populated with the error message. In the future, this condition will also be used for long-running
@@ -419,7 +419,7 @@ The Kubelet now tracks 4 sets of resources for each pod/container:
419419
- Reported in the API through the `.status.containerStatuses[i].allocatedResources` field
420420
(allocated requests only)
421421
- Persisted locally on the node (requests + limits) in a checkpoint file
422-
3. Acknowledged resources
422+
3. Actuated resources
423423
- The resource configuration that the Kubelet passed to the runtime to actuate
424424
- Not reported in the API
425425
- Persisted locally on the node in a checkpoint file
@@ -433,7 +433,7 @@ The Kubelet now tracks 4 sets of resources for each pod/container:
433433
Changes are always propogated through these 4 resource states in order:
434434

435435
```
436-
Desired --> Allocated --> Acknowledged --> Actual
436+
Desired --> Allocated --> Actuated --> Actual
437437
```
438438

439439

@@ -513,7 +513,7 @@ This is intentionally hitting various edge-cases for demonstration.
513513
1. kubelet runs the pod and updates the API
514514
- `spec.containers[0].resources.requests[cpu]` = 1
515515
- `status.containerStatuses[0].allocatedResources[cpu]` = 1
516-
- `acknowledged[cpu]` = 1
516+
- `actuated[cpu]` = 1
517517
- `status.containerStatuses[0].resources.requests[cpu]` = 1
518518
- actual CPU shares = 1024
519519

@@ -522,23 +522,23 @@ This is intentionally hitting various edge-cases for demonstration.
522522
`requests`, ResourceQuota not exceeded, etc) and accepts the operation
523523
- `spec.containers[0].resources.requests[cpu]` = 1.5
524524
- `status.containerStatuses[0].allocatedResources[cpu]` = 1
525-
- `acknowledged[cpu]` = 1
525+
- `actuated[cpu]` = 1
526526
- `status.containerStatuses[0].resources.requests[cpu]` = 1
527527
- actual CPU shares = 1024
528528

529529
1. Kubelet Restarts!
530-
- The allocated & acknowledged resources are read back from checkpoint
530+
- The allocated & actuated resources are read back from checkpoint
531531
- Pods are resynced from the API server, but admitted based on the allocated resources
532532
- `spec.containers[0].resources.requests[cpu]` = 1.5
533533
- `status.containerStatuses[0].allocatedResources[cpu]` = 1
534-
- `acknowledged[cpu]` = 1
534+
- `actuated[cpu]` = 1
535535
- `status.containerStatuses[0].resources.requests[cpu]` = 1
536536
- actual CPU shares = 1024
537537

538538
1. Kubelet syncs the pod, sees resize #1 and admits it
539539
- `spec.containers[0].resources.requests[cpu]` = 1.5
540540
- `status.containerStatuses[0].allocatedResources[cpu]` = 1.5
541-
- `acknowledged[cpu]` = 1
541+
- `actuated[cpu]` = 1
542542
- `status.containerStatuses[0].resources.requests[cpu]` = 1
543543
- `status.conditions[type==PodResizeInProgress]` added
544544
- actual CPU shares = 1024
@@ -554,7 +554,7 @@ This is intentionally hitting various edge-cases for demonstration.
554554
1. Container runtime applied cpu=1.5
555555
- `spec.containers[0].resources.requests[cpu]` = 2
556556
- `status.containerStatuses[0].allocatedResources[cpu]` = 1.5
557-
- `acknowledged[cpu]` = 1.5
557+
- `actuated[cpu]` = 1.5
558558
- `status.containerStatuses[0].resources.requests[cpu]` = 1
559559
- `status.conditions[type==PodResizeInProgress]`
560560
- actual CPU shares = 1536
@@ -563,7 +563,7 @@ This is intentionally hitting various edge-cases for demonstration.
563563
- kubelet decides this is feasible, but currently insufficient available resources
564564
- `spec.containers[0].resources.requests[cpu]` = 2
565565
- `status.containerStatuses[0].allocatedResources[cpu]` = 1.5
566-
- `acknowledged[cpu]` = 1.5
566+
- `actuated[cpu]` = 1.5
567567
- `status.containerStatuses[0].resources.requests[cpu]` = 1.5
568568
- `status.conditions[type==PodResizePending].type` = `"Deferred"`
569569
- `status.conditions[type==PodResizeInProgress]` removed
@@ -573,15 +573,15 @@ This is intentionally hitting various edge-cases for demonstration.
573573
- apiserver validates the request and accepts the operation
574574
- `spec.containers[0].resources.requests[cpu]` = 1.6
575575
- `status.containerStatuses[0].allocatedResources[cpu]` = 1.5
576-
- `acknowledged[cpu]` = 1.5
576+
- `actuated[cpu]` = 1.5
577577
- `status.containerStatuses[0].resources.requests[cpu]` = 1.5
578578
- `status.conditions[type==PodResizePending].type` = `"Deferred"`
579579
- actual CPU shares = 1536
580580

581581
1. Kubelet syncs the pod, and sees resize #3 and admits it
582582
- `spec.containers[0].resources.requests[cpu]` = 1.6
583583
- `status.containerStatuses[0].allocatedResources[cpu]` = 1.6
584-
- `acknowledged[cpu]` = 1.5
584+
- `actuated[cpu]` = 1.5
585585
- `status.containerStatuses[0].resources.requests[cpu]` = 1.5
586586
- `status.conditions[type==PodResizePending]` removed
587587
- `status.conditions[type==PodResizeInProgress]` added
@@ -590,15 +590,15 @@ This is intentionally hitting various edge-cases for demonstration.
590590
1. Container runtime applied cpu=1.6
591591
- `spec.containers[0].resources.requests[cpu]` = 1.6
592592
- `status.containerStatuses[0].allocatedResources[cpu]` = 1.6
593-
- `acknowledged[cpu]` = 1.6
593+
- `actuated[cpu]` = 1.6
594594
- `status.containerStatuses[0].resources.requests[cpu]` = 1.5
595595
- `status.conditions[type==PodResizeInProgress]`
596596
- actual CPU shares = 1638
597597

598598
1. Kubelet syncs the pod
599599
- `spec.containers[0].resources.requests[cpu]` = 1.6
600600
- `status.containerStatuses[0].allocatedResources[cpu]` = 1.6
601-
- `acknowledged[cpu]` = 1.6
601+
- `actuated[cpu]` = 1.6
602602
- `status.containerStatuses[0].resources.requests[cpu]` = 1.6
603603
- `status.conditions[type==PodResizeInProgress]` removed
604604
- actual CPU shares = 1638
@@ -607,15 +607,15 @@ This is intentionally hitting various edge-cases for demonstration.
607607
- apiserver validates the request and accepts the operation
608608
- `spec.containers[0].resources.requests[cpu]` = 100
609609
- `status.containerStatuses[0].allocatedResources[cpu]` = 1.6
610-
- `acknowledged[cpu]` = 1.6
610+
- `actuated[cpu]` = 1.6
611611
- `status.containerStatuses[0].resources.requests[cpu]` = 1.6
612612
- actual CPU shares = 1638
613613

614614
1. Kubelet syncs the pod, and sees resize #4
615615
- this node does not have 100 CPUs, so kubelet cannot admit it
616616
- `spec.containers[0].resources.requests[cpu]` = 100
617617
- `status.containerStatuses[0].allocatedResources[cpu]` = 1.6
618-
- `acknowledged[cpu]` = 1.6
618+
- `actuated[cpu]` = 1.6
619619
- `status.containerStatuses[0].resources.requests[cpu]` = 1.6
620620
- `status.conditions[type==PodResizePending].type` = `"Infeasible"`
621621
- actual CPU shares = 1638
@@ -708,7 +708,7 @@ Impacts of a restart outside of resource configuration are out of scope.
708708
- Restart before checkpointing: pod goes through admission again as if new
709709
- Restart after checkpointing: pod goes through admission using the allocated resources
710710
1. Kubelet creates a container
711-
- Resources acknowledged after CreateContainer call succeeds
711+
- Resources actuated after CreateContainer call succeeds
712712
- Restart before acknowledgement: Kubelet issues a superfluous UpdatePodResources request
713713
- Restart after acknowledgement: No resize needed
714714
1. Container starts, triggering a pod sync event
@@ -724,17 +724,17 @@ Impacts of a restart outside of resource configuration are out of scope.
724724
- Restart: redo admission check, still deferred.
725725
- Yes: add `PodResizeInProgress` condition, update allocated checkpoint
726726
- Restart before update: readmit, then update allocated
727-
- Restart after update: allocated != acknowledged --> proceed with resize
728-
1. Allocated != Acknowledged
729-
- Trigger an `UpdateContainerResources` CRI call, then update Acknowledged resources on success
730-
- Restart before CRI call: allocated != acknowledged, will still trigger the update call
731-
- Restart after CRI call, before acknowledged update: will redo update call
732-
- Restart after acknowledged update: allocated == acknowledged, condition removed
727+
- Restart after update: allocated != actuated --> proceed with resize
728+
1. Allocated != Actuated
729+
- Trigger an `UpdateContainerResources` CRI call, then update Actuated resources on success
730+
- Restart before CRI call: allocated != actuated, will still trigger the update call
731+
- Restart after CRI call, before actuated update: will redo update call
732+
- Restart after actuated update: allocated == actuated, condition removed
733733
- In all restart cases, `LastTransitionTime` is propagated from the old pod status `PodResizeInProgress`
734734
condition, and remains unchanged.
735735
1. PLEG updates PodStatus cache, triggers pod sync
736736
- Pod status updated with actual resources, `PodResizeInProgress` condition removed
737-
- Desired == Allocated == Acknowledged, no resize changes needed.
737+
- Desired == Allocated == Actuated, no resize changes needed.
738738

739739
#### Notes
740740

@@ -794,10 +794,10 @@ a pod or container. Examples include:
794794
Therefore the Kubelet cannot reliably compare desired & actual resources to know whether to trigger
795795
a resize (a level-triggered approach).
796796

797-
To accommodate this, the Kubelet stores the set of "acknowledged" resources per container.
798-
Acknowledged resources represent the resource configuration that was passed to the runtime (either
797+
To accommodate this, the Kubelet stores the set of "actuated" resources per container.
798+
Actuated resources represent the resource configuration that was passed to the runtime (either
799799
via a CreateContainer or UpdateContainerResources call) and received a successful response. The
800-
acknowledged resources are checkpointed alongside the allocated resources to persist across
800+
actuated resources are checkpointed alongside the allocated resources to persist across
801801
restarts. There is the possibility that a poorly timed restart could lead to a resize request being
802802
repeated, so `UpdateContainerResources` must be idempotent.
803803

@@ -1538,7 +1538,7 @@ _This section must be completed when targeting beta graduation to a release._
15381538
- Rename ResizeRestartPolicy `NotRequired` to `PreferNoRestart`,
15391539
and update CRI `UpdateContainerResources` contract
15401540
- Add back `AllocatedResources` field to resolve a scheduler corner case
1541-
- Introduce Acknowledged resources for actuation
1541+
- Introduce Actuated resources for actuation
15421542

15431543
## Drawbacks
15441544

0 commit comments

Comments
 (0)