Documentation
¶
Index ¶
- Variables
- func BindFlags(l *componentbaseconfig.LeaderElectionConfiguration, fs *pflag.FlagSet)
- func WriteConfigFile(fileName string, cfg *godelschedulerconfig.GodelSchedulerConfiguration) error
- type CombinedInsecureServingOptions
- func (o *CombinedInsecureServingOptions) AddFlags(fs *pflag.FlagSet)
- func (o *CombinedInsecureServingOptions) ApplyTo(c *schedulerappconfig.Config, ...) error
- func (o *CombinedInsecureServingOptions) ApplyToFromLoadedConfig(c *schedulerappconfig.Config, ...) error
- func (o *CombinedInsecureServingOptions) Validate() []error
- type Options
Constants ¶
This section is empty.
Variables ¶
var DefaultLeaderElectionConfig = "scheduler"
Functions ¶
func BindFlags ¶
func BindFlags(l *componentbaseconfig.LeaderElectionConfiguration, fs *pflag.FlagSet)
BindFlags binds the LeaderElectionConfiguration struct fields to a flagset
func WriteConfigFile ¶
func WriteConfigFile(fileName string, cfg *godelschedulerconfig.GodelSchedulerConfiguration) error
WriteConfigFile writes the config into the given file name as YAML.
Types ¶
type CombinedInsecureServingOptions ¶
type CombinedInsecureServingOptions struct { Healthz *apiserveroptions.DeprecatedInsecureServingOptionsWithLoopback Metrics *apiserveroptions.DeprecatedInsecureServingOptionsWithLoopback 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 *schedulerappconfig.Config, componentConfig *godelschedulerconfig.GodelSchedulerConfiguration) 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 *schedulerappconfig.Config, componentConfig *godelschedulerconfig.GodelSchedulerConfiguration) 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 { // The default values. These are overridden if ConfigFile is set or by values in InsecureServing. ComponentConfig godelschedulerconfig.GodelSchedulerConfiguration SecureServing *apiserveroptions.SecureServingOptionsWithLoopback CombinedInsecureServing *CombinedInsecureServingOptions Authentication *apiserveroptions.DelegatingAuthenticationOptions Authorization *apiserveroptions.DelegatingAuthorizationOptions // 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 // scheduler renew period in seconds SchedulerRenewIntervalSeconds int64 // TODO: The following fields are reserved for backward compatibility only. // We need to remove this logic in the near future. UnitMaxBackoffSeconds int64 UnitInitialBackoffSeconds int64 DisablePreemption bool AttemptImpactFactorOnPriority float64 }
func NewOptions ¶
NewOptions returns default scheduler app options.
func (*Options) ApplyTo ¶
func (o *Options) ApplyTo(c *schedulerappconfig.Config) error
ApplyTo applies the scheduler options to the given scheduler app configuration.
func (*Options) Config ¶
func (o *Options) Config() (*schedulerappconfig.Config, error)
Config return a scheduler config object
func (*Options) Flags ¶
func (o *Options) Flags() (nfs cliflag.NamedFlagSets)
Flags returns flags for a specific scheduler by section name