options

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlagAPIClientServer

func FlagAPIClientServer(name string) string

FlagAPIClientServer returns API client server flag by given name.

func FlagAPIClientServerClientConfig

func FlagAPIClientServerClientConfig(name string) string

FlagAPIClientServerClientConfig returns API client server config flag by given name.

Types

type APIServerClientOptions

type APIServerClientOptions struct {
	Server             string
	ServerClientConfig string
	ContentType        string
	QPS                float32
	Burst              int32

	Name     string
	Required bool
	// contains filtered or unexported fields
}

APIServerClientOptions holds the platform apiserver client options. If it is not required, the parameter verification will not determine whether the address of the apiserver or the configuration file address has been specified.

func NewAPIServerClientOptions

func NewAPIServerClientOptions(name string, required bool) *APIServerClientOptions

NewAPIServerClientOptions creates the default APIServerClientOptions object.

func (*APIServerClientOptions) AddFlags

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

AddFlags adds flags related to debugging for API client to the specified FlagSet.

func (*APIServerClientOptions) ApplyFlags

func (o *APIServerClientOptions) ApplyFlags() []error

ApplyFlags parsing parameters from the command line or configuration file to the options instance.

type ComponentConfiguration

type ComponentConfiguration struct {
	// minResyncPeriod is the resync period in reflectors; will be random between
	// minResyncPeriod and 2*minResyncPeriod.
	MinResyncPeriod time.Duration
	// ClientConnection specifies the kubeconfig file and client connection
	// settings for the proxy server to use when communicating with the apiserver.
	ClientConnection componentconfig.ClientConnectionConfiguration
	// How long to wait between starting controller managers
	ControllerStartInterval time.Duration
	// leaderElection defines the configuration of leader election client.
	LeaderElection componentconfig.LeaderElectionConfiguration
	// 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
	// DebuggingConfiguration holds configuration for Debugging related features.
	Debugging componentconfig.DebuggingConfiguration
}

ComponentConfiguration holds configuration for a generic controller-manager

type ComponentOptions

type ComponentOptions struct {
	MinResyncPeriod time.Duration

	ControllerStartInterval time.Duration
	LeaderElection          *LeaderElectionConfiguration
	Controllers             []string
	ContainerRegistryDomain string
	// contains filtered or unexported fields
}

ComponentOptions contains configuration items related to controller manager component attributes.

func NewComponentOptions

func NewComponentOptions(allControllers []string, disabledByDefaultControllers []string) *ComponentOptions

NewComponentOptions creates a ComponentOptions object with default parameters.

func (*ComponentOptions) AddFlags

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

AddFlags adds flags for log to the specified FlagSet object.

func (*ComponentOptions) ApplyFlags

func (o *ComponentOptions) ApplyFlags() []error

ApplyFlags parsing parameters from the command line or configuration file to the options instance.

func (*ComponentOptions) ApplyTo

ApplyTo parsing parameters from the command line or configuration file to the options instance.

func (*ComponentOptions) Validate

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

Validate checks validation of GenericOptions.

type LeaderElectionConfiguration

type LeaderElectionConfiguration struct {
	// leaderElect enables a leader election client to gain leadership
	// before executing the main loop. Enable this when running replicated
	// components for high availability.
	LeaderElect bool
	// leaseDuration is the duration that non-leader candidates will wait
	// after observing a leadership renewal until attempting to acquire
	// leadership of a led but unrenewed leader slot. This is effectively the
	// maximum duration that a leader can be stopped before it is replaced
	// by another candidate. This is only applicable if leader election is
	// enabled.
	LeaseDuration time.Duration
	// renewDeadline is the interval between attempts by the acting master to
	// renew a leadership slot before it stops leading. This must be less
	// than or equal to the lease duration. This is only applicable if leader
	// election is enabled.
	RenewDeadline time.Duration
	// retryPeriod is the duration the clients should wait between attempting
	// acquisition and renewal of a leadership. This is only applicable if
	// leader election is enabled.
	RetryPeriod time.Duration
}

LeaderElectionConfiguration defines the configuration of leader election clients for components that can run with leader election enabled.

Jump to

Keyboard shortcuts

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