Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for IsExtendedResourceName (0.39 sec)

  1. pkg/apis/core/helper/helpers.go

    }
    
    // IsExtendedResourceName returns true if:
    // 1. the resource name is not in the default namespace;
    // 2. resource name does not have "requests." prefix,
    // to avoid confusion with the convention in quota
    // 3. it satisfies the rules in IsQualifiedName() after converted into quota resource name
    func IsExtendedResourceName(name core.ResourceName) bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 28 07:31:28 UTC 2023
    - 16.1K bytes
    - Viewed (0)
  2. pkg/apis/core/v1/helper/helpers.go

    	"k8s.io/kubernetes/pkg/apis/core/helper"
    )
    
    // IsExtendedResourceName returns true if:
    // 1. the resource name is not in the default namespace;
    // 2. resource name does not have "requests." prefix,
    // to avoid confusion with the convention in quota
    // 3. it satisfies the rules in IsQualifiedName() after converted into quota resource name
    func IsExtendedResourceName(name v1.ResourceName) bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 23:03:54 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  3. pkg/kubelet/lifecycle/predicate.go

    		// does not use Limits.
    		podCopy.Spec.Containers[i].Resources.Requests = make(v1.ResourceList)
    		for rName, rQuant := range c.Resources.Requests {
    			if v1helper.IsExtendedResourceName(rName) {
    				if _, found := nodeInfo.Allocatable.ScalarResources[rName]; !found {
    					continue
    				}
    			}
    			podCopy.Spec.Containers[i].Resources.Requests[rName] = rQuant
    		}
    	}
    	return podCopy
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 00:47:50 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  4. pkg/scheduler/apis/config/validation/validation.go

    		validationErrors = append(validationErrors, field.Invalid(path, name, msg))
    	}
    	if len(validationErrors) != 0 {
    		return validationErrors
    	}
    	if !v1helper.IsExtendedResourceName(name) {
    		validationErrors = append(validationErrors, field.Invalid(path, string(name), "is an invalid extended resource name"))
    	}
    	return validationErrors
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 06:27:01 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  5. pkg/quota/v1/evaluator/core/pods.go

    			result[resource] = request
    			result[maskResourceWithPrefix(resource, corev1.DefaultResourceRequestsPrefix)] = request
    		}
    		// for extended resources
    		if helper.IsExtendedResourceName(resource) {
    			// only quota objects in format of "requests.resourceName" is allowed for extended resource.
    			result[maskResourceWithPrefix(resource, corev1.DefaultResourceRequestsPrefix)] = request
    		}
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 05 00:02:47 UTC 2023
    - 17.4K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/noderesources/fit.go

    		})
    	}
    
    	for rName, rQuant := range podRequest.ScalarResources {
    		// Skip in case request quantity is zero
    		if rQuant == 0 {
    			continue
    		}
    
    		if v1helper.IsExtendedResourceName(rName) {
    			// If this resource is one of the extended resources that should be ignored, we will skip checking it.
    			// rName is guaranteed to have a slash due to API validation.
    			var rNamePrefix string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 20.2K bytes
    - Viewed (0)
  7. pkg/kubelet/nodestatus/setters.go

    		}
    		// Remove extended resources from allocatable that are no longer
    		// present in capacity.
    		for k := range node.Status.Allocatable {
    			_, found := node.Status.Capacity[k]
    			if !found && v1helper.IsExtendedResourceName(k) {
    				delete(node.Status.Allocatable, k)
    			}
    		}
    		allocatableReservation := nodeAllocatableReservationFunc()
    		for k, v := range node.Status.Capacity {
    			value := v.DeepCopy()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 12:12:04 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  8. pkg/kubelet/kubelet_node_status.go

    	if kl.containerManager.ShouldResetExtendedResourceCapacity() {
    		for k := range node.Status.Capacity {
    			if v1helper.IsExtendedResourceName(k) {
    				klog.InfoS("Zero out resource capacity in existing node", "resourceName", k, "node", klog.KObj(node))
    				node.Status.Capacity[k] = *resource.NewQuantity(int64(0), resource.DecimalSI)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 31.1K bytes
    - Viewed (0)
Back to top