v1alpha1

package
v0.0.0-...-b0c575c Latest Latest
Warning

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

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

Documentation

Overview

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

Index

Constants

View Source
const (
	// Something went wrong during the syncing of the datasource.
	DatasourceConditionError = "Error"
	// The datasource is waiting for a dependency datasource to become available.
	DatasourceConditionWaiting = "Waiting"
)
View Source
const (
	// Something went wrong during the calculation of the decision.
	DecisionConditionError = "Error"
)
View Source
const (
	// Something went wrong during the descheduling process.
	DeschedulingConditionError = "Error"
)
View Source
const (
	// Something went wrong during the kpi reconciliation.
	KPIConditionError = "Error"
)
View Source
const (
	// Something went wrong during the extraction of the knowledge.
	KnowledgeConditionError = "Error"
)
View Source
const (
	// Something went wrong during the pipeline reconciliation.
	PipelineConditionError = "Error"
)
View Source
const (
	// Something went wrong during the handling of the reservation.
	ReservationConditionError = "Error"
)
View Source
const (
	// Something went wrong during the step reconciliation.
	StepConditionError = "Error"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "cortex.cloud", 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
)
View Source
var (
	// Some datasources may depend on other datasources to be present.
	// If these aren't yet available, this will be the returned error.
	ErrWaitingForDependencyDatasource = errors.New("waiting for dependency datasource to become available")
)

Functions

func BoxFeatureList

func BoxFeatureList[T any](features []T) (runtime.RawExtension, error)

Convert a list of strongly typed feature structs to raw features.

func UnboxFeatureList

func UnboxFeatureList[T any](raw runtime.RawExtension) ([]T, error)

Convert raw features to a list of strongly typed feature structs.

Types

type CinderDatasource

type CinderDatasource struct {
	// The type of resource to sync.
	Type CinderDatasourceType `json:"type"`
}

func (*CinderDatasource) DeepCopy

func (in *CinderDatasource) DeepCopy() *CinderDatasource

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

func (*CinderDatasource) DeepCopyInto

func (in *CinderDatasource) DeepCopyInto(out *CinderDatasource)

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

type CinderDatasourceType

type CinderDatasourceType string
const (
	CinderDatasourceTypeStoragePools CinderDatasourceType = "storagePools"
)

type Datasource

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

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

	// spec defines the desired state of Datasource
	// +required
	Spec DatasourceSpec `json:"spec"`

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

Datasource is the Schema for the datasources API

func (*Datasource) DeepCopy

func (in *Datasource) DeepCopy() *Datasource

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

func (*Datasource) DeepCopyInto

func (in *Datasource) DeepCopyInto(out *Datasource)

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

func (*Datasource) DeepCopyObject

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

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

type DatasourceList

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

DatasourceList contains a list of Datasource

func (*DatasourceList) DeepCopy

func (in *DatasourceList) DeepCopy() *DatasourceList

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

func (*DatasourceList) DeepCopyInto

func (in *DatasourceList) DeepCopyInto(out *DatasourceList)

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

func (*DatasourceList) DeepCopyObject

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

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

type DatasourceSpec

type DatasourceSpec struct {
	// The operator by which this datasource should be synced.
	Operator string `json:"operator,omitempty"`

	// If given, configures a Prometheus datasource to fetch.
	// Type must be set to "prometheus" if this is used.
	// +kubebuilder:validation:Optional
	Prometheus PrometheusDatasource `json:"prometheus"`
	// If given, configures an OpenStack datasource to fetch.
	// Type must be set to "openstack" if this is used.
	// +kubebuilder:validation:Optional
	OpenStack OpenStackDatasource `json:"openstack,omitempty"`

	// The type of the datasource.
	Type DatasourceType `json:"type"`

	// Database credentials to use for the datasource.
	// The secret should contain the following keys:
	// - "username": The database username.
	// - "password": The database password.
	// - "host": The database host.
	// - "port": The database port.
	// - "database": The database name.
	DatabaseSecretRef corev1.SecretReference `json:"databaseSecretRef"`

	// Kubernetes secret ref for an optional sso certificate to access the host.
	// The secret should contain two keys: "cert" and "key".
	// +kubebuilder:validation:Optional
	SSOSecretRef *corev1.SecretReference `json:"ssoSecretRef,omitempty"`
}

func (*DatasourceSpec) DeepCopy

func (in *DatasourceSpec) DeepCopy() *DatasourceSpec

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

func (*DatasourceSpec) DeepCopyInto

func (in *DatasourceSpec) DeepCopyInto(out *DatasourceSpec)

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

type DatasourceStatus

type DatasourceStatus struct {
	// When the datasource was last successfully synced.
	LastSynced metav1.Time `json:"lastSynced,omitempty"`
	// The number of objects currently stored for this datasource.
	NumberOfObjects int64 `json:"numberOfObjects,omitempty"`
	// The time it took to perform the last sync.
	Took metav1.Duration `json:"took"`
	// Planned time for the next sync.
	NextSyncTime metav1.Time `json:"nextSyncTime,omitempty"`

	// The current status conditions of the datasource.
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

func (*DatasourceStatus) DeepCopy

func (in *DatasourceStatus) DeepCopy() *DatasourceStatus

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

func (*DatasourceStatus) DeepCopyInto

func (in *DatasourceStatus) DeepCopyInto(out *DatasourceStatus)

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

func (*DatasourceStatus) IsReady

func (s *DatasourceStatus) IsReady() bool

Helper function to check if the datasource is ready.

type DatasourceType

type DatasourceType string
const (
	// DatasourceTypePrometheus indicates a Prometheus datasource.
	DatasourceTypePrometheus DatasourceType = "prometheus"
	// DatasourceTypeOpenStack indicates an OpenStack datasource.
	DatasourceTypeOpenStack DatasourceType = "openstack"
)

type Decision

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

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

	// spec defines the desired state of Decision
	// +required
	Spec DecisionSpec `json:"spec"`

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

Decision is the Schema for the decisions API

func (*Decision) DeepCopy

func (in *Decision) DeepCopy() *Decision

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

func (*Decision) DeepCopyInto

func (in *Decision) DeepCopyInto(out *Decision)

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

func (*Decision) DeepCopyObject

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

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

type DecisionList

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

DecisionList contains a list of Decision

func (*DecisionList) DeepCopy

func (in *DecisionList) DeepCopy() *DecisionList

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

func (*DecisionList) DeepCopyInto

func (in *DecisionList) DeepCopyInto(out *DecisionList)

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

func (*DecisionList) DeepCopyObject

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

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

type DecisionResult

type DecisionResult struct {
	// Raw input weights to the pipeline.
	// +kubebuilder:validation:Optional
	RawInWeights map[string]float64 `json:"rawInWeights"`
	// Normalized input weights to the pipeline.
	// +kubebuilder:validation:Optional
	NormalizedInWeights map[string]float64 `json:"normalizedInWeights"`
	// Outputs of the decision pipeline including the activations used
	// to make the final ordering of compute hosts.
	// +kubebuilder:validation:Optional
	StepResults []StepResult `json:"stepResults,omitempty"`
	// Aggregated output weights from the pipeline.
	// +kubebuilder:validation:Optional
	AggregatedOutWeights map[string]float64 `json:"aggregatedOutWeights"`
	// Final ordered list of hosts from most preferred to least preferred.
	// +kubebuilder:validation:Optional
	OrderedHosts []string `json:"orderedHosts,omitempty"`
	// The first element of the ordered hosts is considered the target host.
	// +kubebuilder:validation:Optional
	TargetHost *string `json:"targetHost,omitempty"`
}

func (*DecisionResult) DeepCopy

func (in *DecisionResult) DeepCopy() *DecisionResult

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

func (*DecisionResult) DeepCopyInto

func (in *DecisionResult) DeepCopyInto(out *DecisionResult)

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

type DecisionSpec

type DecisionSpec struct {
	// The operator by which this decision should be extracted.
	Operator string `json:"operator,omitempty"`

	// A reference to the pipeline that should be used for this decision.
	// This reference can be used to look up the pipeline definition and its
	// scheduler step configuration for additional context.
	PipelineRef corev1.ObjectReference `json:"pipelineRef"`

	// An identifier for the underlying resource to be scheduled.
	// For example, this can be the UUID of a nova instance or cinder volume.
	// This can be used to correlate multiple decisions for the same resource.
	ResourceID string `json:"resourceID"`

	// The type of decision, indicating what has initiated this decision.
	Type DecisionType `json:"type"`
	// If the type is "nova", this field contains the raw nova decision request.
	// +kubebuilder:validation:Optional
	NovaRaw *runtime.RawExtension `json:"novaRaw,omitempty"`
	// If the type is "cinder", this field contains the raw cinder decision request.
	// +kubebuilder:validation:Optional
	CinderRaw *runtime.RawExtension `json:"cinderRaw,omitempty"`
	// If the type is "manila", this field contains the raw manila decision request.
	// +kubebuilder:validation:Optional
	ManilaRaw *runtime.RawExtension `json:"manilaRaw,omitempty"`
	// If the type is "machine", this field contains the machine reference.
	// +kubebuilder:validation:Optional
	MachineRef *corev1.ObjectReference `json:"machineRef,omitempty"`
}

func (*DecisionSpec) DeepCopy

func (in *DecisionSpec) DeepCopy() *DecisionSpec

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

func (*DecisionSpec) DeepCopyInto

func (in *DecisionSpec) DeepCopyInto(out *DecisionSpec)

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

type DecisionStatus

type DecisionStatus struct {
	// The time it took to schedule.
	// +kubebuilder:validation:Optional
	Took metav1.Duration `json:"took"`

	// The result of this decision.
	// +kubebuilder:validation:Optional
	Result *DecisionResult `json:"result,omitempty"`

	// If there were previous decisions for the underlying resource, they can
	// be resolved here to provide historical context for the decision.
	// +kubebuilder:validation:Optional
	History *[]corev1.ObjectReference `json:"history,omitempty"`

	// The number of decisions that preceded this one for the same resource.
	// +kubebuilder:validation:Optional
	Precedence *int `json:"precedence,omitempty"`

	// A human-readable explanation of the decision result.
	// +kubebuilder:validation:Optional
	Explanation string `json:"explanation,omitempty"`

	// The current status conditions of the decision.
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

func (*DecisionStatus) DeepCopy

func (in *DecisionStatus) DeepCopy() *DecisionStatus

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

func (*DecisionStatus) DeepCopyInto

func (in *DecisionStatus) DeepCopyInto(out *DecisionStatus)

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

type DecisionType

type DecisionType string

The type of decision.

const (
	// The decision was created by the nova external scheduler call.
	// Usually we refer to this as nova initial placement, it also includes
	// migrations or resizes.
	DecisionTypeNovaServer DecisionType = "nova-server"
	// The decision was created by the cinder external scheduler call.
	DecisionTypeCinderVolume DecisionType = "cinder-volume"
	// The decision was created by the manila external scheduler call.
	DecisionTypeManilaShare DecisionType = "manila-share"
	// The decision was created by spawning an ironcore machine.
	DecisionTypeIroncoreMachine DecisionType = "ironcore-machine"
)

type Descheduling

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

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

	// spec defines the desired state of Descheduling
	// +required
	Spec DeschedulingSpec `json:"spec"`

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

Descheduling is the Schema for the deschedulings API

func (*Descheduling) DeepCopy

func (in *Descheduling) DeepCopy() *Descheduling

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

func (*Descheduling) DeepCopyInto

func (in *Descheduling) DeepCopyInto(out *Descheduling)

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

func (*Descheduling) DeepCopyObject

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

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

type DeschedulingList

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

DeschedulingList contains a list of Descheduling

func (*DeschedulingList) DeepCopy

func (in *DeschedulingList) DeepCopy() *DeschedulingList

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

func (*DeschedulingList) DeepCopyInto

func (in *DeschedulingList) DeepCopyInto(out *DeschedulingList)

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

func (*DeschedulingList) DeepCopyObject

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

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

type DeschedulingSpec

type DeschedulingSpec struct {
	// A reference to the virtual machine that should be descheduled.
	Ref string `json:"ref,omitempty"`
	// The type of reference used to identify the virtual machine.
	RefType DeschedulingSpecVMReferenceType `json:"refType,omitempty"`
	// The name of the compute host from which the virtual machine should be descheduled.
	PrevHost string `json:"prevHost,omitempty"`
	// The type of host from which the virtual machine should be descheduled.
	PrevHostType DeschedulingSpecHostType `json:"prevHostType,omitempty"`
	// The human-readable reason why the VM should be descheduled.
	Reason string `json:"reason,omitempty"`
}

func (*DeschedulingSpec) DeepCopy

func (in *DeschedulingSpec) DeepCopy() *DeschedulingSpec

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

func (*DeschedulingSpec) DeepCopyInto

func (in *DeschedulingSpec) DeepCopyInto(out *DeschedulingSpec)

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

type DeschedulingSpecHostType

type DeschedulingSpecHostType string

The type of host from which the virtual machine should be descheduled.

const (
	// The host is identified by its compute host name.
	DeschedulingSpecHostTypeNovaComputeHostName DeschedulingSpecHostType = "novaComputeHostName"
)

type DeschedulingSpecVMReferenceType

type DeschedulingSpecVMReferenceType string

The type of reference to the virtual machine that should be descheduled.

const (
	// Openstack server uuid.
	DeschedulingSpecVMReferenceNovaServerUUID DeschedulingSpecVMReferenceType = "novaServerUUID"
)

type DeschedulingStatus

type DeschedulingStatus struct {
	// The current phase of the descheduling.
	Phase DeschedulingStatusPhase `json:"phase"`
	// The current status conditions of the descheduling.
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
	// The name of the compute host where the VM was rescheduled to.
	NewHost string `json:"newHost,omitempty"`
	// The type of host where the VM was rescheduled to.
	NewHostType DeschedulingSpecHostType `json:"newHostType,omitempty"`
}

func (*DeschedulingStatus) DeepCopy

func (in *DeschedulingStatus) DeepCopy() *DeschedulingStatus

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

func (*DeschedulingStatus) DeepCopyInto

func (in *DeschedulingStatus) DeepCopyInto(out *DeschedulingStatus)

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

type DeschedulingStatusPhase

type DeschedulingStatusPhase string

The phase in which the descheduling is.

const (
	// The descheduling was queued and is waiting to be processed.
	DeschedulingStatusPhaseQueued DeschedulingStatusPhase = "queued"
	// The descheduling is currently being processed.
	DeschedulingStatusPhaseInProgress DeschedulingStatusPhase = "inProgress"
	// The descheduling was completed successfully.
	DeschedulingStatusPhaseCompleted DeschedulingStatusPhase = "completed"
	// The descheduling failed.
	DeschedulingStatusPhaseFailed DeschedulingStatusPhase = "failed"
)

type DisabledValidationsSpec

type DisabledValidationsSpec struct {
	// Whether to validate that no subjects are removed or added from the scheduler
	// step. This should only be disabled for scheduler steps that remove subjects.
	// Thus, if no value is provided, the default is false.
	SameSubjectNumberInOut bool `json:"sameSubjectNumberInOut,omitempty"`
	// Whether to validate that, after running the step, there are remaining subjects.
	// This should only be disabled for scheduler steps that are expected to
	// remove all subjects.
	SomeSubjectsRemain bool `json:"someSubjectsRemain,omitempty"`
}

func (*DisabledValidationsSpec) DeepCopy

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

func (*DisabledValidationsSpec) DeepCopyInto

func (in *DisabledValidationsSpec) DeepCopyInto(out *DisabledValidationsSpec)

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

type IdentityDatasource

type IdentityDatasource struct {
	// The type of resource to sync.
	Type IdentityDatasourceType `json:"type"`
}

func (*IdentityDatasource) DeepCopy

func (in *IdentityDatasource) DeepCopy() *IdentityDatasource

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

func (*IdentityDatasource) DeepCopyInto

func (in *IdentityDatasource) DeepCopyInto(out *IdentityDatasource)

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

type IdentityDatasourceType

type IdentityDatasourceType string
const (
	IdentityDatasourceTypeProjects IdentityDatasourceType = "projects"
	IdentityDatasourceTypeDomains  IdentityDatasourceType = "domains"
)

type KPI

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

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

	// spec defines the desired state of KPI
	// +required
	Spec KPISpec `json:"spec"`

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

KPI is the Schema for the deschedulings API

func (*KPI) DeepCopy

func (in *KPI) DeepCopy() *KPI

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

func (*KPI) DeepCopyInto

func (in *KPI) DeepCopyInto(out *KPI)

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

func (*KPI) DeepCopyObject

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

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

type KPIDependenciesSpec

type KPIDependenciesSpec struct {
	// Datasources required for extracting this kpi.
	// +kubebuilder:validation:Optional
	Datasources []corev1.ObjectReference `json:"datasources,omitempty"`

	// Knowledges this kpi depends on.
	// +kubebuilder:validation:Optional
	Knowledges []corev1.ObjectReference `json:"knowledges,omitempty"`
}

Dependencies required for extracting the kpi. If provided, all datasources and knowledges must have the same database secret reference so the kpi can be joined across multiple database tables.

func (*KPIDependenciesSpec) DeepCopy

func (in *KPIDependenciesSpec) DeepCopy() *KPIDependenciesSpec

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

func (*KPIDependenciesSpec) DeepCopyInto

func (in *KPIDependenciesSpec) DeepCopyInto(out *KPIDependenciesSpec)

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

type KPIList

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

KPIList contains a list of KPI

func (*KPIList) DeepCopy

func (in *KPIList) DeepCopy() *KPIList

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

func (*KPIList) DeepCopyInto

func (in *KPIList) DeepCopyInto(out *KPIList)

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

func (*KPIList) DeepCopyObject

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

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

type KPISpec

type KPISpec struct {
	// The operator by which this kpi should be executed.
	Operator string `json:"operator,omitempty"`

	// The name of the kpi in the cortex implementation.
	Impl string `json:"impl"`
	// Additional configuration for the extractor that can be used
	// +kubebuilder:validation:Optional
	Opts runtime.RawExtension `json:"opts,omitempty"`
	// Dependencies required for extracting this kpi.
	// +kubebuilder:validation:Optional
	Dependencies KPIDependenciesSpec `json:"dependencies"`
	// Additional description of the kpi which helps understand its purpose
	// and decisions made by it.
	// +kubebuilder:validation:Optional
	Description string `json:"description,omitempty"`
}

func (*KPISpec) DeepCopy

func (in *KPISpec) DeepCopy() *KPISpec

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

func (*KPISpec) DeepCopyInto

func (in *KPISpec) DeepCopyInto(out *KPISpec)

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

type KPIStatus

type KPIStatus struct {
	// If the kpi is ready to be executed.
	Ready bool `json:"ready"`

	// How many dependencies have been reconciled.
	ReadyDependencies int `json:"readyDependencies"`
	// Total number of dependencies configured.
	TotalDependencies int `json:"totalDependencies"`
	// "ReadyDependencies / TotalDependencies ready" as a human-readable string
	// or "ready" if there are no dependencies configured.
	DependenciesReadyFrac string `json:"dependenciesReadyFrac,omitempty"`

	// The current status conditions of the kpi.
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

func (*KPIStatus) DeepCopy

func (in *KPIStatus) DeepCopy() *KPIStatus

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

func (*KPIStatus) DeepCopyInto

func (in *KPIStatus) DeepCopyInto(out *KPIStatus)

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

type Knowledge

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

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

	// spec defines the desired state of Knowledge
	// +required
	Spec KnowledgeSpec `json:"spec"`

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

Knowledge is the Schema for the knowledges API

func (*Knowledge) DeepCopy

func (in *Knowledge) DeepCopy() *Knowledge

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

func (*Knowledge) DeepCopyInto

func (in *Knowledge) DeepCopyInto(out *Knowledge)

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

func (*Knowledge) DeepCopyObject

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

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

type KnowledgeDependenciesSpec

type KnowledgeDependenciesSpec struct {
	// Datasources required for extracting this knowledge.
	// If provided, all datasources must have the same database secret reference
	// so the knowledge can be joined across multiple database tables.
	// +kubebuilder:validation:Optional
	Datasources []corev1.ObjectReference `json:"datasources,omitempty"`

	// Other knowledges this knowledge depends on.
	// +kubebuilder:validation:Optional
	Knowledges []corev1.ObjectReference `json:"knowledges,omitempty"`
}

Dependencies required for extracting the knowledge.

func (*KnowledgeDependenciesSpec) DeepCopy

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

func (*KnowledgeDependenciesSpec) DeepCopyInto

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

type KnowledgeExtractorSpec

type KnowledgeExtractorSpec struct {
	// The name of the extractor.
	Name string `json:"name,omitempty"`

	// Additional configuration for the extractor.
	// +kubebuilder:validation:Optional
	Config runtime.RawExtension `json:"config"`
}

func (*KnowledgeExtractorSpec) DeepCopy

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

func (*KnowledgeExtractorSpec) DeepCopyInto

func (in *KnowledgeExtractorSpec) DeepCopyInto(out *KnowledgeExtractorSpec)

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

type KnowledgeList

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

KnowledgeList contains a list of Knowledge

func (*KnowledgeList) DeepCopy

func (in *KnowledgeList) DeepCopy() *KnowledgeList

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

func (*KnowledgeList) DeepCopyInto

func (in *KnowledgeList) DeepCopyInto(out *KnowledgeList)

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

func (*KnowledgeList) DeepCopyObject

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

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

type KnowledgeSpec

type KnowledgeSpec struct {
	// The operator by which this knowledge should be extracted.
	Operator string `json:"operator,omitempty"`

	// The feature extractor to use for extracting this knowledge.
	Extractor KnowledgeExtractorSpec `json:"extractor,omitempty"`

	// The desired recency of this knowledge, i.e. how old it can be until
	// it needs to be re-extracted.
	// +kubebuilder:default="60s"
	Recency metav1.Duration `json:"recency"`

	// A human-readable description of the knowledge to be extracted.
	// +kubebuilder:validation:Optional
	Description string `json:"description,omitempty"`

	// Dependencies required for extracting this knowledge.
	// +kubebuilder:validation:Optional
	Dependencies KnowledgeDependenciesSpec `json:"dependencies"`

	// Database credentials for the database where the knowledge will be stored.
	//
	// Note: this is a legacy feature to stay compatible with the cortex scheduler.
	// Once the scheduler is moved to use the knowledge via CRs only, we can
	// remove this.
	//
	// The secret should contain the following keys:
	// - "username": The database username.
	// - "password": The database password.
	// - "host": The database host.
	// - "port": The database port.
	// - "database": The database name.
	DatabaseSecretRef *corev1.SecretReference `json:"databaseSecretRef"`

	// Whether the knowledge should only be stored in the database and not
	// in the CR status.
	//
	// Note: this is a legacy feature. Features should always contain condensed
	// knowledge in the CR status for easy access.
	// +kubebuilder:default=false
	StoreInDatabaseOnly bool `json:"storeInDatabaseOnly,omitempty"`
}

func (*KnowledgeSpec) DeepCopy

func (in *KnowledgeSpec) DeepCopy() *KnowledgeSpec

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

func (*KnowledgeSpec) DeepCopyInto

func (in *KnowledgeSpec) DeepCopyInto(out *KnowledgeSpec)

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

type KnowledgeStatus

type KnowledgeStatus struct {
	// When the knowledge was last successfully extracted.
	// +kubebuilder:validation:Optional
	LastExtracted metav1.Time `json:"lastExtracted"`
	// The time it took to perform the last extraction.
	// +kubebuilder:validation:Optional
	Took metav1.Duration `json:"took"`

	// The raw data behind the extracted knowledge, e.g. a list of features.
	// +kubebuilder:validation:Optional
	Raw runtime.RawExtension `json:"raw"`
	// The number of features extracted, or 1 if the knowledge is not a list.
	// +kubebuilder:validation:Optional
	RawLength int `json:"rawLength,omitempty"`

	// The current status conditions of the knowledge.
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

func (*KnowledgeStatus) DeepCopy

func (in *KnowledgeStatus) DeepCopy() *KnowledgeStatus

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

func (*KnowledgeStatus) DeepCopyInto

func (in *KnowledgeStatus) DeepCopyInto(out *KnowledgeStatus)

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

func (*KnowledgeStatus) IsReady

func (s *KnowledgeStatus) IsReady() bool

Helper function to check if the knowledge is ready.

type LimesDatasource

type LimesDatasource struct {
	// The type of resource to sync.
	Type LimesDatasourceType `json:"type"`
}

func (*LimesDatasource) DeepCopy

func (in *LimesDatasource) DeepCopy() *LimesDatasource

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

func (*LimesDatasource) DeepCopyInto

func (in *LimesDatasource) DeepCopyInto(out *LimesDatasource)

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

type LimesDatasourceType

type LimesDatasourceType string
const (
	LimesDatasourceTypeProjectCommitments LimesDatasourceType = "projectCommitments"
)

type ManilaDatasource

type ManilaDatasource struct {
	// The type of resource to sync.
	Type ManilaDatasourceType `json:"type"`
}

func (*ManilaDatasource) DeepCopy

func (in *ManilaDatasource) DeepCopy() *ManilaDatasource

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

func (*ManilaDatasource) DeepCopyInto

func (in *ManilaDatasource) DeepCopyInto(out *ManilaDatasource)

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

type ManilaDatasourceType

type ManilaDatasourceType string
const (
	ManilaDatasourceTypeStoragePools ManilaDatasourceType = "storagePools"
)

type NovaDatasource

type NovaDatasource struct {
	// The type of resource to sync.
	Type NovaDatasourceType `json:"type"`
	// Time frame in minutes for the changes-since parameter when fetching
	// deleted servers. Set if the Type is "deletedServers".
	DeletedServersChangesSinceMinutes *int `json:"deletedServersChangesSinceMinutes,omitempty"`
}

func (*NovaDatasource) DeepCopy

func (in *NovaDatasource) DeepCopy() *NovaDatasource

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

func (*NovaDatasource) DeepCopyInto

func (in *NovaDatasource) DeepCopyInto(out *NovaDatasource)

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

type NovaDatasourceType

type NovaDatasourceType string
const (
	NovaDatasourceTypeServers        NovaDatasourceType = "servers"
	NovaDatasourceTypeDeletedServers NovaDatasourceType = "deletedServers"
	NovaDatasourceTypeHypervisors    NovaDatasourceType = "hypervisors"
	NovaDatasourceTypeFlavors        NovaDatasourceType = "flavors"
	NovaDatasourceTypeMigrations     NovaDatasourceType = "migrations"
	NovaDatasourceTypeAggregates     NovaDatasourceType = "aggregates"
)

type OpenStackDatasource

type OpenStackDatasource struct {
	// The type of the OpenStack datasource.
	Type OpenStackDatasourceType `json:"type"`

	// Datasource for openstack nova.
	// Only required if Type is "nova".
	// +kubebuilder:validation:Optional
	Nova NovaDatasource `json:"nova"`
	// Datasource for openstack placement.
	// Only required if Type is "placement".
	// +kubebuilder:validation:Optional
	Placement PlacementDatasource `json:"placement"`
	// Datasource for openstack manila.
	// Only required if Type is "manila".
	// +kubebuilder:validation:Optional
	Manila ManilaDatasource `json:"manila"`
	// Datasource for openstack identity.
	// Only required if Type is "identity".
	// +kubebuilder:validation:Optional
	Identity IdentityDatasource `json:"identity"`
	// Datasource for openstack limes.
	// Only required if Type is "limes".
	// +kubebuilder:validation:Optional
	Limes LimesDatasource `json:"limes"`
	// Datasource for openstack cinder.
	// Only required if Type is "cinder".
	// +kubebuilder:validation:Optional
	Cinder CinderDatasource `json:"cinder"`

	// How often to sync the datasource.
	// +kubebuilder:default="60s"
	SyncInterval metav1.Duration `json:"syncInterval"`

	// Keystone credentials secret ref for authenticating with openstack.
	// The secret should contain the following keys:
	// - "availability": The service availability, e.g. "public", "internal", or "admin".
	// - "url": The keystone auth URL.
	// - "username": The keystone username.
	// - "password": The keystone password.
	// - "userDomainName": The keystone user domain name.
	// - "projectName": The keystone project name.
	// - "projectDomainName": The keystone project domain name.
	SecretRef corev1.SecretReference `json:"secretRef"`
}

func (*OpenStackDatasource) DeepCopy

func (in *OpenStackDatasource) DeepCopy() *OpenStackDatasource

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

func (*OpenStackDatasource) DeepCopyInto

func (in *OpenStackDatasource) DeepCopyInto(out *OpenStackDatasource)

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

type OpenStackDatasourceType

type OpenStackDatasourceType string
const (
	// OpenStackDatasourceTypeNova indicates a Nova datasource.
	OpenStackDatasourceTypeNova OpenStackDatasourceType = "nova"
	// OpenStackDatasourceTypePlacement indicates a Placement datasource.
	OpenStackDatasourceTypePlacement OpenStackDatasourceType = "placement"
	// OpenStackDatasourceTypeManila indicates a Manila datasource.
	OpenStackDatasourceTypeManila OpenStackDatasourceType = "manila"
	// OpenStackDatasourceTypeIdentity indicates an Identity datasource.
	OpenStackDatasourceTypeIdentity OpenStackDatasourceType = "identity"
	// OpenStackDatasourceTypeLimes indicates a Limes datasource.
	OpenStackDatasourceTypeLimes OpenStackDatasourceType = "limes"
	// OpenStackDatasourceTypeCinder indicates a Cinder datasource.
	OpenStackDatasourceTypeCinder OpenStackDatasourceType = "cinder"
)

type Pipeline

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

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

	// spec defines the desired state of Pipeline
	// +required
	Spec PipelineSpec `json:"spec"`

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

Pipeline is the Schema for the decisions API

func (*Pipeline) DeepCopy

func (in *Pipeline) DeepCopy() *Pipeline

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

func (*Pipeline) DeepCopyInto

func (in *Pipeline) DeepCopyInto(out *Pipeline)

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

func (*Pipeline) DeepCopyObject

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

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

type PipelineList

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

PipelineList contains a list of Pipeline

func (*PipelineList) DeepCopy

func (in *PipelineList) DeepCopy() *PipelineList

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

func (*PipelineList) DeepCopyInto

func (in *PipelineList) DeepCopyInto(out *PipelineList)

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

func (*PipelineList) DeepCopyObject

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

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

type PipelineSpec

type PipelineSpec struct {
	// The operator by which this pipeline should be handled.
	Operator string `json:"operator,omitempty"`
	// An optional description of the pipeline.
	// +kubebuilder:validation:Optional
	Description string `json:"description,omitempty"`
	// The type of the pipeline.
	Type PipelineType `json:"type"`
	// The ordered list of steps that make up this pipeline.
	Steps []StepInPipeline `json:"steps,omitempty"`
}

func (*PipelineSpec) DeepCopy

func (in *PipelineSpec) DeepCopy() *PipelineSpec

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

func (*PipelineSpec) DeepCopyInto

func (in *PipelineSpec) DeepCopyInto(out *PipelineSpec)

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

type PipelineStatus

type PipelineStatus struct {
	// Whether the pipeline is ready to be used.
	Ready bool `json:"ready"`
	// The total number of steps configured in the pipeline.
	TotalSteps int `json:"totalSteps"`
	// The number of steps that are ready.
	ReadySteps int `json:"readySteps"`
	// An overview of the readiness of the steps in the pipeline.
	// Format: "ReadySteps / TotalSteps steps ready".
	StepsReadyFrac string `json:"stepsReadyFrac,omitempty"`
	// The current status conditions of the pipeline.
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

func (*PipelineStatus) DeepCopy

func (in *PipelineStatus) DeepCopy() *PipelineStatus

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

func (*PipelineStatus) DeepCopyInto

func (in *PipelineStatus) DeepCopyInto(out *PipelineStatus)

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

type PipelineType

type PipelineType string
const (
	// Pipeline containing filter-weigher steps for initial placement,
	// migration, etc. of instances.
	PipelineTypeFilterWeigher PipelineType = "filter-weigher"
	// Pipeline containing descheduler steps for generating descheduling
	// recommendations.
	PipelineTypeDescheduler PipelineType = "descheduler"
)

type PlacementDatasource

type PlacementDatasource struct {
	// The type of resource to sync.
	Type PlacementDatasourceType `json:"type"`
}

func (*PlacementDatasource) DeepCopy

func (in *PlacementDatasource) DeepCopy() *PlacementDatasource

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

func (*PlacementDatasource) DeepCopyInto

func (in *PlacementDatasource) DeepCopyInto(out *PlacementDatasource)

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

type PlacementDatasourceType

type PlacementDatasourceType string
const (
	PlacementDatasourceTypeResourceProviders               PlacementDatasourceType = "resourceProviders"
	PlacementDatasourceTypeResourceProviderInventoryUsages PlacementDatasourceType = "resourceProviderInventoryUsages"
	PlacementDatasourceTypeResourceProviderTraits          PlacementDatasourceType = "resourceProviderTraits"
)

type PrometheusDatasource

type PrometheusDatasource struct {
	// The query to use to fetch the metric.
	Query string `json:"query"`
	// Especially when a more complex query is used, we need an alias
	// under which the table will be stored in the database.
	// Additionally, this alias is used to reference the metric in the
	// feature extractors as dependency.
	Alias string `json:"alias"`
	// The type of the metric, mapping directly to a metric model supported
	// by cortex. Note that the metrics are fetched as time series, not instant.
	Type string `json:"type"`

	// Time range to query the data for.
	// +kubebuilder:default="2419200s"
	TimeRange metav1.Duration `json:"timeRange"`
	// The interval at which to query the data.
	// +kubebuilder:default="86400s"
	Interval metav1.Duration `json:"interval"`
	// The resolution of the data.
	// +kubebuilder:default="43200s"
	Resolution metav1.Duration `json:"resolution"`

	// Secret containing the following keys:
	// - "url": The prometheus URL.
	SecretRef corev1.SecretReference `json:"secretRef"`
}

func (*PrometheusDatasource) DeepCopy

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

func (*PrometheusDatasource) DeepCopyInto

func (in *PrometheusDatasource) DeepCopyInto(out *PrometheusDatasource)

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

type Reservation

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

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

	// spec defines the desired state of Reservation
	// +required
	Spec ReservationSpec `json:"spec"`

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

Reservation is the Schema for the reservations API

func (*Reservation) DeepCopy

func (in *Reservation) DeepCopy() *Reservation

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

func (*Reservation) DeepCopyInto

func (in *Reservation) DeepCopyInto(out *Reservation)

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

func (*Reservation) DeepCopyObject

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

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

type ReservationList

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

ReservationList contains a list of Reservation

func (*ReservationList) DeepCopy

func (in *ReservationList) DeepCopy() *ReservationList

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

func (*ReservationList) DeepCopyInto

func (in *ReservationList) DeepCopyInto(out *ReservationList)

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

func (*ReservationList) DeepCopyObject

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

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

type ReservationSchedulerSpec

type ReservationSchedulerSpec struct {
	// If the type of scheduler is cortex-nova, this field will contain additional
	// information used by cortex-nova to place the instance.
	CortexNova *ReservationSchedulerSpecCortexNova `json:"cortexNova,omitempty"`
}

Additional specifications needed to place the reservation.

func (*ReservationSchedulerSpec) DeepCopy

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

func (*ReservationSchedulerSpec) DeepCopyInto

func (in *ReservationSchedulerSpec) DeepCopyInto(out *ReservationSchedulerSpec)

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

type ReservationSchedulerSpecCortexNova

type ReservationSchedulerSpecCortexNova struct {
	// The project ID to reserve for.
	ProjectID string `json:"projectID,omitempty"`
	// The domain ID to reserve for.
	DomainID string `json:"domainID,omitempty"`
	// The flavor name of the instance to reserve.
	FlavorName string `json:"flavorName,omitempty"`
	// Extra specifications relevant for initial placement of the instance.
	FlavorExtraSpecs map[string]string `json:"flavorExtraSpecs,omitempty"`
}

Additional specifications needed by cortex-nova to place the instance.

func (*ReservationSchedulerSpecCortexNova) DeepCopy

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

func (*ReservationSchedulerSpecCortexNova) DeepCopyInto

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

type ReservationSpec

type ReservationSpec struct {
	// A remark that can be used to identify the creator of the reservation.
	// This can be used to clean up reservations synced from external systems
	// without touching reservations created manually or by other systems.
	Creator string `json:"creator,omitempty"`
	// Specification of the scheduler that will handle the reservation.
	Scheduler ReservationSchedulerSpec `json:"scheduler,omitempty"`
	// Resources requested to reserve for this instance.
	Requests map[string]resource.Quantity `json:"requests,omitempty"`
}

ReservationSpec defines the desired state of Reservation.

func (*ReservationSpec) DeepCopy

func (in *ReservationSpec) DeepCopy() *ReservationSpec

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

func (*ReservationSpec) DeepCopyInto

func (in *ReservationSpec) DeepCopyInto(out *ReservationSpec)

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

type ReservationStatus

type ReservationStatus struct {
	// The current phase of the reservation.
	Phase ReservationStatusPhase `json:"phase,omitempty"`
	// The current status conditions of the reservation.
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
	// The name of the compute host that was allocated.
	Host string `json:"host"`
}

ReservationStatus defines the observed state of Reservation.

func (*ReservationStatus) DeepCopy

func (in *ReservationStatus) DeepCopy() *ReservationStatus

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

func (*ReservationStatus) DeepCopyInto

func (in *ReservationStatus) DeepCopyInto(out *ReservationStatus)

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

type ReservationStatusPhase

type ReservationStatusPhase string

The phase in which the reservation is.

const (
	// The reservation has been placed and is considered during scheduling.
	ReservationStatusPhaseActive ReservationStatusPhase = "active"
	// The reservation could not be fulfilled.
	ReservationStatusPhaseFailed ReservationStatusPhase = "failed"
)

type Step

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

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

	// spec defines the desired state of Step
	// +required
	Spec StepSpec `json:"spec"`

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

Step is the Schema for the deschedulings API

func (*Step) DeepCopy

func (in *Step) DeepCopy() *Step

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

func (*Step) DeepCopyInto

func (in *Step) DeepCopyInto(out *Step)

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

func (*Step) DeepCopyObject

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

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

type StepInPipeline

type StepInPipeline struct {
	// Reference to the step.
	Ref corev1.ObjectReference `json:"ref"`
	// Whether this step is mandatory for the pipeline to be runnable.
	// +kubebuilder:default=true
	Mandatory bool `json:"mandatory"`
}

func (*StepInPipeline) DeepCopy

func (in *StepInPipeline) DeepCopy() *StepInPipeline

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

func (*StepInPipeline) DeepCopyInto

func (in *StepInPipeline) DeepCopyInto(out *StepInPipeline)

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

type StepList

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

StepList contains a list of Step

func (*StepList) DeepCopy

func (in *StepList) DeepCopy() *StepList

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

func (*StepList) DeepCopyInto

func (in *StepList) DeepCopyInto(out *StepList)

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

func (*StepList) DeepCopyObject

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

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

type StepResult

type StepResult struct {
	// object reference to the scheduler step.
	StepRef corev1.ObjectReference `json:"stepRef"`
	// Activations of the step for each host.
	Activations map[string]float64 `json:"activations"`
}

func (*StepResult) DeepCopy

func (in *StepResult) DeepCopy() *StepResult

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

func (*StepResult) DeepCopyInto

func (in *StepResult) DeepCopyInto(out *StepResult)

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

type StepSpec

type StepSpec struct {
	// The operator by which this step should be executed.
	Operator string `json:"operator,omitempty"`

	// The type of the scheduler step.
	Type StepType `json:"type"`
	// If the type is "weigher", this contains additional configuration for it.
	// +kubebuilder:validation:Optional
	Weigher *WeigherSpec `json:"weigher,omitempty"`

	// The name of the scheduler step in the cortex implementation.
	Impl string `json:"impl"`
	// Additional configuration for the extractor that can be used
	// +kubebuilder:validation:Optional
	Opts runtime.RawExtension `json:"opts,omitempty"`
	// Knowledges this step depends on to be ready.
	// +kubebuilder:validation:Optional
	Knowledges []corev1.ObjectReference `json:"knowledges,omitempty"`
	// Additional description of the step which helps understand its purpose
	// and decisions made by it.
	// +kubebuilder:validation:Optional
	Description string `json:"description,omitempty"`

	// If needed, database credentials for fetching data from the database.
	// The secret should contain the following keys:
	// - "username": The database username.
	// - "password": The database password.
	// - "host": The database host.
	// - "port": The database port.
	// - "database": The database name.
	// Note: this field will be removed in the future when db access in scheduler
	// steps is no longer needed.
	// +kubebuilder:validation:Optional
	DatabaseSecretRef *corev1.SecretReference `json:"databaseSecretRef"`
}

func (*StepSpec) DeepCopy

func (in *StepSpec) DeepCopy() *StepSpec

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

func (*StepSpec) DeepCopyInto

func (in *StepSpec) DeepCopyInto(out *StepSpec)

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

type StepStatus

type StepStatus struct {
	// If the step is ready to be executed.
	Ready bool `json:"ready"`
	// How many knowledges have been extracted.
	ReadyKnowledges int `json:"readyKnowledges"`
	// Total number of knowledges configured.
	TotalKnowledges int `json:"totalKnowledges"`
	// "ReadyKnowledges / TotalKnowledges ready" as a human-readable string
	// or "ready" if there are no knowledges configured.
	KnowledgesReadyFrac string `json:"knowledgesReadyFrac,omitempty"`
	// The current status conditions of the step.
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

func (*StepStatus) DeepCopy

func (in *StepStatus) DeepCopy() *StepStatus

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

func (*StepStatus) DeepCopyInto

func (in *StepStatus) DeepCopyInto(out *StepStatus)

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

type StepType

type StepType string
const (
	// Step for assigning weights to hosts.
	StepTypeWeigher StepType = "weigher"
	// Step for filtering hosts.
	StepTypeFilter StepType = "filter"
	// Step for generating descheduling recommendations.
	StepTypeDescheduler StepType = "descheduler"
)

type WeigherSpec

type WeigherSpec struct {
	// The validations to disable for this step. If none are provided, all
	// applied validations are enabled.
	// +kubebuilder:validation:Optional
	DisabledValidations DisabledValidationsSpec `json:"disabledValidations,omitempty"`
}

func (*WeigherSpec) DeepCopy

func (in *WeigherSpec) DeepCopy() *WeigherSpec

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

func (*WeigherSpec) DeepCopyInto

func (in *WeigherSpec) DeepCopyInto(out *WeigherSpec)

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

Jump to

Keyboard shortcuts

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