Documentation
¶
Overview ¶
Package options provides the flags used for the controller manager.
Index ¶
- Constants
- func LoadConfigFromFile(file string) (*config.OneXControllerManagerConfiguration, error)
- func LogOrWriteConfig(fileName string, cfg *config.OneXControllerManagerConfiguration) error
- type ChainControllerOptions
- type GarbageCollectorControllerOptions
- type GenericControllerManagerConfigurationOptions
- func (o *GenericControllerManagerConfigurationOptions) AddFlags(fss *cliflag.NamedFlagSets, allControllers []string, ...)
- func (o *GenericControllerManagerConfigurationOptions) ApplyTo(cfg *cmconfig.GenericControllerManagerConfiguration, allControllers []string, ...) error
- func (o *GenericControllerManagerConfigurationOptions) Validate(allControllers []string, disabledControllers []string, ...) []error
- type Options
- func (o *Options) ApplyTo(c *controllermanagerconfig.Config, allControllers []string, ...) error
- func (o *Options) Complete() error
- func (o Options) Config(allControllers []string, disabledControllers []string, ...) (*controllermanagerconfig.Config, error)
- func (o *Options) Flags(allControllers []string, disabledControllers []string, ...) cliflag.NamedFlagSets
- func (o *Options) Validate(allControllers []string, disabledControllers []string, ...) error
Constants ¶
const (
// ControllerManagerUserAgent is the userAgent name when starting onex-controller managers.
ControllerManagerUserAgent = "onex-controller-manager"
)
Variables ¶
This section is empty.
Functions ¶
func LoadConfigFromFile ¶
func LoadConfigFromFile(file string) (*config.OneXControllerManagerConfiguration, error)
func LogOrWriteConfig ¶
func LogOrWriteConfig(fileName string, cfg *config.OneXControllerManagerConfiguration) error
LogOrWriteConfig logs the completed component config and writes it into the given file name as YAML, if either is enabled.
Types ¶
type ChainControllerOptions ¶
type ChainControllerOptions struct {
*chainconfig.ChainControllerConfiguration
}
ChainControllerOptions holds the ChainController options.
func NewChainControllerOptions ¶ added in v0.2.0
func NewChainControllerOptions(cfg *chainconfig.ChainControllerConfiguration) *ChainControllerOptions
func (*ChainControllerOptions) AddFlags ¶
func (o *ChainControllerOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags related to ChainController for controller manager to the specified FlagSet.
func (*ChainControllerOptions) ApplyTo ¶ added in v0.2.0
func (o *ChainControllerOptions) ApplyTo(cfg *chainconfig.ChainControllerConfiguration) error
ApplyTo fills up ChainControllerOptions config with options.
func (*ChainControllerOptions) Validate ¶ added in v0.2.0
func (o *ChainControllerOptions) Validate() []error
Validate checks validation of GarbageCollectorController.
type GarbageCollectorControllerOptions ¶
type GarbageCollectorControllerOptions struct {
*garbagecollectorconfig.GarbageCollectorControllerConfiguration
}
GarbageCollectorControllerOptions holds the GarbageCollectorController options.
func NewGarbageCollectorControllerOptions ¶ added in v0.2.0
func NewGarbageCollectorControllerOptions(cfg *garbagecollectorconfig.GarbageCollectorControllerConfiguration) *GarbageCollectorControllerOptions
func (*GarbageCollectorControllerOptions) AddFlags ¶
func (o *GarbageCollectorControllerOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags related to GarbageCollectorController for controller manager to the specified FlagSet.
func (*GarbageCollectorControllerOptions) ApplyTo ¶ added in v0.2.0
func (o *GarbageCollectorControllerOptions) ApplyTo(cfg *garbagecollectorconfig.GarbageCollectorControllerConfiguration) error
ApplyTo fills up GarbageCollectorController config with options.
func (*GarbageCollectorControllerOptions) Validate ¶ added in v0.2.0
func (o *GarbageCollectorControllerOptions) Validate() []error
Validate checks validation of GarbageCollectorController.
type GenericControllerManagerConfigurationOptions ¶
type GenericControllerManagerConfigurationOptions struct {
*cmconfig.GenericControllerManagerConfiguration
}
GenericControllerManagerConfigurationOptions holds the options which are generic.
func NewGenericControllerManagerConfigurationOptions ¶ added in v0.2.0
func NewGenericControllerManagerConfigurationOptions(cfg *cmconfig.GenericControllerManagerConfiguration) *GenericControllerManagerConfigurationOptions
func (*GenericControllerManagerConfigurationOptions) AddFlags ¶
func (o *GenericControllerManagerConfigurationOptions) AddFlags( fss *cliflag.NamedFlagSets, allControllers []string, disabledControllers []string, controllerAliasesmap map[string]string, )
AddFlags adds flags related to ChainController for controller manager to the specified FlagSet.
func (*GenericControllerManagerConfigurationOptions) ApplyTo ¶ added in v0.2.0
func (o *GenericControllerManagerConfigurationOptions) ApplyTo( cfg *cmconfig.GenericControllerManagerConfiguration, allControllers []string, disabledControllers []string, controllerAliases map[string]string, ) error
func (*GenericControllerManagerConfigurationOptions) Validate ¶ added in v0.2.0
func (o *GenericControllerManagerConfigurationOptions) Validate(allControllers []string, disabledControllers []string, controllerAliases map[string]string) []error
Validate checks validation of GenericControllerManagerConfigurationOptions.
type Options ¶
type Options struct { Generic *GenericControllerManagerConfigurationOptions GarbageCollectorController *GarbageCollectorControllerOptions ChainController *ChainControllerOptions // ConfigFile is the location of the miner controller server's configuration file. ConfigFile string // WriteConfigTo is the path where the default configuration will be written. WriteConfigTo string // The address of the Kubernetes API server (overrides any value in kubeconfig). Master string // Path to kubeconfig file with authorization and master location information. Kubeconfig string Metrics *metrics.Options Logs *logs.Options }
Options is the main context object for the onex-controller manager.
func NewOptions ¶
NewOptions creates a new Options with a default config.
func (*Options) ApplyTo ¶
func (o *Options) ApplyTo(c *controllermanagerconfig.Config, allControllers []string, disabledControllers []string, controllerAliases map[string]string) error
ApplyTo fills up onex controller manager config with options.
func (Options) Config ¶
func (o Options) Config(allControllers []string, disabledControllers []string, controllerAliases map[string]string) (*controllermanagerconfig.Config, error)
Config return a controller manager config objective.