Documentation
¶
Index ¶
- Constants
- Variables
- func BuildLabelKey(key string) string
- func ExponentialBackoffWithJitter(base time.Duration, attempt int) time.Duration
- func Jitter(d time.Duration) time.Duration
- func Parse()
- func RequeueWithJitter() time.Duration
- func RetryNWithJitterOnError(attempt int) time.Duration
- func RetryWithJitterOnError() time.Duration
- type Feature
Constants ¶
View Source
const (
FinalizerSuffix = "finalizer"
)
Variables ¶
View Source
var ( // RequeueAfterOnError is the time to wait before retrying a failed operation. // This applies for all controller errors. RequeueAfterOnError = 1 * time.Second // RequeueAfter is the time to wait before retrying a successful operation. RequeueAfter = 30 * time.Minute // JitterFactor is the factor to apply to the backoff duration. JitterFactor = 0.7 // MaxBackoff is the maximum backoff duration. MaxBackoff = 5 * time.Minute // MaxConcurrentReconciles is the maximum number of concurrent reconciles. MaxConcurrentReconciles = 10 DefaultNamespace = "default" DefaultEnvironment = "default" LabelKeyPrefix = "cp.ei.telekom.de" FinalizerName = LabelKeyPrefix + "/" + FinalizerSuffix )
exposed configuration variables
View Source
var ( EnvironmentLabelKey = BuildLabelKey("environment") OwnerUidLabelKey = BuildLabelKey("owner.uid") DomainLabelKey = BuildLabelKey("domain") )
Functions ¶
func BuildLabelKey ¶
func Jitter ¶
Jitter adds a random factor to the duration. This is used to prevent the thundering herd problem. See https://en.wikipedia.org/wiki/Thundering_herd_problem
func RequeueWithJitter ¶
RequeueWithJitter returns a duration used in result.RequeueAfter. This is indented to be used in the controller's Reconcile function.
! in case of success
func RetryNWithJitterOnError ¶
func RetryWithJitterOnError ¶
RetryWithJitterOnError returns a duration used in result.RequeueAfter. Its a wrapper around `RetryNWithJitterOnError(0)`. This is indented to be used in the controller's Reconcile function.
! in case of error
Types ¶
type Feature ¶
var ( FeaturePubSub Feature = NewFeature("pubsub", false) // Pub/Sub feature disabled by default FeatureSecretManager Feature = NewFeature("secret_manager", true) // Secret Manager feature enabled by default FeatureFileManager Feature = NewFeature("file_manager", true) // File Manager feature enabled by default )
func NewFeature ¶
Click to show internal directories.
Click to hide internal directories.