mirror of https://github.com/k3s-io/k3s
Update resource quota scope documentation
parent
75db4cb19a
commit
3cf7776b50
|
@ -112,11 +112,11 @@ Support the following resources that can be tracked by quota.
|
||||||
| Resource Name | Description |
|
| Resource Name | Description |
|
||||||
| ------------- | ----------- |
|
| ------------- | ----------- |
|
||||||
| cpu | total cpu requests (backwards compatibility) |
|
| cpu | total cpu requests (backwards compatibility) |
|
||||||
| cpu.request | total cpu requests |
|
|
||||||
| cpu.limit | total cpu limits |
|
|
||||||
| memory | total memory requests (backwards compatibility) |
|
| memory | total memory requests (backwards compatibility) |
|
||||||
| memory.request | total memory requests |
|
| requests.cpu | total cpu requests |
|
||||||
| memory.limit | total memory limits |
|
| requests.memory | total memory requests |
|
||||||
|
| limits.cpu | total cpu limits |
|
||||||
|
| limits.memory | total memory limits |
|
||||||
|
|
||||||
### Resource Quota Scopes
|
### Resource Quota Scopes
|
||||||
|
|
||||||
|
@ -145,22 +145,22 @@ A `Terminating`, `NotTerminating`, `NotBestEffort` scope restricts a quota to
|
||||||
tracking the following resources:
|
tracking the following resources:
|
||||||
|
|
||||||
* pod
|
* pod
|
||||||
* memory, memory.request, memory.limit
|
* memory, requests.memory, limits.memory
|
||||||
* cpu, cpu.request, cpu.limit
|
* cpu, requests.cpu, limits.cpu
|
||||||
|
|
||||||
## Data Model Impact
|
## Data Model Impact
|
||||||
|
|
||||||
```
|
```
|
||||||
// The following identify resource constants for Kubernetes object types
|
// The following identify resource constants for Kubernetes object types
|
||||||
const (
|
const (
|
||||||
// CPU Request, in cores
|
// CPU request, in cores. (500m = .5 cores)
|
||||||
ResourceCPURequest ResourceName = "cpu.request"
|
ResourceRequestsCPU ResourceName = "requests.cpu"
|
||||||
// CPU Limit, in bytes
|
// Memory request, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
|
||||||
ResourceCPULimit ResourceName = "cpu.limit"
|
ResourceRequestsMemory ResourceName = "requests.memory"
|
||||||
// Memory Request, in bytes
|
// CPU limit, in cores. (500m = .5 cores)
|
||||||
ResourceMemoryRequest ResourceName = "memory.request"
|
ResourceLimitsCPU ResourceName = "limits.cpu"
|
||||||
// Memory Limit, in bytes
|
// Memory limit, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
|
||||||
ResourceMemoryLimit ResourceName = "memory.limit"
|
ResourceLimitsMemory ResourceName = "limits.memory"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A scope is a filter that matches an object
|
// A scope is a filter that matches an object
|
||||||
|
@ -178,8 +178,8 @@ const (
|
||||||
type ResourceQuotaSpec struct {
|
type ResourceQuotaSpec struct {
|
||||||
// Hard is the set of desired hard limits for each named resource
|
// Hard is the set of desired hard limits for each named resource
|
||||||
Hard ResourceList `json:"hard,omitempty"`
|
Hard ResourceList `json:"hard,omitempty"`
|
||||||
// Scopes is the set of filters that must match an object for it to be
|
// A collection of filters that must match each object tracked by a quota.
|
||||||
// tracked by the quota
|
// If not specified, the quota matches all objects.
|
||||||
Scopes []ResourceQuotaScope `json:"scopes,omitempty"`
|
Scopes []ResourceQuotaScope `json:"scopes,omitempty"`
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue