@@ -247,7 +247,7 @@ var EphemeralContainersStrategy = podEphemeralContainersStrategy{Strategy}
247
247
248
248
// dropNonEphemeralContainerUpdates discards all changes except for pod.Spec.EphemeralContainers and certain metadata
249
249
func dropNonEphemeralContainerUpdates (newPod , oldPod * api.Pod ) * api.Pod {
250
- pod := mungePod (newPod , oldPod )
250
+ pod := dropPodUpdates (newPod , oldPod )
251
251
pod .Spec .EphemeralContainers = newPod .Spec .EphemeralContainers
252
252
return pod
253
253
}
@@ -282,7 +282,7 @@ var ResizeStrategy = podResizeStrategy{Strategy}
282
282
283
283
// dropNonPodResizeUpdates discards all changes except for pod.Spec.Containers[*].Resources,ResizePolicy and certain metadata
284
284
func dropNonPodResizeUpdates (newPod , oldPod * api.Pod ) * api.Pod {
285
- pod := mungePod (newPod , oldPod )
285
+ pod := dropPodUpdates (newPod , oldPod )
286
286
287
287
oldCtrToIndex := make (map [string ]int )
288
288
for idx , ctr := range pod .Spec .Containers {
@@ -321,8 +321,8 @@ func (podResizeStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.
321
321
return nil
322
322
}
323
323
324
- // mungePod mutates metadata information of old pod with the new pod.
325
- func mungePod (newPod , oldPod * api.Pod ) * api.Pod {
324
+ // dropPodUpdates drops any changes in the pod.
325
+ func dropPodUpdates (newPod , oldPod * api.Pod ) * api.Pod {
326
326
pod := oldPod .DeepCopy ()
327
327
pod .Name = newPod .Name
328
328
pod .Namespace = newPod .Namespace
0 commit comments