shared

package
v0.0.0-...-ffa1b64 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

Get the name of this step, used for identification in config, logs, metrics, etc.

func (*FilterComputeCapabilitiesStep) Run

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

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

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

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

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

func (s *FilterHasEnoughCapacity) Init(alias string, db db.DB, opts conf.RawOpts) error

func (*FilterHasEnoughCapacity) Run

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

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

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

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

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL