Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for MaxMilliValue (0.15 sec)

  1. plugin/pkg/admission/limitranger/admission.go

    	limit = limitQuantity.Value()
    	enforced = enforcedQuantity.Value()
    	// do a more precise comparison if possible (if the value won't overflow)
    	if request <= resource.MaxMilliValue && limit <= resource.MaxMilliValue && enforced <= resource.MaxMilliValue {
    		request = requestQuantity.MilliValue()
    		limit = limitQuantity.MilliValue()
    		enforced = enforcedQuantity.MilliValue()
    	}
    	return
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 24 13:04:39 UTC 2023
    - 25.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/resource/math.go

    	// The maximum value we can represent milli-units for.
    	// Compare with the return value of Quantity.Value() to
    	// see if it's safe to use Quantity.MilliValue().
    	MaxMilliValue = int64(((1 << 63) - 1) / 1000)
    )
    
    const mostNegative = -(mostPositive + 1)
    const mostPositive = 1<<63 - 1
    
    // int64Add returns a+b, or false if that would overflow int64.
    func int64Add(a, b int64) (int64, bool) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 23 13:07:14 UTC 2020
    - 7.3K bytes
    - Viewed (0)
  3. pkg/apis/core/v1/conversion_test.go

    			t.Fatalf("want core.ServiceAccountName %q, got %q", name, got.ServiceAccountName)
    		}
    	}
    }
    
    func TestResourceListConversion(t *testing.T) {
    	bigMilliQuantity := resource.NewQuantity(resource.MaxMilliValue, resource.DecimalSI)
    	bigMilliQuantity.Add(resource.MustParse("12345m"))
    
    	tests := []struct {
    		input    v1.ResourceList
    		expected core.ResourceList
    	}{
    		{ // No changes necessary.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 10 05:34:15 UTC 2023
    - 21.7K bytes
    - Viewed (0)
  4. pkg/apis/core/validation/validation.go

    				maxRatioValue := float64(maxRatio.Value())
    				minQuantityValue := minQuantity.Value()
    				maxQuantityValue := maxQuantity.Value()
    				if maxRatio.Value() < resource.MaxMilliValue && minQuantityValue < resource.MaxMilliValue && maxQuantityValue < resource.MaxMilliValue {
    					maxRatioValue = float64(maxRatio.MilliValue()) / 1000
    					minQuantityValue = minQuantity.MilliValue()
    					maxQuantityValue = maxQuantity.MilliValue()
    				}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 349.5K bytes
    - Viewed (0)
Back to top