Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
Types ¶
type Config ¶
type Config struct { Logger micrologger.Logger K8sClient client.Client // MaxNodeTerminationPercentage defines a maximum percentage of nodes that will be returned as 'marked for termination' // ie: if the value is 0.5 and cluster have 10 nodes, than `DetectBadNodes`can only return maximum of 5 nodes // marked for termination at single run MaxNodeTerminationPercentage float64 // NotReadyTickThreshold defines a how many times the node must bee seen as NotReady in order to return it as 'marked for termination' NotReadyTickThreshold int // PauseBetweenTermination defines a pause between 2 intervals where node termination can occur. // This is a safeguard to prevent nodes being terminated over and over or to not terminate too much at once. // ie: if the value is 5m it means once it returned nodes for termination it wont return another nodes for another 5 min. PauseBetweenTermination time.Duration }
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
func NewDetector ¶
func (*Detector) DetectBadNodes ¶
DetectBadNodes will return list of nodes that should be terminated which in documentation terminology is used as 'marked for termination'.
Click to show internal directories.
Click to hide internal directories.