config

package
v0.17.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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 BuildLabelKey(key string) string

func ExponentialBackoffWithJitter

func ExponentialBackoffWithJitter(base time.Duration, attempt int) time.Duration

func Jitter

func Jitter(d time.Duration) time.Duration

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 Parse

func Parse()

func RequeueWithJitter

func RequeueWithJitter() time.Duration

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 RetryNWithJitterOnError(attempt int) time.Duration

func RetryWithJitterOnError

func RetryWithJitterOnError() time.Duration

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

type Feature interface {
	String() string
	IsEnabled() bool
	Path() string
}
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

func NewFeature(name string, enabled bool) Feature

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL