Documentation
¶
Index ¶
- func LogOrWriteConfig(fileName string, cfg *config.KubeSchedulerConfiguration, ...) 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 DeprecatedOptions
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogOrWriteConfig ¶ added in v1.20.0
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 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 *kubeschedulerconfig.KubeSchedulerConfiguration) 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 *kubeschedulerconfig.KubeSchedulerConfiguration) 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 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 // The fields below here are placeholders for flags that can't be directly // mapped into componentconfig.KubeSchedulerConfiguration. PolicyConfigFile string PolicyConfigMapName string PolicyConfigMapNamespace string UseLegacyPolicyConfig bool }
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) ApplyTo ¶
func (o *DeprecatedOptions) ApplyTo(c *schedulerappconfig.Config)
ApplyTo sets cfg.PolicySource from flags passed on the command line in the following precedence order:
1. --use-legacy-policy-config to use a policy file. 2. --policy-configmap to use a policy config map value.
func (*DeprecatedOptions) Validate ¶
func (o *DeprecatedOptions) Validate() []error
Validate validates the deprecated scheduler options.
type Options ¶
type Options struct { // The default values. These are overridden if ConfigFile is set or by values in InsecureServing. ComponentConfig *kubeschedulerconfig.KubeSchedulerConfiguration SecureServing *apiserveroptions.SecureServingOptionsWithLoopback CombinedInsecureServing *CombinedInsecureServingOptions 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 ¶ added in v1.22.4
func (o *Options) ApplyDeprecated()
ApplyDeprecated obtains the deprecated CLI args and set them to `o.ComponentConfig` if specified.
func (*Options) ApplyLeaderElectionTo ¶ added in v1.22.4
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.