Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrorOp = "error" UpdateOp = "updated" NoOp = "unchanged" CreateOp = "created" )
Variables ¶
View Source
var DefaultRequeueDuration = (time.Minute * 5)
Used for Jitter in requeueing
Functions ¶
func Jitter ¶
Jitter accepts a Duration and maximum percentage to jitter (as an int), and returns a random Duration in the range t +/- maxJitterPercent.
func JitterRequeue ¶
func JitterRequeue(defaultDuration time.Duration, maxJitterPercent int, log logr.Logger) reconcile.Result
JitterRequeue accepts a default requeue time, a maximum percentage to jitter, and a logger, and returns a Result containing a requeue time which has been randomized with jitter.
Types ¶
type ClientHelper ¶
func (*ClientHelper) CreateOrUpdate ¶
CreateOrUpdate attempts first to patch the object given but if an IsNotFound error is returned it instead creates the resource.
Click to show internal directories.
Click to hide internal directories.