Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaxTimeForNoPeersResponse = 30 * time.Second MinNodesNumberInBatch = 3 MaxBatchesAfterFirst = 10 )
View Source
const TimeToAssumeRebootHasStarted = time.Second * 30
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SafeTimeCalculator ¶ added in v0.6.0
type SafeTimeCalculator interface { // GetTimeToAssumeNodeRebooted returns the safe time to assume node was already rebooted // note that this time must include the time for a 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 GetTimeToAssumeNodeRebooted() time.Duration SetTimeToAssumeNodeRebooted(time.Duration) Start(ctx context.Context) error //IsAgent return true in case running on an agent pod (responsible for reboot) or false in case running on a manager pod IsAgent() bool }
func NewAgentSafeTimeCalculator ¶ added in v0.8.0
func NewManagerSafeTimeCalculator ¶ added in v0.8.0
func NewManagerSafeTimeCalculator(k8sClient client.Client, timeToAssumeNodeRebooted time.Duration) SafeTimeCalculator
Click to show internal directories.
Click to hide internal directories.