Multiple enhancements - leader election, events, time window, delay after upgrading #335
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add some long-requested or at least long overdue features:
Add leader election, to allow multiple replicas of the controller.
Emit events. Controller events (startup, leader election) are attached to the Node running the controller, Plan events are attached to the Plan.
Add support for
spec.window
to set time window for upgrades.Add support for
spec.postCompleteDelay
- configurable delay after job completion before node is marked done.New fields:
spec.window
:TimeWindow
from github.com/kubereboot/kured/pkg/timewindow.Plan will not start creating Jobs for Nodes outside this time window. If there are already Nodes in progress (
status.applying
is not empty) when the window closes, the Plan will continue to run until finished.spec.postCompleteDelay
: positivetime.Duration
string.By default, Nodes are marked as done as soon as the Job is complete. When this is set, the Job must be Completed for at least this long before the Node is marked as done via Plan hash label. Job
TTLSecondsAfterFinished
is set to at least 1 minute longer than this delay, to ensure that the controller gets a chance to see the Job complete.Example of events: