reboot

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

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

type Rebooter

type Rebooter interface {
	// Reboot triggers a node reboot
	Reboot() error
}

func NewWatchdogRebooter

func NewWatchdogRebooter(wd watchdog.Watchdog, log logr.Logger) Rebooter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL