Documentation ¶
Overview ¶
Package options provides the descheduler flags
Index ¶
- func LogOrWriteConfig(fileName string, cfg *deschedulerconfig.DeschedulerConfiguration, ...) error
- type CombinedInsecureServingOptions
- func (o *CombinedInsecureServingOptions) AddFlags(fs *pflag.FlagSet)
- func (o *CombinedInsecureServingOptions) ApplyTo(c *deschedulerappconfig.Config, ...) error
- func (o *CombinedInsecureServingOptions) ApplyToFromLoadedConfig(c *deschedulerappconfig.Config, ...) error
- func (o *CombinedInsecureServingOptions) Validate() []error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogOrWriteConfig ¶
func LogOrWriteConfig(fileName string, cfg *deschedulerconfig.DeschedulerConfiguration, completedProfiles []deschedulerconfig.DeschedulerProfile) error
LogOrWriteConfig logs the completed component config and writes it into the given file name as YAML, if either is enabled
Types ¶
type CombinedInsecureServingOptions ¶
type CombinedInsecureServingOptions struct { Healthz *apiserveroptions.DeprecatedInsecureServingOptions Metrics *apiserveroptions.DeprecatedInsecureServingOptions BindPort int // overrides the structs above on ApplyTo, ignored on ApplyToFromLoadedConfig BindAddress string // overrides the structs above on ApplyTo, ignored on ApplyToFromLoadedConfig }
CombinedInsecureServingOptions sets up to two insecure listeners for healthz and metrics. The flags override the ComponentConfig and DeprecatedInsecureServingOptions values for both.
func (*CombinedInsecureServingOptions) AddFlags ¶
func (o *CombinedInsecureServingOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags for the insecure serving options.
func (*CombinedInsecureServingOptions) ApplyTo ¶
func (o *CombinedInsecureServingOptions) ApplyTo(c *deschedulerappconfig.Config, componentConfig *deschedulerconfig.DeschedulerConfiguration) error
ApplyTo applies the insecure serving options to the given scheduler app configuration, and updates the componentConfig.
func (*CombinedInsecureServingOptions) ApplyToFromLoadedConfig ¶
func (o *CombinedInsecureServingOptions) ApplyToFromLoadedConfig(c *deschedulerappconfig.Config, componentConfig *deschedulerconfig.DeschedulerConfiguration) error
ApplyToFromLoadedConfig updates the insecure serving options from the component config and then applies it to the given scheduler app configuration.
func (*CombinedInsecureServingOptions) Validate ¶
func (o *CombinedInsecureServingOptions) Validate() []error
Validate validates the insecure serving options.
type Options ¶
type Options struct { ComponentConfig *deschedulerconfig.DeschedulerConfiguration LeaderElection *componentbaseconfig.LeaderElectionConfiguration SecureServing *apiserveroptions.SecureServingOptionsWithLoopback CombinedInsecureServing *CombinedInsecureServingOptions Metrics *metrics.Options Logs *logs.Options // ConfigFile is the location of the scheduler server's configuration file. ConfigFile string // WriteConfigTo is the path where the default configuration will be written. WriteConfigTo string // Flags hold the parsed CLI flags. Flags *cliflag.NamedFlagSets Client clientset.Interface }
Options has all the params needed to run a Scheduler
func (*Options) ApplyLeaderElectionTo ¶
func (o *Options) ApplyLeaderElectionTo(cfg *deschedulerconfig.DeschedulerConfiguration)
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 *deschedulerappconfig.Config) error
ApplyTo applies the scheduler options to the given scheduler app configuration.