-
Notifications
You must be signed in to change notification settings - Fork 40.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete only unscheduled pods in DaemonSetController if node doesn't exist anymore #76060
Conversation
/sig apps |
/assign @k82cn |
/cc @k82cn |
/cc mikedanese |
@@ -1537,7 +1538,9 @@ func getPodsWithoutNode(runningNodesList []*v1.Node, nodeToDaemonPods map[string | |||
for n, pods := range nodeToDaemonPods { | |||
if !isNodeRunning[n] { | |||
for _, pod := range pods { | |||
results = append(results, pod.Name) | |||
if len(pod.Spec.NodeName) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall; personally, I'd like to add a comment on the scenario that DaemonSet-Controller will delete Pod without NodeName, and PodGC will delete pod has NodeName.
/approve |
/priority important-soon |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: k82cn, krzysztof-jastrzebski The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
…-pick-of-#76060-upstream-release-1.14 Automated cherry pick of #76060: Delete only unscheduled pods if node doesn't exist anymore.
…-pick-of-#76060-upstream-release-1.12 Automated cherry pick of #76060: Delete only unscheduled pods if node doesn't exist anymore.
…-pick-of-#76060-upstream-release-1.13 Automated cherry pick of #76060: Delete only unscheduled pods if node doesn't exist anymore.
What type of PR is this?
/kind bug
What this PR does / why we need it:
PR fixes bug introduced in #73401. Behaviour is changed so DaemonSetController deletes pods for non-existing nodes only if PodGCController can't remove them (pods that haven't been scheduled before node was deleted). Previously DaemonSetController stop processing DaemonSet for 5 minutes after node removal, see #75836.
Which issue(s) this PR fixes:
Fixes #75836
Does this PR introduce a user-facing change?: