app

package
v1.9.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2017 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Overview

Package app implements a Server object for running the scheduler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags added in v1.9.0

func AddFlags(options *Options, fs *pflag.FlagSet)

AddFlags adds flags for a specific SchedulerServer to the specified FlagSet

func NewSchedulerCommand added in v1.1.1

func NewSchedulerCommand() *cobra.Command

NewSchedulerCommand creates a *cobra.Command object with default parameters

Types

type Options added in v1.9.0

type Options struct {
	// ConfigFile is the location of the scheduler server's configuration file.
	ConfigFile string
	// contains filtered or unexported fields
}

SchedulerServer has all the context and params needed to run a Scheduler

func NewOptions added in v1.9.0

func NewOptions() (*Options, error)

func (*Options) ApplyDefaults added in v1.9.0

func (*Options) Complete added in v1.9.0

func (o *Options) Complete() error

func (*Options) Run added in v1.9.0

func (o *Options) Run() error

func (*Options) Validate added in v1.9.0

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

Validate validates all the required options.

type SchedulerServer

type SchedulerServer struct {
	SchedulerName                  string
	Client                         clientset.Interface
	InformerFactory                informers.SharedInformerFactory
	PodInformer                    coreinformers.PodInformer
	AlgorithmSource                componentconfig.SchedulerAlgorithmSource
	HardPodAffinitySymmetricWeight int32
	EventClient                    v1core.EventsGetter
	Recorder                       record.EventRecorder
	Broadcaster                    record.EventBroadcaster
	// LeaderElection is optional.
	LeaderElection *leaderelection.LeaderElectionConfig
	// HealthzServer is optional.
	HealthzServer *http.Server
	// MetricsServer is optional.
	MetricsServer *http.Server
}

SchedulerServer represents all the parameters required to start the Kubernetes scheduler server.

func NewSchedulerServer

func NewSchedulerServer(config *componentconfig.KubeSchedulerConfiguration, master string) (*SchedulerServer, error)

NewSchedulerServer creates a runnable SchedulerServer from configuration.

func (*SchedulerServer) Run

func (s *SchedulerServer) Run(stop chan struct{}) error

Run runs the SchedulerServer. This should never exit.

func (*SchedulerServer) SchedulerConfig added in v1.9.0

func (s *SchedulerServer) SchedulerConfig() (*scheduler.Config, error)

SchedulerConfig creates the scheduler configuration. This is exposed for use by tests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL