Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for GetScaledValueFromIntOrPercent (0.26 sec)

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

    func ValueOrDefault(intOrPercent *IntOrString, defaultValue IntOrString) *IntOrString {
    	if intOrPercent == nil {
    		return &defaultValue
    	}
    	return intOrPercent
    }
    
    // GetScaledValueFromIntOrPercent is meant to replace GetValueFromIntOrPercent.
    // This method returns a scaled value from an IntOrString type. If the IntOrString
    // is a percentage string value it's treated as a percentage and scaled appropriately
    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/controller/daemon/util/daemonset_util.go

    	r := ds.Spec.UpdateStrategy.RollingUpdate
    	if r == nil {
    		return 0, nil
    	}
    	// If surge is not requested, we should default to 0.
    	if r.MaxSurge == nil {
    		return 0, nil
    	}
    	return intstrutil.GetScaledValueFromIntOrPercent(r.MaxSurge, numberToSchedule, true)
    }
    
    // UnavailableCount returns 0 if unavailability is not requested, the expected
    // unavailability number to allow out of numberToSchedule if requested, or an error if
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 18 11:54:59 UTC 2022
    - 9.3K bytes
    - Viewed (0)
Back to top