-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Admission Control: Resource Quota #3796
Changes from all commits
829fa69
67b359e
4887d71
9674f08
0ff20c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"id": "quota", | ||
"kind": "ResourceQuota", | ||
"apiVersion": "v1beta1", | ||
"spec": { | ||
"hard": { | ||
"memory": "1073741824", | ||
"cpu": "20", | ||
"pods": "10", | ||
"services": "5", | ||
"replicationcontrollers":"20", | ||
"resourcequotas":"1", | ||
}, | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,13 @@ var Semantic = conversion.EqualitiesOrDie( | |
}, | ||
) | ||
|
||
var standardResources = util.NewStringSet(string(ResourceMemory), string(ResourceCPU)) | ||
var standardResources = util.NewStringSet( | ||
string(ResourceMemory), | ||
string(ResourceCPU), | ||
string(ResourcePods), | ||
string(ResourceQuotas), | ||
string(ResourceServices), | ||
string(ResourceReplicationControllers)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about ResouceResourceQuotas? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's there already. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, it's not named as in your comment. Will update. |
||
|
||
func IsStandardResourceName(str string) bool { | ||
return standardResources.Has(str) | ||
|
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.
@vishh These new resources are going to be official kubernetes resources, and are valid in a ResourceList in the context of a ResourceQuota, but they aren't valid in the context of a Pod's or Container's limit. Does that matter? I can't tell your intent because ValidateResourceName isn't used yet AFAICS.