Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 76 for NewQuantity (0.38 sec)

  1. pkg/kubelet/volumemanager/cache/desired_state_of_world.go

    				sizeLimit = resource.NewQuantity(ephemeralStorageLimit.Value(), resource.BinarySI)
    				if volumeSpec.Volume.EmptyDir != nil &&
    					volumeSpec.Volume.EmptyDir.SizeLimit != nil &&
    					volumeSpec.Volume.EmptyDir.SizeLimit.Value() > 0 &&
    					(sizeLimit.Value() == 0 || volumeSpec.Volume.EmptyDir.SizeLimit.Value() < sizeLimit.Value()) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  2. pkg/kubelet/cm/devicemanager/manager.go

    			deletedResources.Insert(resourceName)
    			needsUpdateCheckpoint = true
    		} else {
    			capacity[v1.ResourceName(resourceName)] = *resource.NewQuantity(int64(devices.Len()), resource.DecimalSI)
    			allocatable[v1.ResourceName(resourceName)] = *resource.NewQuantity(int64(devices.Len()), resource.DecimalSI)
    		}
    	}
    	for resourceName, devices := range m.unhealthyDevices {
    		eI, ok := m.endpoints[resourceName]
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 15 12:01:56 UTC 2024
    - 43K bytes
    - Viewed (0)
  3. pkg/kubelet/kuberuntime/kuberuntime_manager.go

    				v1.ResourceMemory: *resource.NewQuantity(cInfo.desiredContainerResources.memoryLimit, resource.BinarySI),
    			}
    			container.Resources.Requests = v1.ResourceList{
    				v1.ResourceCPU:    *resource.NewMilliQuantity(cInfo.currentContainerResources.cpuRequest, resource.DecimalSI),
    				v1.ResourceMemory: *resource.NewQuantity(cInfo.desiredContainerResources.memoryRequest, resource.BinarySI),
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 22 02:01:31 UTC 2024
    - 64.7K bytes
    - Viewed (0)
  4. pkg/kubelet/eviction/helpers_test.go

    		equal bool
    	}{
    		{
    			a: evictionapi.ThresholdValue{
    				Quantity: resource.NewQuantity(123, resource.BinarySI),
    			},
    			b: evictionapi.ThresholdValue{
    				Quantity: resource.NewQuantity(123, resource.BinarySI),
    			},
    			equal: true,
    		},
    		{
    			a: evictionapi.ThresholdValue{
    				Quantity: resource.NewQuantity(123, resource.BinarySI),
    			},
    			b: evictionapi.ThresholdValue{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 15 23:14:12 UTC 2024
    - 106.7K bytes
    - Viewed (0)
  5. pkg/controller/podautoscaler/metrics/client_test.go

    						Name: containerName,
    						Usage: v1.ResourceList{
    							v1.ResourceCPU: *resource.NewMilliQuantity(
    								cpu,
    								resource.DecimalSI),
    							v1.ResourceMemory: *resource.NewQuantity(
    								int64(1024*1024),
    								resource.BinarySI),
    						},
    					}
    					metric.Containers = append(metric.Containers, cm)
    				}
    				metrics.Items = append(metrics.Items, metric)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Nov 09 02:34:54 UTC 2021
    - 16.4K bytes
    - Viewed (0)
  6. pkg/kubelet/kuberuntime/kuberuntime_container_linux.go

    			if milliCPU > 0 {
    				cpuRequest = resource.NewMilliQuantity(milliCPU, resource.DecimalSI)
    			}
    		}
    		if runtimeStatusResources.MemoryLimitInBytes > 0 {
    			memLimit = resource.NewQuantity(runtimeStatusResources.MemoryLimitInBytes, resource.BinarySI)
    		}
    		if cpuLimit != nil || memLimit != nil || cpuRequest != nil {
    			cStatusResources = &kubecontainer.ContainerResources{
    				CPULimit:    cpuLimit,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  7. pkg/kubelet/kubelet_node_status.go

    			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)
    				node.Status.Allocatable[k] = *resource.NewQuantity(int64(0), resource.DecimalSI)
    				requiresUpdate = true
    			}
    		}
    	}
    	return requiresUpdate
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  8. pkg/volume/util/fsquota/quota_linux_test.go

    	return SupportsQuotas(dummyQuotaTest(), path)
    }
    
    func fakeAssignQuota(path string, poduid types.UID, bytes int64) error {
    	dummySetFSInfo(path)
    	return AssignQuota(dummyQuotaTest(), path, poduid, resource.NewQuantity(bytes, resource.DecimalSI))
    }
    
    func fakeClearQuota(path string) error {
    	dummySetFSInfo(path)
    	return ClearQuota(dummyQuotaTest(), path)
    }
    
    type quotaTestCase struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  9. pkg/kubelet/cm/cpumanager/cpu_manager_test.go

    		},
    		{
    			description:                "static policy",
    			cpuPolicyName:              "static",
    			nodeAllocatableReservation: v1.ResourceList{v1.ResourceCPU: *resource.NewQuantity(3, resource.DecimalSI)},
    			expectedPolicy:             "static",
    		},
    		{
    			description:                "static policy - broken topology",
    			cpuPolicyName:              "static",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 06 13:16:15 UTC 2023
    - 42.9K bytes
    - Viewed (0)
  10. pkg/quota/v1/evaluator/core/pods.go

    	// where "pods" tracks all pods that have not reached a terminal state,
    	// count/pods tracks all pods independent of state.
    	result := corev1.ResourceList{
    		podObjectCountName: *(resource.NewQuantity(1, resource.DecimalSI)),
    	}
    
    	// by convention, we do not quota compute resources that have reached end-of life
    	// note: the "pods" resource is considered a compute resource since it is tied to life-cycle.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 05 00:02:47 UTC 2023
    - 17.4K bytes
    - Viewed (0)
Back to top