Documentation ¶
Overview ¶
Package resync helps controllers specify custom resync behavior, which is important when they need to check state that lives outside the Kubernetes API server, such as in an app-specific system.
The controller-runtime library supports a form of resync, but you have to use the same setting for all controllers in the controller manager, and it tends to dump everything in the queue at once, which is spiky.
This package allows each controller to set its own resync period, and tries to spread out the requeuing of objects over time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Periodic ¶
type Periodic struct {
// contains filtered or unexported fields
}
Periodic will trigger periodic resyncs of objects.
func NewPeriodic ¶
NewPeriodic returns a new periodic resync.
func (*Periodic) Enqueue ¶
Enqueue adds the given object to the periodic resync queue. If the object was already in the queue, this resets the timer on it since it's assumed that this is called after a reconcile pass has just finished.
func (*Periodic) WatchSource ¶
WatchSource returns the source.Source that can be passed to Controller.Watch() to plug this resync into the controller.