Documentation
¶
Index ¶
- type FilterComputeCapabilitiesStep
- type FilterCorrectAZStep
- type FilterDisabledStep
- type FilterExternalCustomerStep
- type FilterExternalCustomerStepOpts
- type FilterHasAcceleratorsStep
- type FilterHasEnoughCapacity
- type FilterHasRequestedTraits
- type FilterHostInstructionsStep
- type FilterPackedVirtqueueStep
- type FilterProjectAggregatesStep
- type ResourceBalancingStep
- type ResourceBalancingStepOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterComputeCapabilitiesStep ¶
type FilterComputeCapabilitiesStep struct {
scheduler.BaseStep[api.ExternalSchedulerRequest, scheduler.EmptyStepOpts]
}
func (*FilterComputeCapabilitiesStep) GetName ¶
func (s *FilterComputeCapabilitiesStep) GetName() string
Get the name of this step, used for identification in config, logs, metrics, etc.
func (*FilterComputeCapabilitiesStep) Run ¶
func (s *FilterComputeCapabilitiesStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduler.StepResult, error)
Check the capabilities of each host and if they match the extra spec provided in the request spec flavor.
type FilterCorrectAZStep ¶
type FilterCorrectAZStep struct {
scheduler.BaseStep[api.ExternalSchedulerRequest, scheduler.EmptyStepOpts]
}
func (*FilterCorrectAZStep) GetName ¶
func (s *FilterCorrectAZStep) GetName() string
Get the name of this step, used for identification in config, logs, metrics, etc.
func (*FilterCorrectAZStep) Run ¶
func (s *FilterCorrectAZStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduler.StepResult, error)
Only get hosts in the requested az.
type FilterDisabledStep ¶
type FilterDisabledStep struct {
scheduler.BaseStep[api.ExternalSchedulerRequest, scheduler.EmptyStepOpts]
}
func (*FilterDisabledStep) GetName ¶
func (s *FilterDisabledStep) GetName() string
Get the name of this step, used for identification in config, logs, metrics, etc.
func (*FilterDisabledStep) Run ¶
func (s *FilterDisabledStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduler.StepResult, error)
Only get hosts that are not disabled or down.
type FilterExternalCustomerStep ¶
type FilterExternalCustomerStep struct {
scheduler.BaseStep[api.ExternalSchedulerRequest, FilterExternalCustomerStepOpts]
}
func (*FilterExternalCustomerStep) GetName ¶
func (s *FilterExternalCustomerStep) GetName() string
Get the name of this step, used for identification in config, logs, metrics, etc.
func (*FilterExternalCustomerStep) Run ¶
func (s *FilterExternalCustomerStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduler.StepResult, error)
Prefix-match the domain name for external customer domains and filter out hosts that are not intended for external customers.
type FilterExternalCustomerStepOpts ¶
type FilterExternalCustomerStepOpts struct {
CustomerDomainNamePrefixes []string `json:"domainNamePrefixes"`
CustomerIgnoredDomainNames []string `json:"ignoredDomainNames"`
}
func (FilterExternalCustomerStepOpts) Validate ¶
func (opts FilterExternalCustomerStepOpts) Validate() error
type FilterHasAcceleratorsStep ¶
type FilterHasAcceleratorsStep struct {
scheduler.BaseStep[api.ExternalSchedulerRequest, scheduler.EmptyStepOpts]
}
func (*FilterHasAcceleratorsStep) GetName ¶
func (s *FilterHasAcceleratorsStep) GetName() string
Get the name of this step, used for identification in config, logs, metrics, etc.
func (*FilterHasAcceleratorsStep) Run ¶
func (s *FilterHasAcceleratorsStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduler.StepResult, error)
If requested, only get hosts with accelerators.
type FilterHasEnoughCapacity ¶
type FilterHasEnoughCapacity struct {
scheduler.BaseStep[api.ExternalSchedulerRequest, scheduler.EmptyStepOpts]
// Kubernetes client.
Client client.Client
}
func (*FilterHasEnoughCapacity) GetName ¶
func (s *FilterHasEnoughCapacity) GetName() string
func (*FilterHasEnoughCapacity) Run ¶
func (s *FilterHasEnoughCapacity) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduler.StepResult, error)
Filter hosts that don't have enough capacity to run the requested flavor.
type FilterHasRequestedTraits ¶
type FilterHasRequestedTraits struct {
scheduler.BaseStep[api.ExternalSchedulerRequest, scheduler.EmptyStepOpts]
}
func (*FilterHasRequestedTraits) GetName ¶
func (s *FilterHasRequestedTraits) GetName() string
func (*FilterHasRequestedTraits) Run ¶
func (s *FilterHasRequestedTraits) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduler.StepResult, error)
Filter hosts that do not have the requested traits given by the extra spec: - "trait:<trait>": "forbidden" means the host must not have the specified trait. - "trait:<trait>": "required" means the host must have the specified trait.
type FilterHostInstructionsStep ¶
type FilterHostInstructionsStep struct {
scheduler.BaseStep[api.ExternalSchedulerRequest, scheduler.EmptyStepOpts]
}
func (*FilterHostInstructionsStep) GetName ¶
func (s *FilterHostInstructionsStep) GetName() string
Get the name of this step, used for identification in config, logs, metrics, etc.
func (*FilterHostInstructionsStep) Run ¶
func (s *FilterHostInstructionsStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduler.StepResult, error)
Filter hosts based on instructions given in the request spec. Supported are: - spec.ignore_hosts: Filter out all hosts in this list. - spec.force_hosts: Include only hosts in this list.
type FilterPackedVirtqueueStep ¶
type FilterPackedVirtqueueStep struct {
scheduler.BaseStep[api.ExternalSchedulerRequest, scheduler.EmptyStepOpts]
}
func (*FilterPackedVirtqueueStep) GetName ¶
func (s *FilterPackedVirtqueueStep) GetName() string
Get the name of this step, used for identification in config, logs, metrics, etc.
func (*FilterPackedVirtqueueStep) Run ¶
func (s *FilterPackedVirtqueueStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduler.StepResult, error)
If requested, only get hosts with packed virtqueues.
type FilterProjectAggregatesStep ¶
type FilterProjectAggregatesStep struct {
scheduler.BaseStep[api.ExternalSchedulerRequest, scheduler.EmptyStepOpts]
}
func (*FilterProjectAggregatesStep) GetName ¶
func (s *FilterProjectAggregatesStep) GetName() string
Get the name of this step, used for identification in config, logs, metrics, etc.
func (*FilterProjectAggregatesStep) Run ¶
func (s *FilterProjectAggregatesStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduler.StepResult, error)
Lock certain hosts for certain projects, based on the aggregate metadata. Note that hosts without aggregate tenant filter are still accessible.
type ResourceBalancingStep ¶
type ResourceBalancingStep struct {
// BaseStep is a helper struct that provides common functionality for all steps.
scheduler.BaseStep[api.ExternalSchedulerRequest, ResourceBalancingStepOpts]
}
Step to balance VMs on hosts based on the host's available resources.
func (*ResourceBalancingStep) GetName ¶
func (s *ResourceBalancingStep) GetName() string
Get the name of this step, used for identification in config, logs, metrics, etc.
func (*ResourceBalancingStep) Run ¶
func (s *ResourceBalancingStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduler.StepResult, error)
Pack VMs on hosts based on their flavor.
type ResourceBalancingStepOpts ¶
type ResourceBalancingStepOpts struct {
CPUEnabled bool `json:"cpuEnabled"`
CPUUtilizedLowerBoundPct float64 `json:"cpuUtilizedLowerBoundPct"` // -> mapped to ActivationLowerBound
CPUUtilizedUpperBoundPct float64 `json:"cpuUtilizedUpperBoundPct"` // -> mapped to ActivationUpperBound
CPUUtilizedActivationLowerBound float64 `json:"cpuUtilizedActivationLowerBound"`
CPUUtilizedActivationUpperBound float64 `json:"cpuUtilizedActivationUpperBound"`
RAMEnabled bool `json:"ramEnabled"`
RAMUtilizedLowerBoundPct float64 `json:"ramUtilizedLowerBoundPct"` // -> mapped to ActivationLowerBound
RAMUtilizedUpperBoundPct float64 `json:"ramUtilizedUpperBoundPct"` // -> mapped to ActivationUpperBound
RAMUtilizedActivationLowerBound float64 `json:"ramUtilizedActivationLowerBound"`
RAMUtilizedActivationUpperBound float64 `json:"ramUtilizedActivationUpperBound"`
DiskEnabled bool `json:"diskEnabled"`
DiskUtilizedLowerBoundPct float64 `json:"diskUtilizedLowerBoundPct"` // -> mapped to ActivationLowerBound
DiskUtilizedUpperBoundPct float64 `json:"diskUtilizedUpperBoundPct"` // -> mapped to ActivationUpperBound
DiskUtilizedActivationLowerBound float64 `json:"diskUtilizedActivationLowerBound"`
DiskUtilizedActivationUpperBound float64 `json:"diskUtilizedActivationUpperBound"`
CPUAfterEnabled bool `json:"cpuAfterEnabled"`
CPUUtilizedAfterLowerBoundPct float64 `json:"cpuUtilizedAfterLowerBoundPct"` // -> mapped to ActivationLowerBound
CPUUtilizedAfterUpperBoundPct float64 `json:"cpuUtilizedAfterUpperBoundPct"` // -> mapped to ActivationUpperBound
CPUUtilizedAfterActivationLowerBound float64 `json:"cpuUtilizedAfterActivationLowerBound"`
CPUUtilizedAfterActivationUpperBound float64 `json:"cpuUtilizedAfterActivationUpperBound"`
RAMAfterEnabled bool `json:"ramAfterEnabled"`
RAMUtilizedAfterLowerBoundPct float64 `json:"ramUtilizedAfterLowerBoundPct"` // -> mapped to ActivationLowerBound
RAMUtilizedAfterUpperBoundPct float64 `json:"ramUtilizedAfterUpperBoundPct"` // -> mapped to ActivationUpperBound
RAMUtilizedAfterActivationLowerBound float64 `json:"ramUtilizedAfterActivationLowerBound"`
RAMUtilizedAfterActivationUpperBound float64 `json:"ramUtilizedAfterActivationUpperBound"`
DiskAfterEnabled bool `json:"diskAfterEnabled"`
DiskUtilizedAfterLowerBoundPct float64 `json:"diskUtilizedAfterLowerBoundPct"` // -> mapped to ActivationLowerBound
DiskUtilizedAfterUpperBoundPct float64 `json:"diskUtilizedAfterUpperBoundPct"` // -> mapped to ActivationUpperBound
DiskUtilizedAfterActivationLowerBound float64 `json:"diskUtilizedAfterActivationLowerBound"`
DiskUtilizedAfterActivationUpperBound float64 `json:"diskUtilizedAfterActivationUpperBound"`
}
Options for the scheduling step, given through the step config in the service yaml file.
func (ResourceBalancingStepOpts) Validate ¶
func (o ResourceBalancingStepOpts) Validate() error