Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 76 for NewQuantity (0.14 sec)

  1. pkg/kubelet/stats/cri_stats_provider_windows_test.go

    	// getPodContainerLogStats is called during makeWindowsContainerStats to populate ContainerStats.Logs
    	c0LogStats := &volume.Metrics{
    		Used:       resource.NewQuantity(int64(logStatsUsed), resource.BinarySI),
    		InodesUsed: resource.NewQuantity(int64(logStatsInodesUsed), resource.BinarySI),
    	}
    	fakeStats := map[string]*volume.Metrics{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Feb 17 00:02:10 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  2. pkg/kubelet/nodestatus/setters.go

    				node.Status.Capacity[rName] = rCap
    			}
    
    			if podsPerCore > 0 {
    				node.Status.Capacity[v1.ResourcePods] = *resource.NewQuantity(
    					int64(math.Min(float64(info.NumCores*podsPerCore), float64(maxPods))), resource.DecimalSI)
    			} else {
    				node.Status.Capacity[v1.ResourcePods] = *resource.NewQuantity(
    					int64(maxPods), resource.DecimalSI)
    			}
    
    			if node.Status.NodeInfo.BootID != "" &&
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 12:12:04 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  3. pkg/kubelet/cm/container_manager_stub.go

    	if !localStorageCapacityIsolation {
    		return v1.ResourceList{}
    	}
    	c := v1.ResourceList{
    		v1.ResourceEphemeralStorage: *resource.NewQuantity(
    			int64(0),
    			resource.BinarySI),
    	}
    	return c
    }
    
    func (cm *containerManagerStub) GetPluginRegistrationHandler() cache.PluginHandler {
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 15 02:26:59 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/cel/library/quantity.go

    	if !ok {
    		return types.MaybeNoSuchOverloadErr(arg)
    	}
    
    	q2, ok := other.Value().(int64)
    	if !ok {
    		return types.MaybeNoSuchOverloadErr(arg)
    	}
    
    	q2Converted := *resource.NewQuantity(q2, resource.DecimalExponent)
    
    	copy := *q
    	copy.Add(q2Converted)
    	return &apiservercel.Quantity{
    		Quantity: &copy,
    	}
    }
    
    func quantitySub(arg ref.Val, other ref.Val) ref.Val {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 23 21:31:27 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/noderesources/resource_allocation.go

    	}
    	if !r.useRequested {
    		opts.NonMissingContainerRequests = v1.ResourceList{
    			v1.ResourceCPU:    *resource.NewMilliQuantity(schedutil.DefaultMilliCPURequest, resource.DecimalSI),
    			v1.ResourceMemory: *resource.NewQuantity(schedutil.DefaultMemoryRequest, resource.DecimalSI),
    		}
    	}
    
    	requests := resourcehelper.PodRequests(pod, opts)
    
    	quantity := requests[resourceName]
    	if resourceName == v1.ResourceCPU {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 20 14:53:43 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  6. pkg/scheduler/schedule_one_test.go

    					v1.ResourceCPU:    *(resource.NewQuantity(cpu/2, resource.DecimalSI)),
    					v1.ResourceMemory: *(resource.NewQuantity(mem/5, resource.DecimalSI)),
    					v1.ResourcePods:   *(resource.NewQuantity(10, resource.DecimalSI)),
    				},
    				Allocatable: v1.ResourceList{
    					v1.ResourceCPU:    *(resource.NewQuantity(cpu/2, resource.DecimalSI)),
    					v1.ResourceMemory: *(resource.NewQuantity(mem/5, resource.DecimalSI)),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:20:55 UTC 2024
    - 128.1K bytes
    - Viewed (0)
  7. pkg/kubelet/eviction/api/types.go

    func GetThresholdQuantity(value ThresholdValue, capacity *resource.Quantity) *resource.Quantity {
    	if value.Quantity != nil {
    		res := value.Quantity.DeepCopy()
    		return &res
    	}
    	return resource.NewQuantity(int64(float64(capacity.Value())*float64(value.Percentage)), resource.BinarySI)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 18:46:33 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  8. pkg/kubelet/cm/fake_container_manager.go

    	defer cm.Unlock()
    	cm.CalledFunctions = append(cm.CalledFunctions, "GetCapacity")
    	if !localStorageCapacityIsolation {
    		return v1.ResourceList{}
    	}
    	c := v1.ResourceList{
    		v1.ResourceEphemeralStorage: *resource.NewQuantity(
    			int64(0),
    			resource.BinarySI),
    	}
    	return c
    }
    
    func (cm *FakeContainerManager) GetPluginRegistrationHandler() cache.PluginHandler {
    	cm.Lock()
    	defer cm.Unlock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 17:33:04 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  9. pkg/kubelet/cm/memorymanager/memory_manager.go

    	}
    
    	for resourceType := range commonMemoryTypeSet {
    		nodeAllocatableMemory := resource.NewQuantity(0, resource.DecimalSI)
    		if memValue, set := nodeAllocatableReservation[resourceType]; set {
    			nodeAllocatableMemory.Add(memValue)
    		}
    
    		reservedMemory := resource.NewQuantity(0, resource.DecimalSI)
    		if memValue, set := totalMemoryType[resourceType]; set {
    			reservedMemory.Add(memValue)
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 00:50:45 UTC 2023
    - 17.1K bytes
    - Viewed (0)
  10. pkg/volume/util/fsquota/quota_linux.go

    	if applier == nil {
    		return nil, nil
    	}
    	ibytes, err := applier.GetConsumption(path, dirQuotaMap[path])
    	if err != nil {
    		return nil, err
    	}
    	return resource.NewQuantity(ibytes, resource.DecimalSI), nil
    }
    
    // GetInodes -- retrieve the number of inodes in use under the directory
    func GetInodes(path string) (*resource.Quantity, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 07 08:07:51 UTC 2023
    - 14.1K bytes
    - Viewed (0)
Back to top