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

LimitRange updates for Resource Requirements Requests #12492

Merged
merged 6 commits into from
Aug 26, 2015

Conversation

derekwaynecarr
Copy link
Member

@bgrant0607 - take a look when you get a chance.

I will add support for LimitRequestRatio enforcement in a follow-on PR.

@derekwaynecarr derekwaynecarr changed the title LimitRange updates for Resource Requirements Requests WIP: LimitRange updates for Resource Requirements Requests Aug 10, 2015
@derekwaynecarr
Copy link
Member Author

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.

@k8s-bot
Copy link

k8s-bot commented Aug 10, 2015

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"`
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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 ResourceList json:"min,omitempty" description:"min usage constraints on this kind by resource name"
// Default resource limits on this kind by resource name
Default ResourceList json:"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.

Copy link
Member Author

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 ResourceList json:"min,omitempty" description:"min usage constraints on this kind by resource name"
// Default resource limits on this kind by resource name
Default ResourceList json:"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.

Copy link
Member

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.

Copy link
Member

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.

@bgrant0607 bgrant0607 assigned davidopp and unassigned bgrant0607 Aug 11, 2015
@bgrant0607
Copy link
Member

@davidopp PTAL.

@derekwaynecarr
Copy link
Member Author

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.

@k8s-bot
Copy link

k8s-bot commented Aug 11, 2015

GCE e2e build/test passed for commit 3141afd9f7f3fcfb48fe32c1ab7dfcd87c104ddd.

@derekwaynecarr derekwaynecarr changed the title WIP: LimitRange updates for Resource Requirements Requests LimitRange updates for Resource Requirements Requests Aug 12, 2015
@derekwaynecarr
Copy link
Member Author

@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"
Copy link
Member

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?

@derekwaynecarr
Copy link
Member Author

@davidopp - rebased, and made the requested review changes now that I am back from vacation.

  1. Modified LimitRequestRatio to be MaxLimitRequestRatio per your comment. @bgrant0607 - assume you are in agreement with @davidopp on that change request.
  2. Updated the swagger descriptions for improved clarity.

Hope it all looks good to you now.

@k8s-bot
Copy link

k8s-bot commented Aug 24, 2015

GCE e2e build/test failed for commit a9cab815c064c8c62ce28d719261e1c7be1b7e6e.

@derekwaynecarr
Copy link
Member Author

Kicking shippable as it appeared to flake on go 1.3.

@k8s-bot
Copy link

k8s-bot commented Aug 24, 2015

GCE e2e build/test failed for commit 9da3d0494fc05c8730a2edcde25099bcc4ca22a2.

@k8s-bot
Copy link

k8s-bot commented Aug 24, 2015

GCE e2e build/test passed for commit 78982b755e7b9a25f01662399d1dbeafb5700c55.

@k8s-bot
Copy link

k8s-bot commented Aug 24, 2015

GCE e2e build/test failed for commit d250822.

@derekwaynecarr
Copy link
Member Author

@k8s-bot test this please

@k8s-bot
Copy link

k8s-bot commented Aug 25, 2015

GCE e2e build/test passed for commit d250822.

@derekwaynecarr
Copy link
Member Author

@davidopp - friendly poke on this PR so i can proceed on the ResourceQuota updates after.

@davidopp
Copy link
Member

Will look at it shortly.

@bgrant0607
Copy link
Member

Sorry, still flogging my email into submission. The API change LGTM, thanks.

@bgrant0607
Copy link
Member

Feel free to poke me on IRC, btw, though I won't be available much of tomorrow.

@davidopp
Copy link
Member

I am looking at this now.

@davidopp
Copy link
Member

LGTM

@davidopp davidopp added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 26, 2015
yujuhong added a commit that referenced this pull request Aug 26, 2015
LimitRange updates for Resource Requirements Requests
@yujuhong yujuhong merged commit 1bae2b6 into kubernetes:master Aug 26, 2015
xingzhou pushed a commit to xingzhou/kubernetes that referenced this pull request Dec 15, 2016
LimitRange updates for Resource Requirements Requests
xingzhou pushed a commit to xingzhou/kubernetes that referenced this pull request Dec 15, 2016
LimitRange updates for Resource Requirements Requests
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants