package app

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

Package app implements a Server object for running the scheduler.

Index

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) ApplyDefaults

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.

Source Files

server.go

Version
v1.10.8
Published
Sep 13, 2018
Platform
js/wasm
Imports
53 packages
Last checked
4 minutes ago

Tools for package owners.