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
Adapt pod killing and cleanup for generic container runtime #7525
Conversation
To avoid inspecting individual containers, I had to use |
LGTM. Nice! We take out a bunch of code and end up with something more generic :) I agree that the performance impact is probably minimal since this is only a single extra call per sync loop. If anything, with time this operation will become async too. |
// in the cache. We need to bypass the cach to get the latest set of | ||
// running pods to clean up the volumes. | ||
// TODO: Evaluate the performance impact of bypassing the runtime cache. | ||
runningPods, err = kl.containerManager.GetPods(true) |
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.
Why we pass true
here? I remember true
is for getting all pods including dead ones?
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.
Good catch. I meant to say false...Thanks!
Great! This is what I want to do! Thanks @yujuhong ! |
4be6521
to
07116a3
Compare
This change removes docker-specifc code in killUnwantedPods. It also instructs the cleanup code to move away from interacting with containers directly. They should always deal with the pod-level abstraction if at all possible.
07116a3
to
d81ecc5
Compare
Rebased. Thanks! |
LGTM |
Adapt pod killing and cleanup for generic container runtime
This change removes docker-specifc code in killUnwantedPods. It
also instructs the cleanup code to move away from interacting with
containers directly. They should always deal with the pod-level
abstraction if at all possible.