Documentation
¶
Index ¶
Constants ¶
View Source
const (
MaxTimeForNoPeersResponse = 30 * time.Second
)
View Source
const TimeToAssumeRebootHasStarted = time.Second * 30
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calculator ¶ added in v0.9.0
type Calculator interface {
// GetRebootDuration returns the safe time to assume node was already rebooted.
// Can be either the specified SafeTimeToAssumeNodeRebootedSeconds or the calculated minimum reboot duration.
// Note that this time must include the time for an unhealthy node without api-server access to reach the conclusion that it's unhealthy.
// This should be at least worst-case time to reach a conclusion from the other peers * request context timeout + watchdog interval + maxFailuresThreshold * reconcileInterval + padding
GetRebootDuration(ctx context.Context, node *v1.Node) (time.Duration, error)
// SetConfig sets the SelfNodeRemediationConfig to be used for calculating the minimum reboot duration
SetConfig(config *v1alpha1.SelfNodeRemediationConfig)
}
func NewCalculator ¶ added in v0.9.0
func NewCalculator(k8sClient client.Client, log logr.Logger) Calculator
Click to show internal directories.
Click to hide internal directories.