mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Clarify limit ranger use of status resources
This commit is contained in:
parent
13ae28bd67
commit
dc45ae38c6
@ -545,6 +545,8 @@ func PodValidateLimitFunc(limitRange *corev1.LimitRange, pod *api.Pod) error {
|
||||
|
||||
// podRequests is a simplified version of pkg/api/v1/resource/PodRequests that operates against the core version of
|
||||
// pod. Any changes to that calculation should be reflected here.
|
||||
// NOTE: We do not want to check status resources here, only the spec. This is equivalent to setting
|
||||
// UseStatusResources=false in the common helper.
|
||||
// TODO: Maybe we can consider doing a partial conversion of the pod to a v1
|
||||
// type and then using the pkg/api/v1/resource/PodRequests.
|
||||
func podRequests(pod *api.Pod) api.ResourceList {
|
||||
@ -585,6 +587,8 @@ func podRequests(pod *api.Pod) api.ResourceList {
|
||||
|
||||
// podLimits is a simplified version of pkg/api/v1/resource/PodLimits that operates against the core version of
|
||||
// pod. Any changes to that calculation should be reflected here.
|
||||
// NOTE: We do not want to check status resources here, only the spec. This is equivalent to setting
|
||||
// UseStatusResources=false in the common helper.
|
||||
// TODO: Maybe we can consider doing a partial conversion of the pod to a v1
|
||||
// type and then using the pkg/api/v1/resource/PodLimits.
|
||||
func podLimits(pod *api.Pod) api.ResourceList {
|
||||
|
Loading…
Reference in New Issue
Block a user