app

package
v1.10.1-beta.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2018 License: Apache-2.0 Imports: 53 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 NewSchedulerCommand

func NewSchedulerCommand() *cobra.Command

NewSchedulerCommand creates a *cobra.Command object with default parameters

Types

type Options

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

func NewOptions() (*Options, error)

func (*Options) AddFlags

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

AddFlags adds flags for a specific SchedulerServer to the specified FlagSet

func (*Options) Complete

func (o *Options) Complete() error

func (*Options) Run

func (o *Options) Run() error

func (*Options) Validate

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

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