Add no admit on node side
Update generated code Refactored predicates & restore helper
This commit is contained in:
@@ -29,7 +29,6 @@ var (
|
||||
ErrVolumeZoneConflict = newPredicateFailureError("NoVolumeZoneConflict")
|
||||
ErrNodeSelectorNotMatch = newPredicateFailureError("MatchNodeSelector")
|
||||
ErrPodAffinityNotMatch = newPredicateFailureError("MatchInterPodAffinity")
|
||||
ErrTaintsTolerationsNotMatch = newPredicateFailureError("PodToleratesNodeTaints")
|
||||
ErrPodNotMatchHostName = newPredicateFailureError("HostName")
|
||||
ErrPodNotFitsHostPorts = newPredicateFailureError("PodFitsHostPorts")
|
||||
ErrNodeLabelPresenceViolated = newPredicateFailureError("CheckNodeLabelPresence")
|
||||
@@ -42,6 +41,25 @@ var (
|
||||
ErrFakePredicate = newPredicateFailureError("FakePredicateError")
|
||||
)
|
||||
|
||||
// ErrTaintsTolerationsNotMatch is an error type that indicates with if it should be aware by kubelet.
|
||||
type ErrTaintsTolerationsNotMatch struct {
|
||||
SomeUntoleratedTaintIsNoAdmit bool
|
||||
}
|
||||
|
||||
func newErrTaintsTolerationsNotMatch(someUntoleratedTaintIsNoAdmit bool) *ErrTaintsTolerationsNotMatch {
|
||||
return &ErrTaintsTolerationsNotMatch{
|
||||
SomeUntoleratedTaintIsNoAdmit: someUntoleratedTaintIsNoAdmit,
|
||||
}
|
||||
}
|
||||
|
||||
func (e *ErrTaintsTolerationsNotMatch) Error() string {
|
||||
return fmt.Sprintf("Taint Toleration unmatched with SomeUntoleratedTaintIsNoAdmit is: %v", e.SomeUntoleratedTaintIsNoAdmit)
|
||||
}
|
||||
|
||||
func (e *ErrTaintsTolerationsNotMatch) GetReason() string {
|
||||
return fmt.Sprintf("ErrTaintsTolerationsNotMatch, and SomeUntoleratedTaintIsNoAdmit is: %v", e.SomeUntoleratedTaintIsNoAdmit)
|
||||
}
|
||||
|
||||
// InsufficientResourceError is an error type that indicates what kind of resource limit is
|
||||
// hit and caused the unfitting failure.
|
||||
type InsufficientResourceError struct {
|
||||
|
Reference in New Issue
Block a user