"description":"Default usage constraints on this kind by resource name. Default values on this kind by resource name if omitted."
"description":"Default resource requirement limit value by resource name if resource limit is omitted."
},
"defaultRequest":{
"type":"any",
"description":"DefaultRequest is the default resource requirement request value by resource name if resource request is omitted."
},
"maxLimitRequestRatio":{
"type":"any",
"description":"MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource."
// LimitRequestRatio is the ratio of limit over request that is the maximum allowed burst for the named resource
// MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
LimitRequestRatioResourceList`json:"limitRequestRatio,omitempty" description:"the ratio of limit over request that is the maximum allowed burst for the named resource. if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value"`
// LimitRangeSpec defines a min/max usage limit for resources that match on kind
// LimitRangeSpec defines a min/max usage limit for resources that match on kind.
typeLimitRangeSpecstruct{
typeLimitRangeSpecstruct{
// Limits is the list of LimitRangeItem objects that are enforced
// Limits is the list of LimitRangeItem objects that are enforced.
Limits[]LimitRangeItem`json:"limits" description:"limits is the list of LimitRangeItem objects that are enforced"`
Limits[]LimitRangeItem`json:"limits"`
}
}
// LimitRange sets resource usage limits for each kind of resource in a Namespace
// LimitRange sets resource usage limits for each kind of resource in a Namespace.
typeLimitRangestruct{
typeLimitRangestruct{
TypeMeta`json:",inline"`
TypeMeta`json:",inline"`
ObjectMeta`json:"metadata,omitempty" description:"standard object metadata; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata"`
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
ObjectMeta`json:"metadata,omitempty"`
// Spec defines the limits enforced
// Spec defines the limits enforced.
SpecLimitRangeSpec`json:"spec,omitempty" description:"spec defines the limits enforced; http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status"`
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
SpecLimitRangeSpec`json:"spec,omitempty"`
}
}
// LimitRangeList is a list of LimitRange items.
// LimitRangeList is a list of LimitRange items.
typeLimitRangeListstruct{
typeLimitRangeListstruct{
TypeMeta`json:",inline"`
TypeMeta`json:",inline"`
ListMeta`json:"metadata,omitempty" description:"standard list metadata; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata"`
// Standard list metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
ListMeta`json:"metadata,omitempty"`
// Items is a list of LimitRange objects
// Items is a list of LimitRange objects.
Items[]LimitRange`json:"items" description:"items is a list of LimitRange objects; see http://releases.k8s.io/HEAD/docs/design/admission_control_limit_range.md"`
// More info: http://releases.k8s.io/HEAD/docs/design/admission_control_limit_range.md
Items[]LimitRange`json:"items"`
}
}
```
```
...
@@ -108,7 +114,7 @@ type LimitRangeList struct {
...
@@ -108,7 +114,7 @@ type LimitRangeList struct {
Validation of a **LimitRange** enforces that for a given named resource the following rules apply:
Validation of a **LimitRange** enforces that for a given named resource the following rules apply:
Min (if specified) <= DefaultRequests (if specified) <= Default (if specified) <= Max (if specified)
Min (if specified) <= DefaultRequest (if specified) <= Default (if specified) <= Max (if specified)
### Default Value Behavior
### Default Value Behavior
...
@@ -121,11 +127,11 @@ if LimitRangeItem.Default[resourceName] is undefined
...
@@ -121,11 +127,11 @@ if LimitRangeItem.Default[resourceName] is undefined
```
```
```
```
if LimitRangeItem.DefaultRequests[resourceName] is undefined
if LimitRangeItem.DefaultRequest[resourceName] is undefined
if LimitRangeItem.Default[resourceName] is defined
if LimitRangeItem.Default[resourceName] is defined
// MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
@@ -436,7 +436,9 @@ var map_LimitRangeItem = map[string]string{
...
@@ -436,7 +436,9 @@ var map_LimitRangeItem = map[string]string{
"type":"Type of resource that this limit applies to.",
"type":"Type of resource that this limit applies to.",
"max":"Max usage constraints on this kind by resource name.",
"max":"Max usage constraints on this kind by resource name.",
"min":"Min usage constraints on this kind by resource name.",
"min":"Min usage constraints on this kind by resource name.",
"default":"Default usage constraints on this kind by resource name. Default values on this kind by resource name if omitted.",
"default":"Default resource requirement limit value by resource name if resource limit is omitted.",
"defaultRequest":"DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.",
"maxLimitRequestRatio":"MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.",
allErrs=append(allErrs,errs.NewFieldInvalid(fmt.Sprintf("spec.limits[%d].max[%s]",i,k),minValue,fmt.Sprintf("min value %s is greater than max value %s",minQuantity.String(),maxQuantity.String())))
allErrs=append(allErrs,errs.NewFieldInvalid(fmt.Sprintf("spec.limits[%d].min[%s]",i,k),minValue,fmt.Sprintf("min value %s is greater than max value %s",minQuantity.String(),maxQuantity.String())))
allErrs=append(allErrs,errs.NewFieldInvalid(fmt.Sprintf("spec.limits[%d].defaultRequest[%s]",i,k),defaultRequestValue,fmt.Sprintf("min value %s is greater than default request value %s",minQuantity.String(),defaultRequestQuantity.String())))
allErrs=append(allErrs,errs.NewFieldInvalid(fmt.Sprintf("spec.limits[%d].defaultRequest[%s]",i,k),defaultRequestValue,fmt.Sprintf("default request value %s is greater than max value %s",defaultRequestQuantity.String(),maxQuantity.String())))
allErrs=append(allErrs,errs.NewFieldInvalid(fmt.Sprintf("spec.limits[%d].defaultRequest[%s]",i,k),defaultRequestValue,fmt.Sprintf("default request value %s is greater than default limit value %s",defaultRequestQuantity.String(),defaultQuantity.String())))
allErrs=append(allErrs,errs.NewFieldInvalid(fmt.Sprintf("spec.limits[%d].max[%s]",i,k),minValue,fmt.Sprintf("min value %s is greater than default value %s",minQuantity.String(),defaultQuantity.String())))
allErrs=append(allErrs,errs.NewFieldInvalid(fmt.Sprintf("spec.limits[%d].default[%s]",i,k),minValue,fmt.Sprintf("min value %s is greater than default value %s",minQuantity.String(),defaultQuantity.String())))
allErrs=append(allErrs,errs.NewFieldInvalid(fmt.Sprintf("spec.limits[%d].max[%s]",i,k),minValue,fmt.Sprintf("default value %s is greater than max value %s",defaultQuantity.String(),maxQuantity.String())))
allErrs=append(allErrs,errs.NewFieldInvalid(fmt.Sprintf("spec.limits[%d].default[%s]",i,k),maxValue,fmt.Sprintf("default value %s is greater than max value %s",defaultQuantity.String(),maxQuantity.String())))