Documentation
¶
Overview ¶
Package options provides functional options for controller runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedResource ¶
CachedResource is a resource that should be cached by controller runtime.
type Option ¶
type Option func(*Options)
Option is a functional option for controller runtime.
func WithCachedResource ¶
WithCachedResource adds a resource to the list of resources that should be cached by controller runtime.
func WithChangeRateLimit ¶
WithChangeRateLimit sets rate limit for changes performed by controllers.
This might be used to rate limit ill-behaving controllers from overloading the system with changes.
func WithMetrics ¶
WithMetrics enables runtime metrics to be exposed via metrics package.
func WithWarnOnUncachedReads ¶
WithWarnOnUncachedReads adds a warning log when a controller reads an uncached resource.
type Options ¶
type Options struct {
// CachedResources is a list of resources that should be cached by controller runtime.
CachedResources []CachedResource
// ChangeRateLimit and ChangeBurst configure rate limiting of changes performed by controllers.
ChangeRateLimit rate.Limit
ChangeBurst int
// MetricsEnabled enables runtime metrics to be exposed via metrics package.
MetricsEnabled bool
// WarnOnUncachedReads adds a warning log when a controller reads an uncached resource.
WarnOnUncachedReads bool
}
Options configures controller runtime.
func DefaultOptions ¶
func DefaultOptions() Options
DefaultOptions returns default value of Options.