• HaiyangDING's avatar
    move predicates into library (address #12744) · 41ed8547
    HaiyangDING authored
    DONE:
    1. refactor all predicates: predicates return fitOrNot(bool) and error(Error) in which the latter is of type
    	PredicateFailureError or InsufficientResourceError. (For violation of either MaxEBSVolumeCount or
            MaxGCEPDVolumeCount, returns one same error type as ErrMaxVolumeCountExceeded)
    2. GeneralPredicates() is a predicate function, which includes serveral other predicate functions (PodFitsResource,
            PodFitsHost, PodFitsHostPort). It is registered as one of the predicates in DefaultAlgorithmProvider, and
            is also called in canAdmitPod() in Kubelet and should be called by other components (like rescheduler, etc)
            if necessary. See discussion in issue #12744
    3. remove podNumber check from GeneralPredicates
    4. HostName is now verified in Kubelet's canAdminPod(). add TestHostNameConflicts in kubelet_test.go
    5. add getNodeAnyWay() method in Kubelet to get node information in standaloneMode
    
    TODO:
    1. determine which predicates should be included in GeneralPredicates()
    2. separate GeneralPredicates() into:
    	a. GeneralPredicatesEvictPod() and
    	b. GeneralPredicatesNotEvictPod()
    3. DaemonSet should use GeneralPredicates()
    41ed8547
Name
Last commit
Last update
..
defaults Loading commit data...
plugins.go Loading commit data...
plugins_test.go Loading commit data...