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
- type Options
- func (o *Options) ApplyDeprecated()
- func (o *Options) ApplyLeaderElectionTo(cfg *ctrlmgrconfig.OneXControllerManagerConfiguration)
- func (o *Options) ApplyTo(c *controllermanagerconfig.Config) error
- func (o *Options) Complete() error
- func (o Options) Config() (*controllermanagerconfig.Config, error)
- func (o *Options) Flags() (fss cliflag.NamedFlagSets)
- func (o *Options) Validate() 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 (*ChainControllerOptions) AddFlags ¶
func (o *ChainControllerOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags related to ChainController for controller manager to the specified FlagSet.
type GarbageCollectorControllerOptions ¶
type GarbageCollectorControllerOptions struct {
*garbagecollectorconfig.GarbageCollectorControllerConfiguration
}
GarbageCollectorControllerOptions holds the GarbageCollectorController options.
func (*GarbageCollectorControllerOptions) AddFlags ¶
func (o *GarbageCollectorControllerOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags related to GarbageCollectorController for controller manager to the specified FlagSet.
type GenericControllerManagerConfigurationOptions ¶
type GenericControllerManagerConfigurationOptions struct {
*cmconfig.GenericControllerManagerConfiguration
}
GenericControllerManagerConfigurationOptions holds the options which are generic.
func (*GenericControllerManagerConfigurationOptions) AddFlags ¶
func (o *GenericControllerManagerConfigurationOptions) AddFlags(fss *cliflag.NamedFlagSets)
AddFlags adds flags related to ChainController for controller manager to the specified FlagSet.
type Options ¶
type Options struct { // 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 Logs *logs.Options // contains filtered or unexported fields }
Options is the main context object for the onex-controller manager.
func NewOptions ¶
NewOptions creates a new Options with a default config.
func (*Options) ApplyDeprecated ¶
func (o *Options) ApplyDeprecated()
ApplyDeprecated obtains the deprecated CLI args and set them to `o.ComponentConfig` if specified.
func (*Options) ApplyLeaderElectionTo ¶
func (o *Options) ApplyLeaderElectionTo(cfg *ctrlmgrconfig.OneXControllerManagerConfiguration)
ApplyLeaderElectionTo obtains the CLI args related with leaderelection, and override the values in `cfg`. Then the `cfg` object is injected into the `options` object.
func (*Options) ApplyTo ¶
func (o *Options) ApplyTo(c *controllermanagerconfig.Config) error
ApplyTo fills up onex controller manager config with options.
func (Options) Config ¶
func (o Options) Config() (*controllermanagerconfig.Config, error)
Config return a controller manager config objective.
func (*Options) Flags ¶
func (o *Options) Flags() (fss cliflag.NamedFlagSets)
Flags returns flags for a specific APIServer by section name.