out of resource killing (memory)#21274
Conversation
837719b to
ccb9ce6
Compare
b80c763 to
8bb4fed
Compare
There was a problem hiding this comment.
recording a note here so when i get time to get back to this PR, but I will look to use kubelet.HandlePodDeletions
8bb4fed to
7bdf4bd
Compare
There was a problem hiding this comment.
Need to move this to use stats.PodStats
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/server/stats/summary.go#L185
7bdf4bd to
f5d3de7
Compare
c03d24e to
9715e29
Compare
173ad77 to
f482830
Compare
d307965 to
89b1a27
Compare
e9b2928 to
4a7a319
Compare
pkg/kubelet/eviction/helpers.go
Outdated
There was a problem hiding this comment.
What about usage of volumes?
There was a problem hiding this comment.
I will leave a // TODO for volume tracking, we can handle that in a follow-on when we finish up disk.
|
I added a few comments. Overall this PR LGTM. @derekwaynecarr Thanks for coming up with super readable code :) |
|
@vishh - updated code per your comments. /cc @kubernetes/rh-cluster-infra @kubernetes/sig-node - if anyone wants to take a pass at memory eviction. |
|
@derekwaynecarr I hope at-least one of the memory eviction PRs (ideally the PR that adds flags) has a |
|
@derekwaynecarr Next step is to add a node e2e to test all this logic. The test might need some changes to the framework - setting eviction flags. |
|
I have a follow on PR to enable the max pod eviction period and will have a release note for that PR that covers the feature. |
|
GCE e2e build/test passed for commit edc76f6. |
|
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
|
GCE e2e build/test passed for commit edc76f6. |
|
Automatic merge from submit-queue |
| type signalObservations map[Signal]resource.Quantity | ||
|
|
||
| // thresholdsObservedAt maps a threshold to a time that it was observed | ||
| type thresholdsObservedAt map[Threshold]time.Time |
There was a problem hiding this comment.
I think this is broken, because you're assuming that resource.Quantity contributes to the uniqueness of the the threshold. It does not, because it's a pointer to an inf.Dec, which is only compared on pointer equality, not actual equality.
If you are depending on uniqueness of Quantity to signal value, you'll need to change your map keys.
There was a problem hiding this comment.
Basically, map[Threshold1{Quantity: NewQuantity("1m")}] is not guaranteed to return the same value if you call it twice.
Adds the core framework for low-resource killing in the kubelet.
Implements support for out of memory killing.
Related:
#18724
This change is