options

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAiaIpControllerConfigYaml = "/app/conf/values.yaml"
	DefaultMaxConcurrentReconciles   = 1
	DefaultEnableReverseReconcile    = false
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerOptions

type ControllerOptions struct {
	Generic        *GenericOptions
	Serving        *ServingOptions
	LeaderElection *LeaderElectionOptions
}

ControllerOptions is the main context object for the aia-ip-controller.

func NewControllerOptions

func NewControllerOptions() *ControllerOptions

NewControllerOptions creates a new ControllerOptions with a default config.

func (ControllerOptions) Config

func (o ControllerOptions) Config() (*config.Config, error)

Config return a controller config objective.

func (*ControllerOptions) Flags

Flags returns flags for a specific APIServer of Kubernetes by section name.

func (*ControllerOptions) Validate

func (o *ControllerOptions) Validate() error

Validate is used to validate the options and config before launching the controller.

type GenericOptions

type GenericOptions struct {
	// ContentType is the content type used when sending data to the server from this client.
	ContentType string
	// QPS controls the number of queries per second allowed for this connection.
	QPS float32
	// Burst allows extra queries to accumulate when a client is exceeding its rate.
	Burst int
}

GenericOptions holds the options which are generic.

func NewGenericOptions

func NewGenericOptions() *GenericOptions

NewGenericOptions returns generic configuration default values for aia controller.

func (*GenericOptions) AddFlags

func (o *GenericOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags related to generic for controller to the specified FlagSet.

func (*GenericOptions) Validate

func (o *GenericOptions) Validate() []error

Validate checks validation of GenericOptions.

type LeaderElectionOptions

type LeaderElectionOptions struct {
	Enable           bool
	Namespace        string
	ResourceLockName string
	LeaseDuration    time.Duration
	RenewDeadline    time.Duration
	RetryPeriod      time.Duration
}

func NewLeaderElectionOptions

func NewLeaderElectionOptions() *LeaderElectionOptions

NewLeaderElectionOptions returns leader elections configuration default values for aia-controller

func (*LeaderElectionOptions) AddFlags

func (o *LeaderElectionOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags related to leader election for controller to the specified FlagSet.

func (*LeaderElectionOptions) Validate

func (o *LeaderElectionOptions) Validate() []error

Validate checks validation of LeaderElectionOptions.

type ServingOptions

type ServingOptions struct {
	AiaConfigFilePath       string
	ClusterId               string
	HealthPort              int
	MaxConcurrentReconciles int
	EnableReverseReconcile  bool
}

func NewServingOptions

func NewServingOptions() *ServingOptions

NewServingOptions returns serving configuration default values for aia-controller.

func (*ServingOptions) AddFlags

func (o *ServingOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags related to serving for controller to the specified FlagSet.

func (*ServingOptions) Validate

func (o *ServingOptions) Validate() []error

Validate checks validation of ServingOptions.

Jump to

Keyboard shortcuts

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