Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getIntOrPercentValue (0.29 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go

    			value = int(math.Floor(float64(value) * (float64(total)) / 100))
    		}
    	}
    	return value, nil
    }
    
    // getIntOrPercentValue is a legacy function and only meant to be called by GetValueFromIntOrPercent
    // For a more correct implementation call getIntOrPercentSafely
    func getIntOrPercentValue(intOrStr *IntOrString) (int, bool, error) {
    	switch intOrStr.Type {
    	case Int:
    		return intOrStr.IntValue(), false, nil
    	case String:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  2. pkg/apis/apps/validation/validation.go

    	// Validate exactly one of MaxSurge or MaxUnavailable is non-zero
    	hasUnavailable := getIntOrPercentValue(rollingUpdate.MaxUnavailable) != 0
    	hasSurge := getIntOrPercentValue(rollingUpdate.MaxSurge) != 0
    	switch {
    	case hasUnavailable && hasSurge:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 06 22:11:20 UTC 2024
    - 41.4K bytes
    - Viewed (0)
Back to top