options

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultControllerRateLimiter

func DefaultControllerRateLimiter(opts RateLimitOptions) workqueue.RateLimiter

DefaultControllerRateLimiter provide a default rate limiter for controller, and users can tune it by corresponding flags.

Types

type Options

type Options struct {
	// Controllers is the list of controllers to enable or disable
	// '*' means "all enabled by default controllers"
	// 'foo' means "enable 'foo'"
	// '-foo' means "disable 'foo'"
	// first item for a particular name wins
	Controllers []string
	// LeaderElection defines the configuration of leader election client.
	LeaderElection componentbaseconfig.LeaderElectionConfiguration
	// HealthProbeAddress is the TCP address that the is used to serve the heath probes from k8s
	HealthProbeAddress string
	// MetricsBindAddress is the TCP address that the controller should bind to
	// for serving prometheus metrics.
	// It can be set to "0" to disable the metrics serving.
	// Defaults to ":8080".
	MetricsBindAddress string
	// EnableWebhook indicates if we will run a webhook
	EnableWebhook bool
	// EnableGuardRail indicates if we will enable fleet guard rail webhook configurations.
	EnableGuardRail bool
	// WhiteListedUsers indicates the list of user who are allowed to modify fleet resources
	WhiteListedUsers string
	// Sets the connection type for the webhook.
	WebhookClientConnectionType string
	// NetworkingAgentsEnabled indicates if we enable network agents
	NetworkingAgentsEnabled bool
	// ClusterUnhealthyThreshold is the duration of failure for the cluster to be considered unhealthy.
	ClusterUnhealthyThreshold metav1.Duration
	// WorkPendingGracePeriod represents the grace period after a work is created/updated.
	// We consider a work failed if a work's last applied condition doesn't change after period.
	WorkPendingGracePeriod metav1.Duration
	// SkippedPropagatingAPIs indicates comma separated resources that should be skipped for propagating.
	SkippedPropagatingAPIs string
	// SkippedPropagatingNamespaces is a list of namespaces that will be skipped for propagating.
	SkippedPropagatingNamespaces string
	// HubQPS is the QPS to use while talking with hub-apiserver. Default is 20.0.
	HubQPS float64
	// HubBurst is the burst to allow while talking with hub-apiserver. Default is 100.
	HubBurst int
	// ResyncPeriod is the base frequency the informers are resynced. Defaults is 5 minutes.
	ResyncPeriod metav1.Duration
	// ConcurrentClusterPlacementSyncs is the number of cluster `placement` reconcilers that are
	// allowed to sync concurrently.
	ConcurrentClusterPlacementSyncs int
	// ConcurrentResourceChangeSyncs is the number of resource change reconcilers that are
	// allowed to sync concurrently.
	ConcurrentResourceChangeSyncs int
	// ConcurrentMemberClusterSyncs is the number of `memberCluster` reconcilers that are
	// allowed to sync concurrently.
	ConcurrentMemberClusterSyncs int
	// RateLimiterOpts is the ratelimit parameters for the work queue
	RateLimiterOpts RateLimitOptions
	// EnableV1Alpha1APIs enables the agents to watch the v1alpha1 CRs.
	EnableV1Alpha1APIs bool
	// EnableV1Beta1APIs enables the agents to watch the v1beta1 CRs.
	EnableV1Beta1APIs bool
}

Options contains everything necessary to create and run controller-manager.

func NewOptions

func NewOptions() *Options

NewOptions builds an empty options.

func (*Options) AddFlags

func (o *Options) AddFlags(flags *flag.FlagSet)

AddFlags adds flags to the specified FlagSet.

func (*Options) Validate

func (o *Options) Validate() field.ErrorList

Validate checks Options and return a slice of found errs.

type RateLimitOptions

type RateLimitOptions struct {
	// RateLimiterBaseDelay is the base delay for ItemExponentialFailureRateLimiter.
	RateLimiterBaseDelay time.Duration

	// RateLimiterMaxDelay is the max delay for ItemExponentialFailureRateLimiter.
	RateLimiterMaxDelay time.Duration

	// RateLimiterQPS is the qps for BucketRateLimiter
	RateLimiterQPS int

	// RateLimiterBucketSize is the bucket size for BucketRateLimiter
	RateLimiterBucketSize int
}

RateLimitOptions are options for rate limiter.

func (*RateLimitOptions) AddFlags

func (o *RateLimitOptions) AddFlags(fs *flag.FlagSet)

AddFlags adds flags to the specified FlagSet.

type WebhookClientConnectionType added in v0.6.2

type WebhookClientConnectionType string
const (
	URL     WebhookClientConnectionType = "url"
	Service WebhookClientConnectionType = "service"
)

Jump to

Keyboard shortcuts

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