kubernetes: k8s.io/kubernetes/cmd/kube-scheduler/app/options Index | Files

package options

import "k8s.io/kubernetes/cmd/kube-scheduler/app/options"

Index

Package Files

configfile.go deprecated.go insecure_serving.go options.go

func WriteConfigFile Uses

func WriteConfigFile(fileName string, cfg *kubeschedulerconfig.KubeSchedulerConfiguration) error

WriteConfigFile writes the config into the given file name as YAML.

type CombinedInsecureServingOptions Uses

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 Uses

func (o *CombinedInsecureServingOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags for the insecure serving options.

func (*CombinedInsecureServingOptions) ApplyTo Uses

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 Uses

func (o *CombinedInsecureServingOptions) ApplyToFromLoadedConfig(c *schedulerappconfig.Config, componentConfig *kubeschedulerconfig.KubeSchedulerConfiguration) error

ApplyToFromLoadedConfig updates the insecure serving options from the component config and then appies it to the given scheduler app configuration.

func (*CombinedInsecureServingOptions) Validate Uses

func (o *CombinedInsecureServingOptions) Validate() []error

Validate validates the insecure serving options.

type DeprecatedOptions Uses

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
    AlgorithmProvider        string
}

DeprecatedOptions contains deprecated options and their flags. TODO remove these fields once the deprecated flags are removed.

func (*DeprecatedOptions) AddFlags Uses

func (o *DeprecatedOptions) AddFlags(fs *pflag.FlagSet, cfg *kubeschedulerconfig.KubeSchedulerConfiguration)

AddFlags adds flags for the deprecated options.

func (*DeprecatedOptions) ApplyTo Uses

func (o *DeprecatedOptions) ApplyTo(cfg *kubeschedulerconfig.KubeSchedulerConfiguration) error

ApplyTo sets cfg.AlgorithmSource 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. 3. --algorithm-provider to use a named algorithm provider.

func (*DeprecatedOptions) Validate Uses

func (o *DeprecatedOptions) Validate() []error

Validate validates the deprecated scheduler options.

type Options Uses

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
    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 Uses

func NewOptions() (*Options, error)

NewOptions returns default scheduler app options.

func (*Options) ApplyTo Uses

func (o *Options) ApplyTo(c *schedulerappconfig.Config) error

ApplyTo applies the scheduler options to the given scheduler app configuration.

func (*Options) Config Uses

func (o *Options) Config() (*schedulerappconfig.Config, error)

Config return a scheduler config object

func (*Options) Flags Uses

func (o *Options) Flags() (nfs cliflag.NamedFlagSets)

Flags returns flags for a specific scheduler by section name

func (*Options) Validate Uses

func (o *Options) Validate() []error

Validate validates all the required options.

Package options imports 36 packages (graph) and is imported by 9 packages. Updated 2019-11-13. Refresh now. Tools for package owners.