-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Changing scheduling part to manage one single local storage resource #50819
Changing scheduling part to manage one single local storage resource #50819
Conversation
ef00f47
to
977804c
Compare
@kubernetes/sig-scheduling-pr-reviews |
977804c
to
13408f3
Compare
21b6992
to
67bafeb
Compare
/retest |
pod: newResourcePod(schedulercache.Resource{MilliCPU: 1, Memory: 1, StorageOverlay: 10}), | ||
emptyDirLimit: 15, | ||
storageMedium: v1.StorageMediumDefault, | ||
pod: newResourcePod(schedulercache.Resource{EphemeralStorage: 25}), |
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 remove some of the tests?
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.
we manage a single resource, overlay and emptydir are not considered by predacates now, so remove them.
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.
I think you can still keep most of the tests with some modification. Just change overlay to ephemeralstorage with some modification. This could also help us verify the changes related to emptyDir.
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.
I have already changed overlay to ephemeral storage ,about the test case storage ephemeral local storage request exceeds allocatable
I added a fit test case about ephemeral storage, ptal, thanks
67bafeb
to
761a455
Compare
cc @dashpole |
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
761a455
to
c95ecbc
Compare
/retest |
/lgtm |
/assign @timothysc |
ping @timothysc for approval |
So this needs sign off from someone from @kubernetes/sig-storage-pr-reviews and @kubernetes/sig-node-pr-reviews to +1 that this is how they plan to reference and manage now, unless there is a spec that outlines these details. |
/approve |
So you are outright removing scratch in favor ephemeral. I'm ok with it so long as it's spelled out in a feature somewhere. But typical policy is to support both for 1 release cycle. Also what do you do in the case of a 1/2 upgrade. |
local isolation is alpha feature introduced in 1.7 |
Could you please update your release note to include that you are removing alpha behavior in favor of the new mechanism? /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: NickrenREN, jingxu97, timothysc Associated issue: 50818 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue (batch tested with PRs 51235, 50819, 51274, 50972, 50504) |
// If the storage medium is memory, should exclude the size | ||
for _, vol := range pod.Spec.Volumes { | ||
if vol.EmptyDir != nil && vol.EmptyDir.Medium != v1.StorageMediumMemory { | ||
result.StorageScratch += vol.EmptyDir.SizeLimit.Value() |
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.
does this mean the SizeLimit field is getting dropped?
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.
No, one single local ephemeral storage can be set in container's resources,
containers:
- name: fooa
resources:
requests:
ephemeral-storage: “10Gi”
limits:
ephemeral-storage: “10Gi”
predicate functions take that into account and do not consider Emptydir any more.
btw: EmptyDir's sizelimit will be used by eviction manager
What this PR does / why we need it:
Finally decided to manage a single local storage resource
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): part of #50818Special notes for your reviewer:
Since finally decided to manage a single local storage resource, remove overlay related code in scheduling part and change the name scratch to ephemeral storage.
Release note:
/assign @jingxu97
cc @ddysher