Skip to content

Commit be606bc

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request kubernetes#53447 from yastij/nodecontroller-clean-backwards-newNodecontroller
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. cleaning newNodeController from unsupported kubelet version **What this PR does / why we need it**: this part of the kubernetes#52356 effort **Which issue this PR fixes** : fixes # **Special notes for your reviewer**: **Release note**: ```release-note None ```
2 parents a20a6ca + 27d80eb commit be606bc

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

pkg/controller/node/node_controller.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ type Controller struct {
186186
cidrAllocator ipam.CIDRAllocator
187187
taintManager *scheduler.NoExecuteTaintManager
188188

189-
forcefullyDeletePod func(*v1.Pod) error
190189
nodeExistsInCloudProvider func(types.NodeName) (bool, error)
191190
computeZoneStateFunc func(nodeConditions []*v1.NodeCondition) (int, ZoneState)
192191
enterPartialDisruptionFunc func(nodeNum int) float32
@@ -285,9 +284,6 @@ func NewNodeController(
285284
serviceCIDR: serviceCIDR,
286285
allocateNodeCIDRs: allocateNodeCIDRs,
287286
allocatorType: allocatorType,
288-
forcefullyDeletePod: func(p *v1.Pod) error {
289-
return util.ForcefullyDeletePod(kubeClient, p)
290-
},
291287
nodeExistsInCloudProvider: func(nodeName types.NodeName) (bool, error) {
292288
return util.NodeExistsInCloudProvider(cloud, nodeName)
293289
},

pkg/controller/node/util/controller_utils.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,6 @@ func SetPodTerminationReason(kubeClient clientset.Interface, pod *v1.Pod, nodeNa
129129
return updatedPod, nil
130130
}
131131

132-
// ForcefullyDeletePod deletes the pod immediately.
133-
func ForcefullyDeletePod(c clientset.Interface, pod *v1.Pod) error {
134-
var zero int64
135-
glog.Infof("NodeController is force deleting Pod: %v:%v", pod.Namespace, pod.Name)
136-
err := c.Core().Pods(pod.Namespace).Delete(pod.Name, &metav1.DeleteOptions{GracePeriodSeconds: &zero})
137-
if err == nil {
138-
glog.V(4).Infof("forceful deletion of %s succeeded", pod.Name)
139-
}
140-
return err
141-
}
142-
143132
// ForcefullyDeleteNode deletes the node immediately. The pods on the
144133
// node are cleaned up by the podGC.
145134
func ForcefullyDeleteNode(kubeClient clientset.Interface, nodeName string) error {

0 commit comments

Comments
 (0)