Documentation ¶
Index ¶
- Variables
- func ConvertConfigurationForSimulator(versioned *configv1.KubeSchedulerConfiguration) (*configv1.KubeSchedulerConfiguration, error)
- func ConvertSchedulerConfigToInternalConfig(versioned *configv1.KubeSchedulerConfiguration) (*config.KubeSchedulerConfiguration, error)
- type ExtenderService
- type Service
- func (s *Service) ExtenderService() ExtenderService
- func (s *Service) GetSchedulerConfig() (*configv1.KubeSchedulerConfiguration, error)
- func (s *Service) ResetScheduler() error
- func (s *Service) RestartScheduler(cfg *configv1.KubeSchedulerConfiguration) error
- func (s *Service) SetSchedulerConfig(cfg *configv1.KubeSchedulerConfiguration)
- func (s *Service) ShutdownScheduler()
Constants ¶
This section is empty.
Variables ¶
var ErrServiceDisabled = errors.New("scheduler service is disabled")
Functions ¶
func ConvertConfigurationForSimulator ¶
func ConvertConfigurationForSimulator(versioned *configv1.KubeSchedulerConfiguration) (*configv1.KubeSchedulerConfiguration, error)
ConvertConfigurationForSimulator convert KubeSchedulerConfiguration to apply scheduler on simulator (1) It replaces all default-plugins with plugins for simulator. (2) It replaces Extenders config so that the connection is directed to the simulator server. (3) It converts KubeSchedulerConfiguration from configv1.KubeSchedulerConfiguration to config.KubeSchedulerConfiguration.
func ConvertSchedulerConfigToInternalConfig ¶
func ConvertSchedulerConfigToInternalConfig(versioned *configv1.KubeSchedulerConfiguration) (*config.KubeSchedulerConfiguration, error)
Types ¶
type ExtenderService ¶
type ExtenderService interface { Filter(id int, args extenderv1.ExtenderArgs) (*extenderv1.ExtenderFilterResult, error) Prioritize(id int, args extenderv1.ExtenderArgs) (*extenderv1.HostPriorityList, error) Preempt(id int, args extenderv1.ExtenderPreemptionArgs) (*extenderv1.ExtenderPreemptionResult, error) Bind(id int, args extenderv1.ExtenderBindingArgs) (*extenderv1.ExtenderBindingResult, error) }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages scheduler.
func NewSchedulerService ¶
func NewSchedulerService(client clientset.Interface, restclientCfg *restclient.Config, initialSchedulerCfg *configv1.KubeSchedulerConfiguration, simulatorPort int) *Service
NewSchedulerService starts scheduler and return *Service.
func (*Service) ExtenderService ¶
func (s *Service) ExtenderService() ExtenderService
ExtenderService returns ExtenderService interface.
func (*Service) GetSchedulerConfig ¶
func (s *Service) GetSchedulerConfig() (*configv1.KubeSchedulerConfiguration, error)
func (*Service) ResetScheduler ¶
func (*Service) RestartScheduler ¶
func (s *Service) RestartScheduler(cfg *configv1.KubeSchedulerConfiguration) error
RestartScheduler restarts the debuggable scheduler with a new config. Specifically, it updates the config file, which is also mounted on the debuggable scheduler, and then restart the debuggable scheduler.
func (*Service) SetSchedulerConfig ¶ added in v0.4.0
func (s *Service) SetSchedulerConfig(cfg *configv1.KubeSchedulerConfiguration)
func (*Service) ShutdownScheduler ¶
func (s *Service) ShutdownScheduler()
Directories ¶
Path | Synopsis |
---|---|
mock_extender
Package mock_extender is a generated GoMock package.
|
Package mock_extender is a generated GoMock package. |
mock
Package plugin is a generated GoMock package.
|
Package plugin is a generated GoMock package. |
mock_storereflector
Package mock_storereflector is a generated GoMock package.
|
Package mock_storereflector is a generated GoMock package. |