@@ -46,8 +46,8 @@ type Manager interface {
46
46
// Returns the updated (or original) pod, and whether there was an allocation stored.
47
47
UpdatePodFromAllocation (pod * v1.Pod ) (* v1.Pod , bool )
48
48
49
- // SetPodAllocation checkpoints the resources allocated to a pod's containers.
50
- SetPodAllocation (allocatedPod * v1.Pod ) error
49
+ // SetAllocatedResources checkpoints the resources allocated to a pod's containers.
50
+ SetAllocatedResources (allocatedPod * v1.Pod ) error
51
51
52
52
// SetActuatedResources records the actuated resources of the given container (or the entire
53
53
// pod, if actuatedContainer is nil).
@@ -56,8 +56,8 @@ type Manager interface {
56
56
// GetActuatedResources returns the stored actuated resources for the container, and whether they exist.
57
57
GetActuatedResources (podUID types.UID , containerName string ) (v1.ResourceRequirements , bool )
58
58
59
- // DeletePod removes any stored state for the given pod UID.
60
- DeletePod (uid types.UID )
59
+ // RemovePod removes any stored state for the given pod UID.
60
+ RemovePod (uid types.UID )
61
61
62
62
// RemoveOrphanedPods removes the stored state for any pods not included in the set of remaining pods.
63
63
RemoveOrphanedPods (remainingPods sets.Set [types.UID ])
@@ -151,8 +151,8 @@ func updatePodFromAllocation(pod *v1.Pod, allocs state.PodResourceAllocation) (*
151
151
return pod , updated
152
152
}
153
153
154
- // SetPodAllocation checkpoints the resources allocated to a pod's containers
155
- func (m * manager ) SetPodAllocation (pod * v1.Pod ) error {
154
+ // SetAllocatedResources checkpoints the resources allocated to a pod's containers
155
+ func (m * manager ) SetAllocatedResources (pod * v1.Pod ) error {
156
156
return m .allocated .SetPodResourceAllocation (pod .UID , allocationFromPod (pod ))
157
157
}
158
158
@@ -175,7 +175,7 @@ func allocationFromPod(pod *v1.Pod) map[string]v1.ResourceRequirements {
175
175
return podAlloc
176
176
}
177
177
178
- func (m * manager ) DeletePod (uid types.UID ) {
178
+ func (m * manager ) RemovePod (uid types.UID ) {
179
179
if err := m .allocated .Delete (uid , "" ); err != nil {
180
180
// If the deletion fails, it will be retried by RemoveOrphanedPods, so we can safely ignore the error.
181
181
klog .V (3 ).ErrorS (err , "Failed to delete pod allocation" , "podUID" , uid )
0 commit comments