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(registryOptions ...Option) *cobra.Command

NewSchedulerCommand creates a *cobra.Command object with default parameters and registryOptions

func Run

Run executes the scheduler based on the given configuration. It only returns on error or when context is done.

func Setup

func Setup(ctx context.Context, opts *options.Options, outOfTreeRegistryOptions ...Option) (*schedulerserverconfig.CompletedConfig, *scheduler.Scheduler, error)

Setup creates a completed config and a scheduler based on the command args and options

Types

type Option

type Option func(runtime.Registry) error

Option configures a framework.Registry.

func WithPlugin

func WithPlugin(name string, factory runtime.PluginFactory) Option

WithPlugin creates an Option based on plugin name and factory. Please don't remove this function: it is used to register out-of-tree plugins, hence there are no references to it from the kubernetes scheduler code base.

Source Files

server.go

Directories

PathSynopsis
cmd/kube-scheduler/app/config
cmd/kube-scheduler/app/options
cmd/kube-scheduler/app/testing
Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
52 packages
Last checked
5 hours ago

Tools for package owners.