v1alpha1

package
v0.0.0-...-c951766 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the decisions v1alpha1 API group. +kubebuilder:object:generate=true +groupName=decisions.cortex

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "decisions.cortex", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Flavor

type Flavor struct {
	Name      string                       `json:"name"`
	Resources map[string]resource.Quantity `json:"requests,omitempty"`
}

func (*Flavor) DeepCopy

func (in *Flavor) DeepCopy() *Flavor

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Flavor.

func (*Flavor) DeepCopyInto

func (in *Flavor) DeepCopyInto(out *Flavor)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SchedulingDecision

type SchedulingDecision struct {
	metav1.TypeMeta `json:",inline"`

	// metadata is a standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`

	// spec defines the desired state of SchedulingDecision
	// +required
	Spec SchedulingDecisionSpec `json:"spec"`

	// status defines the observed state of SchedulingDecision
	// +optional
	Status SchedulingDecisionStatus `json:"status,omitempty,omitzero"`
}

SchedulingDecision is the Schema for the schedulingdecisions API

func (*SchedulingDecision) DeepCopy

func (in *SchedulingDecision) DeepCopy() *SchedulingDecision

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingDecision.

func (*SchedulingDecision) DeepCopyInto

func (in *SchedulingDecision) DeepCopyInto(out *SchedulingDecision)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SchedulingDecision) DeepCopyObject

func (in *SchedulingDecision) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SchedulingDecisionList

type SchedulingDecisionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SchedulingDecision `json:"items"`
}

SchedulingDecisionList contains a list of SchedulingDecision

func (*SchedulingDecisionList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingDecisionList.

func (*SchedulingDecisionList) DeepCopyInto

func (in *SchedulingDecisionList) DeepCopyInto(out *SchedulingDecisionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SchedulingDecisionList) DeepCopyObject

func (in *SchedulingDecisionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SchedulingDecisionPipelineOutputSpec

type SchedulingDecisionPipelineOutputSpec struct {
	Step        string             `json:"step"`
	Activations map[string]float64 `json:"activations,omitempty"`
}

func (*SchedulingDecisionPipelineOutputSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingDecisionPipelineOutputSpec.

func (*SchedulingDecisionPipelineOutputSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SchedulingDecisionPipelineSpec

type SchedulingDecisionPipelineSpec struct {
	Name    string                                 `json:"name"`
	Outputs []SchedulingDecisionPipelineOutputSpec `json:"outputs,omitempty"`
}

func (*SchedulingDecisionPipelineSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingDecisionPipelineSpec.

func (*SchedulingDecisionPipelineSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SchedulingDecisionRequest

type SchedulingDecisionRequest struct {
	ID          string                         `json:"id"`
	RequestedAt metav1.Time                    `json:"requestedAt"`
	EventType   SchedulingEventType            `json:"eventType"`
	Input       map[string]float64             `json:"input,omitempty"`
	Pipeline    SchedulingDecisionPipelineSpec `json:"pipeline"`

	AvailabilityZone string `json:"availabilityZone,omitempty"`

	Flavor Flavor `json:"flavor,omitempty"`
}

func (*SchedulingDecisionRequest) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingDecisionRequest.

func (*SchedulingDecisionRequest) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SchedulingDecisionResult

type SchedulingDecisionResult struct {
	ID          string `json:"id"`
	Description string `json:"description,omitempty"`
	// Final scores for each host after processing all pipeline steps.
	FinalScores map[string]float64 `json:"finalScores,omitempty"`
	// Hosts that were deleted during pipeline processing and all steps that attempted to delete them.
	DeletedHosts map[string][]string `json:"deletedHosts,omitempty"`
}

SchedulingDecisionResult represents the result of processing a single decision request.

func (*SchedulingDecisionResult) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingDecisionResult.

func (*SchedulingDecisionResult) DeepCopyInto

func (in *SchedulingDecisionResult) DeepCopyInto(out *SchedulingDecisionResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SchedulingDecisionSpec

type SchedulingDecisionSpec struct {
	Decisions []SchedulingDecisionRequest `json:"decisions"`
}

SchedulingDecisionSpec defines the desired state of SchedulingDecision.

func (*SchedulingDecisionSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingDecisionSpec.

func (*SchedulingDecisionSpec) DeepCopyInto

func (in *SchedulingDecisionSpec) DeepCopyInto(out *SchedulingDecisionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SchedulingDecisionState

type SchedulingDecisionState string
const (
	SchedulingDecisionStateResolved SchedulingDecisionState = "resolved"
	SchedulingDecisionStateError    SchedulingDecisionState = "error"
)

type SchedulingDecisionStatus

type SchedulingDecisionStatus struct {
	State SchedulingDecisionState `json:"state,omitempty"`
	Error string                  `json:"error,omitempty"`

	DecisionCount     int    `json:"decisionCount,omitempty"`
	GlobalDescription string `json:"globalDescription,omitempty"`

	Results []SchedulingDecisionResult `json:"results,omitempty"`
}

SchedulingDecisionStatus defines the observed state of SchedulingDecision.

func (*SchedulingDecisionStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingDecisionStatus.

func (*SchedulingDecisionStatus) DeepCopyInto

func (in *SchedulingDecisionStatus) DeepCopyInto(out *SchedulingDecisionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SchedulingEventType

type SchedulingEventType string
const (
	SchedulingEventTypeLiveMigration SchedulingEventType = "live-migration"
	// SchedulingEventTypeColdMigration    SchedulingEventType = "cold-migration"
	// SchedulingEventTypeEvacuation       SchedulingEventType = "evacuation"
	SchedulingEventTypeResize           SchedulingEventType = "resize"
	SchedulingEventTypeInitialPlacement SchedulingEventType = "initial-placement"
)

Jump to

Keyboard shortcuts

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