Skip to content
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

[GarbageCollector] Let kubectl delete rc and rs with DeleteOptions.OrphanDependents=false #30461

Merged
merged 1 commit into from
Aug 12, 2016

Conversation

caesarxuchao
Copy link
Member

@caesarxuchao caesarxuchao commented Aug 11, 2016

so that when the garbage collector is enabled, RC and RS are deleted immediately without waiting for the garbage collector to orphan the pods.

There is no user visible changes, so we don't need a release note.

cc @fabioy


This change is Reviewable

@caesarxuchao caesarxuchao added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Aug 11, 2016
@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-label-needed labels Aug 11, 2016
@k8s-bot
Copy link

k8s-bot commented Aug 11, 2016

GCE e2e build/test passed for commit bcc1b68.

@lavalamp
Copy link
Member

Is the reaper going to properly handle 404's? It's going to race with the garbage collector to delete all of the pods now, right?

@caesarxuchao
Copy link
Member Author

caesarxuchao commented Aug 11, 2016

Reaper uses the scaler, which updates the rc.spec.replicas to 0, rc manager will deletes the pods.

kubectl waits until all the pods are gone, then it sends the delete request for the RC. Garbage collector may still have the pods in its local cache and will try to delete them, it ignores the 404. So there is no race.

@lavalamp lavalamp added release-note-none Denotes a PR that doesn't merit a release note. lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed release-note-label-needed labels Aug 11, 2016
@lavalamp
Copy link
Member

OK, that sounds good. I guess the next step is to just get rid of the reaper, or to have it check the cluster version before running? We can turn that on in the future though.

@lavalamp
Copy link
Member

LGTM

@caesarxuchao
Copy link
Member Author

I guess the next step is to just get rid of the reaper, or to have it check the cluster version before running? We can turn that on in the future though.

Yes. We also need to implement the waitForGCDone DeleteOption before moving kubectl to use GC.

@janetkuo
Copy link
Member

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Aug 12, 2016

GCE e2e build/test passed for commit bcc1b68.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 5c1e157 into kubernetes:master Aug 12, 2016
@caesarxuchao caesarxuchao changed the title Let kubectl delete rc and rs with DeleteOptions.OrphanDependents=false [GarbageCollector] Let kubectl delete rc and rs with DeleteOptions.OrphanDependents=false Aug 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants