Documentation
¶
Index ¶
- type Config
- func (cfg *Config) BindFlags()
- func (cfg *Config) GetReconcileResourceMaxConcurrency(resourceName string) int
- func (cfg *Config) GetReconcileResources() ([]string, error)
- func (c *Config) GetWatchNamespaces() ([]string, error)
- func (cfg *Config) ParseReconcileResourceResyncSeconds() (map[string]time.Duration, error)
- func (cfg *Config) ParseWatchSelectors() (labels.Selector, error)
- func (cfg *Config) SetAWSAccountID(ctx context.Context) error
- func (cfg *Config) SetupLogger()
- func (cfg *Config) Validate(ctx context.Context, options ...Option) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
MetricsAddr string
HealthzAddr string
EnableLeaderElection bool
EnableAdoptedResourceReconciler bool
LeaderElectionNamespace string
EnableDevelopmentLogging bool
AccountID string
Region string
IdentityEndpointURL string
EndpointURL string
AllowUnsafeEndpointURL bool
LogLevel string
ResourceTags []string
WatchNamespace string
WatchSelectors string
EnableWebhookServer bool
WebhookServerAddr string
DeletionPolicy ackv1alpha1.DeletionPolicy
ReconcileDefaultResyncSeconds int
ReconcileResourceResyncSeconds []string
ReconcileDefaultMaxConcurrency int
ReconcileResourceMaxConcurrency []string
ReconcileResources string
// TODO(a-hilaly): migrate to k8s.io/component-base and implement a proper parser for feature gates.
FeatureGates featuregate.FeatureGates
// contains filtered or unexported fields
}
Config contains configuration options for ACK service controllers
func (*Config) BindFlags ¶
func (cfg *Config) BindFlags()
BindFlags defines CLI/runtime configuration options
func (*Config) GetReconcileResourceMaxConcurrency ¶ added in v0.32.0
GetReconcileResourceMaxConcurrency returns the maximum number of concurrent reconciles for a given resource name. If the resource name is not found in the --reconcile-resource-max-concurrent-syncs flag, the function returns the default maximum concurrency value.
func (*Config) GetReconcileResources ¶ added in v0.46.0
GetReconcileResources returns a slice of resource kinds that should be reconciled.
func (*Config) GetWatchNamespaces ¶ added in v0.29.2
GetWatchNamespaces returns a slice of namespaces to watch for custom resource events. If the watchNamespace flag is empty, the function returns nil, which means that the controller will watch for events in all namespaces.
func (*Config) ParseReconcileResourceResyncSeconds ¶ added in v0.24.0
ParseReconcileResourceResyncSeconds parses the values of the --reconcile-resource-resync-seconds flag and returns a map that maps resource names to resync periods. The flag arguments are expected to have the format "resource=seconds", where "resource" is the name of the resource and "seconds" is the number of seconds that the reconciler should wait before reconciling the resource again.
func (*Config) ParseWatchSelectors ¶ added in v0.44.0
ParseWatchSelectors parses the --watch-selectors flag and returns a label selector that can be used to filter the objects that the controller watches. If the flag is not set, the function returns nil, which means that the controller will watch all objects.
func (*Config) SetAWSAccountID ¶ added in v0.15.0
SetAWSAccountID uses sts GetCallerIdentity API to find AWS AccountId and set in Config
func (*Config) SetupLogger ¶
func (cfg *Config) SetupLogger()
SetupLogger initializes the logger used in the service controller
type Option ¶ added in v0.26.0
type Option struct {
// contains filtered or unexported fields
}
Option is a struct used to help validating the controller configuration
func WithGVKs ¶ added in v0.26.0
func WithGVKs(gvks []schema.GroupVersionKind) Option
WithGVKs instructs the configuration to validate against a set of supplied resource kinds and their respective groups.