mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-27 05:46:13 +01:00
46 lines
1.0 KiB
Go
46 lines
1.0 KiB
Go
package evictions
|
|
|
|
type EvictionNodeLimitError struct {
|
|
node string
|
|
}
|
|
|
|
func (e EvictionNodeLimitError) Error() string {
|
|
return "maximum number of evicted pods per node reached"
|
|
}
|
|
|
|
func NewEvictionNodeLimitError(node string) *EvictionNodeLimitError {
|
|
return &EvictionNodeLimitError{
|
|
node: node,
|
|
}
|
|
}
|
|
|
|
var _ error = &EvictionNodeLimitError{}
|
|
|
|
type EvictionNamespaceLimitError struct {
|
|
namespace string
|
|
}
|
|
|
|
func (e EvictionNamespaceLimitError) Error() string {
|
|
return "maximum number of evicted pods per namespace reached"
|
|
}
|
|
|
|
func NewEvictionNamespaceLimitError(namespace string) *EvictionNamespaceLimitError {
|
|
return &EvictionNamespaceLimitError{
|
|
namespace: namespace,
|
|
}
|
|
}
|
|
|
|
var _ error = &EvictionNamespaceLimitError{}
|
|
|
|
type EvictionTotalLimitError struct{}
|
|
|
|
func (e EvictionTotalLimitError) Error() string {
|
|
return "maximum number of evicted pods per a descheduling cycle reached"
|
|
}
|
|
|
|
func NewEvictionTotalLimitError() *EvictionTotalLimitError {
|
|
return &EvictionTotalLimitError{}
|
|
}
|
|
|
|
var _ error = &EvictionTotalLimitError{}
|