Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogOrWriteConfig ¶
func LogOrWriteConfig(fileName string, cfg *config.KubeSchedulerConfiguration, completedProfiles []config.KubeSchedulerProfile) error
LogOrWriteConfig logs the completed component config and writes it into the given file name as YAML, if either is enabled
Types ¶
type DeprecatedOptions ¶
type DeprecatedOptions struct {
componentbaseconfig.DebuggingConfiguration
componentbaseconfig.ClientConnectionConfiguration
// Note that only the deprecated options (lock-object-name and lock-object-namespace) are populated here.
componentbaseconfig.LeaderElectionConfiguration
Port int
}
DeprecatedOptions contains deprecated options and their flags. TODO remove these fields once the deprecated flags are removed.
func (*DeprecatedOptions) AddFlags ¶
func (o *DeprecatedOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags for the deprecated options.
func (*DeprecatedOptions) Validate ¶
func (o *DeprecatedOptions) Validate() []error
Validate validates the deprecated scheduler options.
type Options ¶
type Options struct {
// The default values.
ComponentConfig *kubeschedulerconfig.KubeSchedulerConfiguration
SecureServing *apiserveroptions.SecureServingOptionsWithLoopback
Authentication *apiserveroptions.DelegatingAuthenticationOptions
Authorization *apiserveroptions.DelegatingAuthorizationOptions
Metrics *metrics.Options
Logs *logs.Options
Deprecated *DeprecatedOptions
LeaderElection *componentbaseconfig.LeaderElectionConfiguration
// 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
Master string
// Flags hold the parsed CLI flags.
Flags *cliflag.NamedFlagSets
}
Options has all the params needed to run a Scheduler
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 *kubeschedulerconfig.KubeSchedulerConfiguration)
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 *schedulerappconfig.Config) error
ApplyTo applies the scheduler options to the given scheduler app configuration.