package options
import "k8s.io/kubernetes/cmd/kube-scheduler/app/options"
Index ¶
- func LogOrWriteConfig(fileName string, cfg *config.KubeSchedulerConfiguration, completedProfiles []config.KubeSchedulerProfile) error
- type DeprecatedOptions
- func (o *DeprecatedOptions) AddFlags(fs *pflag.FlagSet, cfg *kubeschedulerconfig.KubeSchedulerConfiguration)
- func (o *DeprecatedOptions) ApplyTo(c *schedulerappconfig.Config)
- func (o *DeprecatedOptions) Validate() []error
- type Options
- func NewOptions() (*Options, error)
- func (o *Options) ApplyTo(c *schedulerappconfig.Config) error
- func (o *Options) Complete(nfs *cliflag.NamedFlagSets) error
- func (o *Options) Config() (*schedulerappconfig.Config, error)
- func (o *Options) Flags() (nfs cliflag.NamedFlagSets)
- func (o *Options) Validate() []error
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 { // 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 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, cfg *kubeschedulerconfig.KubeSchedulerConfiguration)
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. ComponentConfig kubeschedulerconfig.KubeSchedulerConfiguration SecureServing *apiserveroptions.SecureServingOptionsWithLoopback Authentication *apiserveroptions.DelegatingAuthenticationOptions Authorization *apiserveroptions.DelegatingAuthorizationOptions Metrics *metrics.Options Logs *logs.Options Deprecated *DeprecatedOptions // 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 }
Options has all the params needed to run a Scheduler
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) Complete ¶
func (o *Options) Complete(nfs *cliflag.NamedFlagSets) error
Complete completes the remaining instantiation of the options obj. In particular, it injects the latest internal versioned ComponentConfig.
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
func (*Options) Validate ¶
Validate validates all the required options.
Source Files ¶
configfile.go deprecated.go options.go
- Version
- v1.23.0-alpha.3
- Published
- Sep 28, 2021
- Platform
- js/wasm
- Imports
- 39 packages
- Last checked
- 2 hours ago –
Tools for package owners.