v1alpha1

package
v0.0.0-...-7b5a766 Latest Latest
Warning

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

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

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "reservations.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 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"`
	// An error explaining why the reservation is failed, if applicable.
	Error string `json:"error,omitempty"`
	// 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"
)

Jump to

Keyboard shortcuts

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