-
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
LimitRange updates for Resource Requirements Requests #12492
Conversation
Think I have a logic error in the admission plug-in where I am only checking that Request < Max, and not also Limit < Max (if specified). Will poke the PR again when I make that update. |
GCE e2e build/test passed for commit 28e27ea7a3a49d5b509e4472e3bd5c00fca789d6. |
// DefaultRequests resource requests on this kind by resource name | ||
DefaultRequests ResourceList `json:"defaultRequests,omitempty" description:"default resource requests values on this kind by resource name if omitted"` | ||
// DefaultRequest resource requests on this kind by resource name | ||
DefaultRequest ResourceList `json:"defaultRequest,omitempty" description:"default resource requests values on this kind by resource name if omitted"` |
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 change the name? defaultRequests is somewhat more consistent.
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.
At the time, it bothered me that we were not consistent with the rest of the object.
For example, I thought if we have DefaultRequests, we should also have Defaults.
Since we have Default now, I thought DefaultRequest made sense.
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.
Technically, Defaults should be DefaultLimits, or Defaults should be of type ResourceRequirements.
DefaultRequest is fine.
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 agree on DefaultLimits, but did not want to make that change until v2
API.
On Wednesday, August 12, 2015, Brian Grant notifications@github.com wrote:
In docs/design/admission_control_limit_range.md
#12492 (comment)
:@@ -73,8 +73,8 @@ type LimitRangeItem struct {
Min ResourceListjson:"min,omitempty" description:"min usage constraints on this kind by resource name"
// Default resource limits on this kind by resource name
Default ResourceListjson:"default,omitempty" description:"default resource limits values on this kind by resource name if omitted"
- // DefaultRequests resource requests on this kind by resource name
- DefaultRequests ResourceList
json:"defaultRequests,omitempty" description:"default resource requests values on this kind by resource name if omitted"
- // DefaultRequest resource requests on this kind by resource name
- DefaultRequest ResourceList
json:"defaultRequest,omitempty" description:"default resource requests values on this kind by resource name if omitted"
Technically, Defaults should be DefaultLimits, or Defaults should be of
type ResourceRequirements.DefaultRequest is fine.
—
Reply to this email directly or view it on GitHub
https://github.com/kubernetes/kubernetes/pull/12492/files#r36936897.
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.
Is there a doc to track v2 changes yet? I think Defaults as type
ResourceRequirements makes the most sense at that time.
On Wednesday, August 12, 2015, Derek Carr decarr@redhat.com wrote:
I agree on DefaultLimits, but did not want to make that change until v2
API.On Wednesday, August 12, 2015, Brian Grant <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:In docs/design/admission_control_limit_range.md
#12492 (comment)
:@@ -73,8 +73,8 @@ type LimitRangeItem struct {
Min ResourceListjson:"min,omitempty" description:"min usage constraints on this kind by resource name"
// Default resource limits on this kind by resource name
Default ResourceListjson:"default,omitempty" description:"default resource limits values on this kind by resource name if omitted"
- // DefaultRequests resource requests on this kind by resource name
- DefaultRequests ResourceList
json:"defaultRequests,omitempty" description:"default resource requests values on this kind by resource name if omitted"
- // DefaultRequest resource requests on this kind by resource name
- DefaultRequest ResourceList
json:"defaultRequest,omitempty" description:"default resource requests values on this kind by resource name if omitted"
Technically, Defaults should be DefaultLimits, or Defaults should be of
type ResourceRequirements.DefaultRequest is fine.
—
Reply to this email directly or view it on GitHub
https://github.com/kubernetes/kubernetes/pull/12492/files#r36936897.
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.
Agreed that it must be v2. #8190 is the umbrella issue.
I'm not going to fork any v2 APIs until API groups are ready.
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.
s/if omitted/if resource request is omitted/
For LimitRequestRatio comment on next line it is clearer if you say "LimitRequestRatio is the maximum allows ratio of limit over request, representing the maximum burst for the named resource" or something like that. As-is, it's confusing.
@davidopp PTAL. |
28e27ea
to
3141afd
Compare
This should be good to review now. It took me a fair bit longer than I expected to test this, but I think the unit tests are much stronger now. |
GCE e2e build/test passed for commit 3141afd9f7f3fcfb48fe32c1ab7dfcd87c104ddd. |
@davidopp a friendly poke. Would like to get this in before I head out for vacation next week. |
}, | ||
"defaultRequest": { | ||
"type": "any", | ||
"description": "default resource requests values on this kind by resource name if omitted" |
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 saw your discussion with @bgrant0607 later about not changing Default to DefaultLimit, but can you at least update the description of "default" above to "default resource limit values on this kind..." ? Or is that considered an API change?
3141afd
to
a9cab81
Compare
@davidopp - rebased, and made the requested review changes now that I am back from vacation.
Hope it all looks good to you now. |
GCE e2e build/test failed for commit a9cab815c064c8c62ce28d719261e1c7be1b7e6e. |
a9cab81
to
9da3d04
Compare
9da3d04
to
78982b7
Compare
78982b7
to
d250822
Compare
Kicking shippable as it appeared to flake on go 1.3. |
GCE e2e build/test failed for commit 9da3d0494fc05c8730a2edcde25099bcc4ca22a2. |
GCE e2e build/test passed for commit 78982b755e7b9a25f01662399d1dbeafb5700c55. |
GCE e2e build/test failed for commit d250822. |
@k8s-bot test this please |
GCE e2e build/test passed for commit d250822. |
@davidopp - friendly poke on this PR so i can proceed on the ResourceQuota updates after. |
Will look at it shortly. |
Sorry, still flogging my email into submission. The API change LGTM, thanks. |
Feel free to poke me on IRC, btw, though I won't be available much of tomorrow. |
I am looking at this now. |
LGTM |
LimitRange updates for Resource Requirements Requests
LimitRange updates for Resource Requirements Requests
LimitRange updates for Resource Requirements Requests
@bgrant0607 - take a look when you get a chance.
I will add support for LimitRequestRatio enforcement in a follow-on PR.