-
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
Validate minimum CPU limits to be >= 10m #23143
Conversation
@k8s-bot test node e2e experimental |
Labelling this PR as size/M |
@vishh Not sure if you are allowing users to modify the period as it needs the same check, too. |
GCE e2e build/test passed for commit 1baa3cd136db5c5e8fa375d2d5cf3bc98cf41870. |
@@ -2346,6 +2356,7 @@ func ValidateResourceRequirements(requirements *api.ResourceRequirements, fldPat | |||
if api.IsStandardResourceName(string(resourceName)) { | |||
allErrs = append(allErrs, validateBasicResource(quantity, fldPath.Key(string(resourceName)))...) | |||
} | |||
allErrs = append(allErrs, validateContainerResourceLimits(string(resourceName), quantity, fldPath)...) |
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 don't think this is right.
I agree we should check that you can't have a quota on limits.cpu that is < 10m, but this is not that...
I also think we should check in LimitRange validation that max[cpu] and default[cpu] cannot be < 10m.
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.
@derekwaynecarr: Are you suggesting disabling quota if limits < 10m?
I can add validation to limit ranges in this PR. Good point.
@mrunalp the period is fixed. |
@derekwaynecarr Ack. The only thing that we really need to ensure is that neither are set to less than 1000 as final values. |
backwards compat. 2. Update documentation to reflect minimum CPU limits. Signed-off-by: Vishnu kannan <vishnuk@google.com>
Labelling this PR as size/S |
@derekwaynecarr: Chatted with @bgrant0607 offline. He suggested skipping the validation part since it is not worth the pain that validation will bring in - existing RCs might fail to work. The values we are dealing with is practically so small that just defaulting at the node is good enough. PTAL.! |
GCE e2e build/test passed for commit 5165590. |
@k8s-bot test node e2e experimental |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 5165590. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 5165590. |
Automatic merge from submit-queue |
Auto commit by PR queue bot
This is LGTM to me as well On Thursday, March 17, 2016, k8s-merge-robot notifications@github.com
|
Auto commit by PR queue bot (cherry picked from commit 78adb88)
Commit a428e51 found in the "release-1.2" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this s an error find help to get your PR picked. |
Auto commit by PR queue bot (cherry picked from commit 78adb88)
Auto commit by PR queue bot (cherry picked from commit 78adb88)
Auto commit by PR queue bot (cherry picked from commit 78adb88)
Auto commit by PR queue bot (cherry picked from commit 78adb88)
backwards compat.
Fixes #23113
cc @bgrant0607