Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the knowledge v1alpha1 API group. +kubebuilder:object:generate=true +groupName=cortex.cloud
Index ¶
- Constants
- Variables
- func BoxFeatureList[T any](features []T) (runtime.RawExtension, error)
- func UnboxFeatureList[T any](raw runtime.RawExtension) ([]T, error)
- type BillingStatus
- type ChangePhase
- type CinderDatasource
- type CinderDatasourceType
- type CommitmentStatus
- type CommittedResource
- func (in *CommittedResource) DeepCopy() *CommittedResource
- func (in *CommittedResource) DeepCopyInto(out *CommittedResource)
- func (in *CommittedResource) DeepCopyObject() runtime.Object
- func (c *CommittedResource) IsActive() bool
- func (c *CommittedResource) MatchesGroup(projectID, flavorGroup string) bool
- type CommittedResourceAllocation
- type CommittedResourceChange
- type CommittedResourceChangeList
- type CommittedResourceChangeSpec
- type CommittedResourceChangeStatus
- type CommittedResourceList
- type CommittedResourceReservationSpec
- type CommittedResourceReservationStatus
- type CommittedResourceSpec
- type CommittedResourceStatus
- type CommittedResourceType
- type Datasource
- type DatasourceList
- type DatasourceSpec
- type DatasourceStatus
- type DatasourceType
- type Descheduling
- type DeschedulingList
- type DeschedulingSpec
- type DeschedulingSpecHostType
- type DeschedulingSpecVMReferenceType
- type DeschedulingStatus
- type DetectorSpec
- type DrainActionSpec
- type DrainConstraintMode
- type DrainConstraints
- type DrainEntityKind
- type DrainTarget
- type DrainTargetEntity
- type DrainTargetHost
- type EntityRef
- type FailoverHostReservationSpec
- type FailoverHostReservationStatus
- type FailoverReservationSpecdeprecated
- type FailoverReservationStatusdeprecated
- type FilterSpec
- type FlavorCapacityStatus
- type FlavorGroupCapacity
- type FlavorGroupCapacityList
- type FlavorGroupCapacitySpec
- type FlavorGroupCapacityStatus
- type HostRef
- type IdentityDatasource
- type IdentityDatasourceType
- type InFlightReservationSpec
- type InFlightReservationStatus
- type KPI
- type KPIDependenciesSpec
- type KPIList
- type KPISpec
- type KPIStatus
- type Knowledge
- type KnowledgeDependenciesSpec
- type KnowledgeExtractorSpec
- type KnowledgeList
- type KnowledgeSpec
- type KnowledgeStatus
- type LimesDatasource
- type LimesDatasourceType
- type ManilaDatasource
- type ManilaDatasourceType
- type NovaDatasource
- type NovaDatasourceType
- type OpenStackDatasource
- type OpenStackDatasourceType
- type Parameter
- type Parameters
- type Pipeline
- type PipelineList
- type PipelineSpec
- type PipelineStatus
- type PipelineType
- type PlacementDatasource
- type PlacementDatasourceType
- type ProjectQuota
- type ProjectQuotaList
- type ProjectQuotaSpec
- type ProjectQuotaStatus
- type PrometheusDatasource
- type Rescheduling
- type ReschedulingAction
- type ReschedulingList
- type ReschedulingMove
- type ReschedulingSpec
- type ReschedulingState
- type ReschedulingStatus
- type Reservation
- type ReservationConditionType
- type ReservationList
- type ReservationSpec
- type ReservationStatus
- type ReservationType
- type SchedulingDomain
- type SchedulingIntent
- type TxSource
- type WeigherSpec
Constants ¶
const ( // ChangeConditionProgressing is True while the change request is advancing normally. // False + reason indicates a problem while still non-terminal. ChangeConditionProgressing = "Progressing" // ChangeConditionFinished is True once the change request has reached a terminal phase. ChangeConditionFinished = "Finished" // ChangeConditionRestoring is True while the change request is restoring pre-change state // (RollingBack or DryRunCleanup). Its LastTransitionTime marks when restore began and its // Message carries the last restore error (e.g. a transient k8s API error). ChangeConditionRestoring = "Restoring" // Reasons for ChangeConditionProgressing=False (non-terminal problems). ChangeReasonStalled = "Stalled" ChangeReasonTimedOut = "TimedOut" ChangeReasonError = "Error" ChangeReasonRetryExhausted = "RetryExhausted" // Reasons for ChangeConditionFinished=True. ChangeRequestReasonAccepted = "Accepted" ChangeRequestReasonRejected = "Rejected" ChangeRequestReasonSuperseded = "Superseded" // ChangeReasonRollbackFailed is the Finished reason when rollback exhausted its timeout. ChangeReasonRollbackFailed = "RollbackFailed" // ChangeReasonInvalidSpec is the Finished reason when a change request is rejected for a // malformed spec (e.g. a dry run that would commit or mutate existing commitments). ChangeReasonInvalidSpec = "InvalidSpec" )
const ( // CommittedResourceConditionReady indicates whether the CommittedResource has been // successfully reconciled into active Reservation CRDs. CommittedResourceConditionReady = "Ready" // Condition reasons set by the CommittedResource controller. CommittedResourceReasonAccepted = "Accepted" CommittedResourceReasonPlanned = "Planned" CommittedResourceReasonReserving = "Reserving" CommittedResourceReasonRejected = "Rejected" )
const ( // The descheduling was successfully processed. DeschedulingConditionReady = "Ready" // The descheduling is currently being processed. DeschedulingConditionInProgress = "InProgress" )
const ( // The pipeline is ready to be used. PipelineConditionReady = "Ready" // All steps in the pipeline are ready. PipelineConditionAllStepsReady = "AllStepsReady" // All of the steps in the pipeline are indexed (known by the controller). PipelineConditionAllStepsIndexed = "AllStepsIndexed" )
const ( // LabelReservationType identifies the type of reservation. // This label is present on all reservations to enable type-based filtering. LabelReservationType = "reservations.cortex.cloud/type" // Reservation type label values ReservationTypeLabelCommittedResource = "committed-resource" ReservationTypeLabelFailover = "failover" ReservationTypeLabelInFlight = "in-flight" ReservationTypeLabelFailoverHost = "failover-host" )
Label keys for Reservation metadata. Labels follow Kubernetes naming conventions using reverse-DNS notation
const ( // AnnotationCreatorRequestID tracks the request ID that created this reservation. // Used for end-to-end traceability across API calls, controller reconciles, and scheduler invocations. AnnotationCreatorRequestID = "reservations.cortex.cloud/creator-request-id" // AnnotationCandidateAllocation signals that this PAYG pre-allocated reservation slot is intended // for a specific workload object (e.g. VM UUID). Set by the commitment reconciler on creation. // The reservation controller reads this annotation to discover and confirm the assignment. AnnotationCandidateAllocation = "reservations.cortex.cloud/candidate-allocation" )
Annotation keys for Reservation metadata.
const (
// The datasource is ready to be used.
DatasourceConditionReady = "Ready"
)
const (
// FlavorGroupCapacityConditionReady indicates the status data is up-to-date.
FlavorGroupCapacityConditionReady = "Ready"
)
const (
// If the kpi was successfully processed.
KPIConditionReady = "Ready"
)
const (
// The knowledge is ready to be used.
KnowledgeConditionReady = "Ready"
)
const (
// ProjectQuotaConditionReady indicates whether the quota usage has been successfully computed.
ProjectQuotaConditionReady = "Ready"
)
const (
// ReservationConditionReady indicates whether the reservation is active and ready.
ReservationConditionReady = "Ready"
)
Variables ¶
var AddToScheme = SchemeBuilder.AddToScheme
AddToScheme adds the types in this group-version to the given scheme.
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") )
var GroupVersion = schema.GroupVersion{Group: "cortex.cloud", Version: "v1alpha1"}
GroupVersion is group version used to register these objects.
var SchemeBuilder = &schemeBuilder{GroupVersion: GroupVersion}
SchemeBuilder is used to add go types to the GroupVersionKind scheme.
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 BillingStatus ¶
type BillingStatus struct {
// AssignedInstances lists the VM UUIDs assigned to this commitment for billing.
AssignedInstances []string `json:"assignedInstances,omitempty"`
// UsedResources is the total resource consumption from assigned instances.
UsedResources map[string]resource.Quantity `json:"usedResources,omitempty"`
// LastReconcileAt is the time of the last successful billing reconcile.
LastReconcileAt *metav1.Time `json:"lastReconcileAt,omitempty"`
// ObservedGeneration is the CommittedResource generation seen during the last billing reconcile.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
}
BillingStatus holds the computed billing assignment for a CommittedResource. Written by the UsageReconciler.
func (*BillingStatus) DeepCopy ¶
func (in *BillingStatus) DeepCopy() *BillingStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BillingStatus.
func (*BillingStatus) DeepCopyInto ¶
func (in *BillingStatus) DeepCopyInto(out *BillingStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChangePhase ¶
type ChangePhase string
ChangePhase represents the FSM phase of a CommittedResourceChange.
const ( // ChangePhasePreparing: change request created; sanity checks and optional snapshot in progress. ChangePhasePreparing ChangePhase = "Preparing" // ChangePhaseAllocating: CR specs are being written. ChangePhaseAllocating ChangePhase = "Allocating" // ChangePhaseAwaitingScheduling: CR specs written; waiting for placement success. ChangePhaseAwaitingScheduling ChangePhase = "AwaitingScheduling" // ChangePhaseRollingBack: a CR was rejected or timed out; restoring pre-change state. ChangePhaseRollingBack ChangePhase = "RollingBack" // ChangePhaseDryRunCleanup: dry-run would-accept; restoring pre-change state. ChangePhaseDryRunCleanup ChangePhase = "DryRunCleanup" // ChangePhaseAccepted: terminal; change request committed successfully. ChangePhaseAccepted ChangePhase = "Accepted" // ChangePhaseRejected: terminal; change request rolled back. ChangePhaseRejected ChangePhase = "Rejected" // ChangePhaseSuperseded: terminal; abandoned because a newer change request for the same AZ took over. ChangePhaseSuperseded ChangePhase = "Superseded" )
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 CommitmentStatus ¶
type CommitmentStatus string
Only confirmed and guaranteed commitments result in active Reservation slots.
const ( // CommitmentStatusPlanned: StartTime not yet reached; no resources guaranteed, no Reservation slots yet. CommitmentStatusPlanned CommitmentStatus = "planned" // CommitmentStatusPending: StartTime reached; no resources guaranteed, no Reservation slots yet. CommitmentStatusPending CommitmentStatus = "pending" // CommitmentStatusGuaranteed: StartTime not reached yet; resources are guaranteed latest starting from StartTime, Reservation slots in sync. CommitmentStatusGuaranteed CommitmentStatus = "guaranteed" // CommitmentStatusConfirmed: StartTime reached; resources are guaranteed, Reservation slots in sync. CommitmentStatusConfirmed CommitmentStatus = "confirmed" // CommitmentStatusSuperseded: replaced by another commitment; no resources guaranteed, Reservation slots removed. CommitmentStatusSuperseded CommitmentStatus = "superseded" // CommitmentStatusExpired: past EndTime; no resources guaranteed, Reservation slots removed. CommitmentStatusExpired CommitmentStatus = "expired" )
type CommittedResource ¶
type CommittedResource struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// +required
Spec CommittedResourceSpec `json:"spec"`
// +optional
Status CommittedResourceStatus `json:"status,omitempty,omitzero"`
}
CommittedResource is the Schema for the committedresources API
func (*CommittedResource) DeepCopy ¶
func (in *CommittedResource) DeepCopy() *CommittedResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommittedResource.
func (*CommittedResource) DeepCopyInto ¶
func (in *CommittedResource) DeepCopyInto(out *CommittedResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CommittedResource) DeepCopyObject ¶
func (in *CommittedResource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CommittedResource) IsActive ¶
func (c *CommittedResource) IsActive() bool
IsActive reports whether the commitment has active Reservation slots (state is confirmed or guaranteed).
func (*CommittedResource) MatchesGroup ¶
func (c *CommittedResource) MatchesGroup(projectID, flavorGroup string) bool
MatchesGroup reports whether the commitment targets the given project and flavor group.
type CommittedResourceAllocation ¶
type CommittedResourceAllocation struct {
// ObjectRef is a reference to the workload object (e.g. VM CRD).
// +kubebuilder:validation:Optional
ObjectRef corev1.ObjectReference `json:"objectRef,omitempty"`
// Resources consumed by this workload.
// +kubebuilder:validation:Required
Resources map[hv1.ResourceName]resource.Quantity `json:"resources"`
// Deprecated: CreationTimestamp is no longer populated. Will be removed once old pods are fully rolled out.
// +kubebuilder:validation:Optional
CreationTimestamp metav1.Time `json:"creationTimestamp,omitempty"`
}
CommittedResourceAllocation represents a workload's assignment to a committed resource reservation slot. The workload could be a VM (Nova/IronCore), Pod (Kubernetes), or other resource.
func (*CommittedResourceAllocation) DeepCopy ¶
func (in *CommittedResourceAllocation) DeepCopy() *CommittedResourceAllocation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommittedResourceAllocation.
func (*CommittedResourceAllocation) DeepCopyInto ¶
func (in *CommittedResourceAllocation) DeepCopyInto(out *CommittedResourceAllocation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommittedResourceChange ¶
type CommittedResourceChange struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// +required
Spec CommittedResourceChangeSpec `json:"spec"`
// +optional
Status CommittedResourceChangeStatus `json:"status,omitempty,omitzero"`
}
CommittedResourceChange is the Schema for the committedresourcechanges API
func (*CommittedResourceChange) DeepCopy ¶
func (in *CommittedResourceChange) DeepCopy() *CommittedResourceChange
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommittedResourceChange.
func (*CommittedResourceChange) DeepCopyInto ¶
func (in *CommittedResourceChange) DeepCopyInto(out *CommittedResourceChange)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CommittedResourceChange) DeepCopyObject ¶
func (in *CommittedResourceChange) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CommittedResourceChange) IsTerminal ¶
func (tx *CommittedResourceChange) IsTerminal() bool
IsTerminal reports whether the change request has reached a terminal phase.
type CommittedResourceChangeList ¶
type CommittedResourceChangeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CommittedResourceChange `json:"items"`
}
CommittedResourceChangeList contains a list of CommittedResourceChange
func (*CommittedResourceChangeList) DeepCopy ¶
func (in *CommittedResourceChangeList) DeepCopy() *CommittedResourceChangeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommittedResourceChangeList.
func (*CommittedResourceChangeList) DeepCopyInto ¶
func (in *CommittedResourceChangeList) DeepCopyInto(out *CommittedResourceChangeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CommittedResourceChangeList) DeepCopyObject ¶
func (in *CommittedResourceChangeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CommittedResourceChangeSpec ¶
type CommittedResourceChangeSpec struct {
// CorrelationID is the request/correlation ID.
// +kubebuilder:validation:Optional
CorrelationID string `json:"correlationID,omitempty"`
// AvailabilityZone is the availability zone this change request is scoped to.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
AvailabilityZone string `json:"availabilityZone"`
// Source identifies who created this change request.
// +kubebuilder:validation:Enum=api;syncer
// +kubebuilder:validation:Required
Source TxSource `json:"source"`
// AllowRejection controls whether the change request may be rejected and rolled back
// on placement failure. When false, the reconciler retries until Accepted or Superseded.
// +kubebuilder:validation:Optional
AllowRejection bool `json:"allowRejection,omitempty"`
// DryRun controls whether the change request commits or only probes schedulability.
// +kubebuilder:validation:Optional
DryRun bool `json:"dryRun,omitempty"`
// NewState maps commitmentUUID to the desired CommittedResourceSpec.
// A nil value means the corresponding CommittedResource should be deleted.
// +kubebuilder:validation:Optional
NewState map[string]*CommittedResourceSpec `json:"newState,omitempty"`
}
CommittedResourceChangeSpec defines the desired change for a CommittedResourceChange.
func (*CommittedResourceChangeSpec) DeepCopy ¶
func (in *CommittedResourceChangeSpec) DeepCopy() *CommittedResourceChangeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommittedResourceChangeSpec.
func (*CommittedResourceChangeSpec) DeepCopyInto ¶
func (in *CommittedResourceChangeSpec) DeepCopyInto(out *CommittedResourceChangeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommittedResourceChangeStatus ¶
type CommittedResourceChangeStatus struct {
// Phase is the current FSM phase of the change request.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:XValidation:rule="oldSelf == ” || !['Accepted','Rejected','Superseded'].exists(t, t == oldSelf) || self == oldSelf",message="phase cannot transition out of a terminal state"
Phase ChangePhase `json:"phase,omitempty"`
// SnapshotBefore records the CommittedResource spec state before this change request.
// Key is commitmentUUID; nil value means the CR did not exist before (will be deleted on rollback).
// Populated in Preparing when AllowRejection=true.
// +kubebuilder:validation:Optional
SnapshotBefore map[string]*CommittedResourceSpec `json:"snapshotBefore,omitempty"`
// UpsertedCommitments holds references to CommittedResource CRDs written by this change request.
// Watched in AwaitingScheduling to gate on placement success.
// These are plain object references, not owner references.
// +kubebuilder:validation:Optional
UpsertedCommitments []corev1.ObjectReference `json:"upsertedCommitments,omitempty"`
// Conditions holds Progressing, Finished and Restoring conditions.
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// Message is a human-readable description of the current state or terminal outcome.
// +kubebuilder:validation:Optional
Message string `json:"message,omitempty"`
}
CommittedResourceChangeStatus defines the observed state of a CommittedResourceChange.
func (*CommittedResourceChangeStatus) DeepCopy ¶
func (in *CommittedResourceChangeStatus) DeepCopy() *CommittedResourceChangeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommittedResourceChangeStatus.
func (*CommittedResourceChangeStatus) DeepCopyInto ¶
func (in *CommittedResourceChangeStatus) DeepCopyInto(out *CommittedResourceChangeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommittedResourceList ¶
type CommittedResourceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CommittedResource `json:"items"`
}
CommittedResourceList contains a list of CommittedResource
func (*CommittedResourceList) DeepCopy ¶
func (in *CommittedResourceList) DeepCopy() *CommittedResourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommittedResourceList.
func (*CommittedResourceList) DeepCopyInto ¶
func (in *CommittedResourceList) DeepCopyInto(out *CommittedResourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CommittedResourceList) DeepCopyObject ¶
func (in *CommittedResourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CommittedResourceReservationSpec ¶
type CommittedResourceReservationSpec struct {
// ResourceName is the name of the resource to reserve. (e.g. flavor name for Nova)
// +kubebuilder:validation:Optional
ResourceName string `json:"resourceName,omitempty"`
// CommitmentUUID is the UUID of the commitment that this reservation corresponds to.
// +kubebuilder:validation:Optional
CommitmentUUID string `json:"commitmentUUID,omitempty"`
// ResourceGroup is the group/category of the resource (e.g., flavor group for Nova)
// +kubebuilder:validation:Optional
ResourceGroup string `json:"resourceGroup,omitempty"`
// +kubebuilder:validation:Optional
ProjectID string `json:"projectID,omitempty"`
// +kubebuilder:validation:Optional
DomainID string `json:"domainID,omitempty"`
// Creator identifies the system or component that created this reservation.
// Used to track ownership and for cleanup purposes (e.g., "commitments-syncer").
// +kubebuilder:validation:Optional
Creator string `json:"creator,omitempty"`
// ParentGeneration is the Generation of the CommittedResource CRD at the time this
// reservation was last written by the CommittedResource controller. The Reservation
// controller echoes it to Status.CommittedResourceReservation.ObservedParentGeneration
// once it has processed the reservation, allowing the CR controller to wait until
// all child reservations are up-to-date before accepting.
// Zero means the field is not set (syncer-created reservations, no parent CR).
//
// Deprecated: replaced by conditions[Ready].ObservedGeneration signaling. Will be removed once old pods are fully rolled out.
// +kubebuilder:validation:Optional
ParentGeneration int64 `json:"parentGeneration,omitempty"`
// PrimaryResource is the resource dimension that drives allocation tracking
// (e.g. hv1.ResourceMemory for memory commitments). Other dimensions in
// alloc.Resources are recorded for bookkeeping but do not gate allocation decisions.
// +kubebuilder:validation:Optional
PrimaryResource hv1.ResourceName `json:"primaryResource,omitempty"`
// Allocations maps workload identifiers to their allocation details.
// Key: Workload UUID (VM UUID for Nova, Pod UID for Pods, Machine UID for IronCore, etc.)
// Value: allocation state and metadata
//
// Deprecated: use status.committedResourceReservation.allocation instead. Will be removed once old pods are fully rolled out.
// +kubebuilder:validation:Optional
Allocations map[string]CommittedResourceAllocation `json:"allocations,omitempty"`
}
CommittedResourceReservationSpec defines the spec fields specific to committed resource reservations.
func (*CommittedResourceReservationSpec) DeepCopy ¶
func (in *CommittedResourceReservationSpec) DeepCopy() *CommittedResourceReservationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommittedResourceReservationSpec.
func (*CommittedResourceReservationSpec) DeepCopyInto ¶
func (in *CommittedResourceReservationSpec) DeepCopyInto(out *CommittedResourceReservationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CommittedResourceReservationSpec) MatchesGroup ¶
func (s *CommittedResourceReservationSpec) MatchesGroup(projectID, resourceGroup string) bool
MatchesGroup reports whether the reservation targets the given project and resource group.
type CommittedResourceReservationStatus ¶
type CommittedResourceReservationStatus struct {
// ObservedParentGeneration is the Spec.CommittedResourceReservation.ParentGeneration value
// that this Reservation controller last processed. When it matches ParentGeneration in spec,
// the CR controller knows this reservation is up-to-date for the current CR spec version.
//
// Deprecated: replaced by conditions[Ready].ObservedGeneration signaling. Will be removed once old pods are fully rolled out.
// +kubebuilder:validation:Optional
ObservedParentGeneration int64 `json:"observedParentGeneration,omitempty"`
// Allocation maps workload identifiers to their allocation details.
// Key: workload UUID (vmUUID for virtual machines)
// Value: allocation details including resource consumption and object reference.
// +kubebuilder:validation:Optional
Allocation map[string]CommittedResourceAllocation `json:"allocation,omitempty"`
}
CommittedResourceReservationStatus defines the status fields specific to committed resource reservations.
func (*CommittedResourceReservationStatus) DeepCopy ¶
func (in *CommittedResourceReservationStatus) DeepCopy() *CommittedResourceReservationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommittedResourceReservationStatus.
func (*CommittedResourceReservationStatus) DeepCopyInto ¶
func (in *CommittedResourceReservationStatus) DeepCopyInto(out *CommittedResourceReservationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommittedResourceSpec ¶
type CommittedResourceSpec struct {
// UUID of the commitment this resource corresponds to.
// +kubebuilder:validation:Required
CommitmentUUID string `json:"commitmentUUID"`
// SchedulingDomain specifies the scheduling domain for this committed resource (e.g., "nova", "ironcore").
// +kubebuilder:validation:Optional
SchedulingDomain SchedulingDomain `json:"schedulingDomain,omitempty"`
// FlavorGroupName identifies the flavor group this commitment targets, e.g. "kvm_v2_hana_s".
// +kubebuilder:validation:Required
FlavorGroupName string `json:"flavorGroupName"`
// ResourceType identifies the kind of resource committed: memory drives Reservation slots; cores uses an arithmetic check only.
// +kubebuilder:validation:Enum=memory;cores
// +kubebuilder:validation:Required
ResourceType CommittedResourceType `json:"resourceType"`
// Amount is the total committed quantity.
// memory: MiB expressed in K8s binary SI notation (e.g. "1280Gi", "640Mi").
// cores: integer core count (e.g. "40").
// +kubebuilder:validation:Required
Amount resource.Quantity `json:"amount"`
// AvailabilityZone specifies the availability zone for this commitment.
// +kubebuilder:validation:Required
AvailabilityZone string `json:"availabilityZone"`
// ProjectID of the OpenStack project this commitment belongs to.
// +kubebuilder:validation:Required
ProjectID string `json:"projectID"`
// DomainID of the OpenStack domain this commitment belongs to.
// +kubebuilder:validation:Required
DomainID string `json:"domainID"`
// StartTime is the activation time for Reservation slots.
// Nil for guaranteed commitments (slots are active from creation); set to ConfirmedAt for confirmed ones.
// +kubebuilder:validation:Optional
StartTime *metav1.Time `json:"startTime,omitempty"`
// EndTime is when Reservation slots expire. Nil for unbounded commitments with no expiry.
// +kubebuilder:validation:Optional
EndTime *metav1.Time `json:"endTime,omitempty"`
// ConfirmedAt is when the commitment was confirmed.
// +kubebuilder:validation:Optional
ConfirmedAt *metav1.Time `json:"confirmedAt,omitempty"`
// State is the lifecycle state of the commitment.
// +kubebuilder:validation:Enum=planned;pending;guaranteed;confirmed;superseded;expired
// +kubebuilder:validation:Required
State CommitmentStatus `json:"state"`
// AllowRejection controls what the CommittedResource controller does when placement fails
// for a guaranteed or confirmed commitment.
// true — controller may reject: on failure, child Reservations are rolled back and the CR
// is marked Rejected. Use this when the caller is making a first-time placement
// decision and a "no" answer is acceptable (e.g. the change-commitments API).
// false — controller must retry: on failure, existing child Reservations are kept and the
// CR is set to Reserving so the controller retries later. Use this when the caller
// is restoring already-committed state that Cortex must honour (e.g. the syncer).
// Only meaningful for state=guaranteed or state=confirmed; ignored for all other states.
// +kubebuilder:validation:Optional
AllowRejection bool `json:"allowRejection,omitempty"`
}
CommittedResourceSpec defines the desired state of CommittedResource,
func (*CommittedResourceSpec) DeepCopy ¶
func (in *CommittedResourceSpec) DeepCopy() *CommittedResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommittedResourceSpec.
func (*CommittedResourceSpec) DeepCopyInto ¶
func (in *CommittedResourceSpec) DeepCopyInto(out *CommittedResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CommittedResourceSpec) IsActive ¶
func (s *CommittedResourceSpec) IsActive() bool
IsActive reports whether the commitment spec has active Reservation slots (state is confirmed or guaranteed).
type CommittedResourceStatus ¶
type CommittedResourceStatus struct {
// AcceptedSpec is a snapshot of Spec from the last successful reconcile.
// Used by rollbackToAccepted to restore the exact previously-accepted placement (AZ, amount,
// project, domain, flavor group) even when the current spec has already been mutated to a new value.
// +kubebuilder:validation:Optional
AcceptedSpec *CommittedResourceSpec `json:"acceptedSpec,omitempty"`
// AcceptedAt is when the controller last successfully reconciled the spec into Reservation slots.
// +kubebuilder:validation:Optional
AcceptedAt *metav1.Time `json:"acceptedAt,omitempty"`
// LastReconcileAt is when the controller last ran its reconcile loop for this resource.
// +kubebuilder:validation:Optional
LastReconcileAt *metav1.Time `json:"lastReconcileAt,omitempty"`
// Billing holds the computed billing assignment for this commitment.
// Written by the UsageReconciler. Use this instead of the deprecated flat billing fields.
// +kubebuilder:validation:Optional
Billing *BillingStatus `json:"billing,omitempty"`
// Deprecated: use Status.Billing.AssignedInstances
// AssignedInstances holds the UUIDs of VM instances deterministically assigned to this committed resource.
// Populated by the usage reconciler; used to compute UsedResources and drive the quota controller.
// +kubebuilder:validation:Optional
AssignedInstances []string `json:"assignedInstances,omitempty"`
// Deprecated: use Status.Billing.UsedResources
// UsedResources is the total resource consumption of assigned VM instances, keyed by resource type
// (e.g. "memory" in MiB binary SI, "cpu" as core count). Populated by the usage reconciler.
// +kubebuilder:validation:Optional
UsedResources map[string]resource.Quantity `json:"usedResources,omitempty"`
// Deprecated: use Status.Billing.LastReconcileAt
// LastUsageReconcileAt is when the usage reconciler last updated AssignedInstances and UsedResources.
// +kubebuilder:validation:Optional
LastUsageReconcileAt *metav1.Time `json:"lastUsageReconcileAt,omitempty"`
// Deprecated: use Status.Billing.ObservedGeneration
// UsageObservedGeneration is the CR generation that the usage reconciler last processed.
// Follows the Kubernetes observedGeneration pattern: when this differs from
// metadata.generation the cooldown is bypassed so spec changes (e.g. shrink) are reflected
// immediately rather than waiting for the next cooldown interval.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Minimum=0
UsageObservedGeneration *int64 `json:"usageObservedGeneration,omitempty"`
// Conditions holds the current status conditions.
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// StatusSummary is a compact human-readable summary for kubectl wide view.
// Written by the CR controller and refreshed by the usage reconciler.
// +kubebuilder:validation:Optional
StatusSummary string `json:"statusSummary,omitempty"`
}
CommittedResourceStatus defines the observed state of CommittedResource.
func (*CommittedResourceStatus) DeepCopy ¶
func (in *CommittedResourceStatus) DeepCopy() *CommittedResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommittedResourceStatus.
func (*CommittedResourceStatus) DeepCopyInto ¶
func (in *CommittedResourceStatus) DeepCopyInto(out *CommittedResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommittedResourceType ¶
type CommittedResourceType string
CommittedResourceType identifies the kind of resource a commitment covers.
const ( // CommittedResourceTypeMemory: RAM commitment; drives flavor-based Reservation slot creation. CommittedResourceTypeMemory CommittedResourceType = "memory" // CommittedResourceTypeCores: CPU core commitment; verified arithmetically, no Reservation slots created. CommittedResourceTypeCores CommittedResourceType = "cores" )
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 {
// SchedulingDomain defines in which scheduling domain this datasource
// is used (e.g., nova, cinder, manila).
SchedulingDomain SchedulingDomain `json:"schedulingDomain"`
// 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"`
// 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"`
}
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.
type DatasourceType ¶
type DatasourceType string
const ( // DatasourceTypePrometheus indicates a Prometheus datasource. DatasourceTypePrometheus DatasourceType = "prometheus" // DatasourceTypeOpenStack indicates an OpenStack datasource. DatasourceTypeOpenStack DatasourceType = "openstack" )
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 status conditions of the descheduling.
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// 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 DetectorSpec ¶
type DetectorSpec struct {
// The name of the scheduler step in the cortex implementation.
// Must match to a step implemented by the pipeline controller.
Name string `json:"name"`
// Additional configuration for the step that can be used
// +kubebuilder:validation:Optional
Params Parameters `json:"params,omitempty"`
// Additional description of the step which helps understand its purpose
// and decisions made by it.
// +kubebuilder:validation:Optional
Description string `json:"description,omitempty"`
}
func (*DetectorSpec) DeepCopy ¶
func (in *DetectorSpec) DeepCopy() *DetectorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DetectorSpec.
func (*DetectorSpec) DeepCopyInto ¶
func (in *DetectorSpec) DeepCopyInto(out *DetectorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DrainActionSpec ¶
type DrainActionSpec struct {
// Reserve indicates whether the capacity freed by draining should be
// reserved to prevent it from being used by other workloads.
// +kubebuilder:validation:Optional
Reserve bool `json:"reserve,omitempty"`
// Target describes the hosts and entities to drain.
// +kubebuilder:validation:Optional
Target DrainTarget `json:"target,omitempty,omitzero"`
// Constraints configures how the drain action is executed.
// +kubebuilder:validation:Optional
Constraints DrainConstraints `json:"constraints,omitempty,omitzero"`
}
DrainActionSpec defines the spec fields specific to the drain action.
func (*DrainActionSpec) DeepCopy ¶
func (in *DrainActionSpec) DeepCopy() *DrainActionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrainActionSpec.
func (*DrainActionSpec) DeepCopyInto ¶
func (in *DrainActionSpec) DeepCopyInto(out *DrainActionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DrainConstraintMode ¶
type DrainConstraintMode string
DrainConstraintMode defines how strictly the drain constraints are enforced.
const ( // DrainConstraintModeAll requires all targeted entities to be moved for the // request to succeed. DrainConstraintModeAll DrainConstraintMode = "all" // DrainConstraintModeBestEffort moves as many targeted entities as possible // without failing the request when some cannot be moved. DrainConstraintModeBestEffort DrainConstraintMode = "bestEffort" )
type DrainConstraints ¶
type DrainConstraints struct {
// Mode defines how strictly the constraints are enforced.
// +kubebuilder:validation:Enum=all;bestEffort
// +kubebuilder:validation:Optional
Mode DrainConstraintMode `json:"mode,omitempty"`
}
DrainConstraints configures how the drain action is executed.
func (*DrainConstraints) DeepCopy ¶
func (in *DrainConstraints) DeepCopy() *DrainConstraints
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrainConstraints.
func (*DrainConstraints) DeepCopyInto ¶
func (in *DrainConstraints) DeepCopyInto(out *DrainConstraints)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DrainEntityKind ¶
type DrainEntityKind string
DrainEntityKind defines the kind of entity targeted by a drain action.
const ( // DrainEntityKindVM targets a virtual machine. The entity moved is the VM // itself: its Nova server is live-migrated to another host. The ref name is // the Nova server uuid, which is also the name of the (cluster-scoped) // vm-operator VirtualMachine resource. During the Nova->CRD migration a // VirtualMachine resource may not exist yet for a given uuid; such a ref is // still valid and simply does not resolve to a CRD until one is created // (this transitional case is expected to go away). DrainEntityKindVM DrainEntityKind = "vm" // DrainEntityKindReservation targets a reservation. The entity moved is the // reservation object itself (a movable failover or committed-resource // Reservation), not any workload that may be associated with it. The ref // name is the Reservation resource name. DrainEntityKindReservation DrainEntityKind = "reservation" )
type DrainTarget ¶
type DrainTarget struct {
// Hosts are the hosts to drain entities from.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxItems=10
Hosts []DrainTargetHost `json:"hosts,omitempty"`
}
DrainTarget describes where the drain action should act.
func (*DrainTarget) DeepCopy ¶
func (in *DrainTarget) DeepCopy() *DrainTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrainTarget.
func (*DrainTarget) DeepCopyInto ¶
func (in *DrainTarget) DeepCopyInto(out *DrainTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DrainTargetEntity ¶
type DrainTargetEntity struct {
// Entity references the entity to move.
// +kubebuilder:validation:Required
Entity EntityRef `json:"entity"`
}
DrainTargetEntity identifies a single entity that should be moved off a host.
func (*DrainTargetEntity) DeepCopy ¶
func (in *DrainTargetEntity) DeepCopy() *DrainTargetEntity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrainTargetEntity.
func (*DrainTargetEntity) DeepCopyInto ¶
func (in *DrainTargetEntity) DeepCopyInto(out *DrainTargetEntity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DrainTargetHost ¶
type DrainTargetHost struct {
// Host references the host to drain entities from.
// +kubebuilder:validation:Required
Host HostRef `json:"host"`
// Entities are the entities on the host that should be moved. If empty, all
// movable entities on the host are drained.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxItems=1000
Entities []DrainTargetEntity `json:"entities,omitempty"`
}
DrainTargetHost names a host and the entities on it that should be moved.
func (*DrainTargetHost) DeepCopy ¶
func (in *DrainTargetHost) DeepCopy() *DrainTargetHost
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrainTargetHost.
func (*DrainTargetHost) DeepCopyInto ¶
func (in *DrainTargetHost) DeepCopyInto(out *DrainTargetHost)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EntityRef ¶
type EntityRef struct {
// Kind is the kind of the referenced entity.
// +kubebuilder:validation:Enum=vm;reservation
// +kubebuilder:validation:Required
Kind DrainEntityKind `json:"kind"`
// Name is the name of the referenced entity: the Nova server uuid for a vm
// (the VirtualMachine resource name) or the Reservation resource name.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MaxLength=253
Name string `json:"name"`
// AvailabilityZone is the availability zone the entity belongs to. Defaults
// to the request's availability zone when unset.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxLength=253
AvailabilityZone string `json:"availabilityZone,omitempty"`
}
EntityRef references a movable entity: a vm-operator VirtualMachine or a Reservation, discriminated by Kind. Like HostRef it is a purpose-built reference (see HostRef) carrying the entity id in Name so routine handling does not need to fetch the referenced resource.
Both VirtualMachine and Reservation are cluster-scoped (so no namespace) and live in the lighthouse cluster routed by AvailabilityZone, which defaults to the request's spec.availabilityZone.
func (*EntityRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EntityRef.
func (*EntityRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FailoverHostReservationSpec ¶
type FailoverHostReservationSpec struct {
// SourceHosts is a list of hosts inside the same failover partition from
// which a failover event towards the target host may originate.
// See Spec.TargetHost for the target host of the failover reservation.
// +kubebuilder:validation:Optional
SourceHosts []string `json:"sourceHosts,omitempty"`
// PartitionDescription is a short, human-readable label describing the
// failover partition this reservation belongs to: what distinguishes its
// hosts from other partitions (e.g. "spec.aggregates=[hana]") and which
// flavors the whole partition can run (e.g. "flavors: hana.4xl, hana.8xl
// (+3 more)"). It carries no scheduling semantics and exists purely to make a
// reservation understandable at a glance — in particular, which workloads a
// reserved host stands ready to absorb. See describePartition in the
// failoverhost controller.
// +kubebuilder:validation:Optional
PartitionDescription string `json:"partitionDescription,omitempty"`
}
FailoverHostReservationSpec defines the spec fields specific to failover host reservations. See ReservationTypeFailoverHost.
func (*FailoverHostReservationSpec) DeepCopy ¶
func (in *FailoverHostReservationSpec) DeepCopy() *FailoverHostReservationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailoverHostReservationSpec.
func (*FailoverHostReservationSpec) DeepCopyInto ¶
func (in *FailoverHostReservationSpec) DeepCopyInto(out *FailoverHostReservationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FailoverHostReservationStatus ¶
type FailoverHostReservationStatus struct {
// SourceHost is the actual host from which the failover event originates.
// Only set when the condition ConditionTypeFailoverHostInUse is True.
// +kubebuilder:validation:Optional
SourceHost string `json:"sourceHost,omitempty"`
}
FailoverHostReservationStatus defines the status fields specific to failover host reservations.
func (*FailoverHostReservationStatus) DeepCopy ¶
func (in *FailoverHostReservationStatus) DeepCopy() *FailoverHostReservationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailoverHostReservationStatus.
func (*FailoverHostReservationStatus) DeepCopyInto ¶
func (in *FailoverHostReservationStatus) DeepCopyInto(out *FailoverHostReservationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FailoverReservationSpec
deprecated
type FailoverReservationSpec struct {
// ResourceGroup is the group/category of the resource (e.g., "hana_medium_v2").
// +kubebuilder:validation:Optional
ResourceGroup string `json:"resourceGroup,omitempty"`
}
FailoverReservationSpec defines the spec fields specific to failover reservations.
Deprecated: FailoverReservations will be replaced with FailoverHostReservations. See FailoverHostReservationSpec.
func (*FailoverReservationSpec) DeepCopy ¶
func (in *FailoverReservationSpec) DeepCopy() *FailoverReservationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailoverReservationSpec.
func (*FailoverReservationSpec) DeepCopyInto ¶
func (in *FailoverReservationSpec) DeepCopyInto(out *FailoverReservationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FailoverReservationStatus
deprecated
type FailoverReservationStatus struct {
// Allocations maps VM/instance UUIDs to the host they are currently allocated on.
// Key: VM/instance UUID, Value: Host name where the VM is currently running.
// +kubebuilder:validation:Optional
Allocations map[string]string `json:"allocations,omitempty"`
// LastChanged tracks when the reservation was last modified.
// This is used to track pending changes that need acknowledgment.
// +kubebuilder:validation:Optional
LastChanged *metav1.Time `json:"lastChanged,omitempty"`
// AcknowledgedAt is the timestamp when the last change was acknowledged.
// When nil, the reservation is in a pending state awaiting acknowledgment.
// This does not affect the Ready condition - reservations are still considered
// ready even when not yet acknowledged.
// +kubebuilder:validation:Optional
AcknowledgedAt *metav1.Time `json:"acknowledgedAt,omitempty"`
}
FailoverReservationStatus defines the status fields specific to failover reservations.
Deprecated: FailoverReservations will be replaced with FailoverHostReservations. See FailoverHostReservationStatus.
func (*FailoverReservationStatus) DeepCopy ¶
func (in *FailoverReservationStatus) DeepCopy() *FailoverReservationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailoverReservationStatus.
func (*FailoverReservationStatus) DeepCopyInto ¶
func (in *FailoverReservationStatus) DeepCopyInto(out *FailoverReservationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FilterSpec ¶
type FilterSpec struct {
// The name of the scheduler step in the cortex implementation.
// Must match to a step implemented by the pipeline controller.
Name string `json:"name"`
// Additional configuration for the step that can be used
// +kubebuilder:validation:Optional
Params Parameters `json:"params,omitempty"`
// Additional description of the step which helps understand its purpose
// and decisions made by it.
// +kubebuilder:validation:Optional
Description string `json:"description,omitempty"`
}
func (*FilterSpec) DeepCopy ¶
func (in *FilterSpec) DeepCopy() *FilterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FilterSpec.
func (*FilterSpec) DeepCopyInto ¶
func (in *FilterSpec) DeepCopyInto(out *FilterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FlavorCapacityStatus ¶
type FlavorCapacityStatus struct {
// FlavorName is the OpenStack flavor name (e.g. "hana-v2-small").
FlavorName string `json:"flavorName"`
// PlaceableHosts is the number of hosts that can still fit this flavor given current allocations.
// +kubebuilder:validation:Optional
PlaceableHosts int64 `json:"placeableHosts,omitempty"`
// PlaceableVMs is the number of VM slots remaining for this flavor given current allocations.
// +kubebuilder:validation:Optional
PlaceableVMs int64 `json:"placeableVms,omitempty"`
// TotalCapacityHosts is the number of eligible hosts assuming an empty datacenter.
// +kubebuilder:validation:Optional
TotalCapacityHosts int64 `json:"totalCapacityHosts,omitempty"`
// TotalCapacityVMSlots is the maximum number of VM slots assuming an empty datacenter.
// +kubebuilder:validation:Optional
TotalCapacityVMSlots int64 `json:"totalCapacityVmSlots,omitempty"`
}
FlavorCapacityStatus holds per-flavor scheduler probe results for one (flavor group × AZ) pair. These values come directly from scheduler probes and are independent of the cross-group capacity split (see FreeCapacity and ExclusivelyFreeCapacity on the parent status). "Placeable" means: if all remaining capacity in this AZ were used solely by this flavor, this is how many would fit. It does not account for competing flavor groups.
func (*FlavorCapacityStatus) DeepCopy ¶
func (in *FlavorCapacityStatus) DeepCopy() *FlavorCapacityStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorCapacityStatus.
func (*FlavorCapacityStatus) DeepCopyInto ¶
func (in *FlavorCapacityStatus) DeepCopyInto(out *FlavorCapacityStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FlavorGroupCapacity ¶
type FlavorGroupCapacity struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// +required
Spec FlavorGroupCapacitySpec `json:"spec"`
// +optional
Status FlavorGroupCapacityStatus `json:"status,omitempty,omitzero"`
}
FlavorGroupCapacity caches pre-computed capacity data for one flavor group in one AZ. One CRD exists per (flavor group × AZ) pair, updated by the capacity controller on a fixed interval. The capacity API reads these CRDs instead of probing the scheduler on each request.
func (*FlavorGroupCapacity) DeepCopy ¶
func (in *FlavorGroupCapacity) DeepCopy() *FlavorGroupCapacity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorGroupCapacity.
func (*FlavorGroupCapacity) DeepCopyInto ¶
func (in *FlavorGroupCapacity) DeepCopyInto(out *FlavorGroupCapacity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FlavorGroupCapacity) DeepCopyObject ¶
func (in *FlavorGroupCapacity) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FlavorGroupCapacityList ¶
type FlavorGroupCapacityList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []FlavorGroupCapacity `json:"items"`
}
FlavorGroupCapacityList contains a list of FlavorGroupCapacity.
func (*FlavorGroupCapacityList) DeepCopy ¶
func (in *FlavorGroupCapacityList) DeepCopy() *FlavorGroupCapacityList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorGroupCapacityList.
func (*FlavorGroupCapacityList) DeepCopyInto ¶
func (in *FlavorGroupCapacityList) DeepCopyInto(out *FlavorGroupCapacityList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FlavorGroupCapacityList) DeepCopyObject ¶
func (in *FlavorGroupCapacityList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FlavorGroupCapacitySpec ¶
type FlavorGroupCapacitySpec struct {
// FlavorGroup is the name of the flavor group (e.g. "hana-v2").
// +kubebuilder:validation:Required
FlavorGroup string `json:"flavorGroup"`
// AvailabilityZone is the OpenStack AZ this capacity data covers (e.g. "qa-de-1a").
// +kubebuilder:validation:Required
AvailabilityZone string `json:"availabilityZone"`
}
FlavorGroupCapacitySpec defines the desired state of FlavorGroupCapacity.
func (*FlavorGroupCapacitySpec) DeepCopy ¶
func (in *FlavorGroupCapacitySpec) DeepCopy() *FlavorGroupCapacitySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorGroupCapacitySpec.
func (*FlavorGroupCapacitySpec) DeepCopyInto ¶
func (in *FlavorGroupCapacitySpec) DeepCopyInto(out *FlavorGroupCapacitySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FlavorGroupCapacityStatus ¶
type FlavorGroupCapacityStatus struct {
// Flavors holds per-flavor capacity data for all flavors in the group.
// +kubebuilder:validation:Optional
Flavors []FlavorCapacityStatus `json:"flavors,omitempty"`
// CommittedCapacity is the sum of AcceptedAmount across active CommittedResource CRDs,
// expressed in multiples of the smallest flavor's memory.
// +kubebuilder:validation:Optional
CommittedCapacity int64 `json:"committedCapacity,omitempty"`
// CommittedCapacityBytes is CommittedCapacity converted to raw bytes.
// +kubebuilder:validation:Optional
CommittedCapacityBytes int64 `json:"committedCapacityBytes,omitempty"`
// SmallestFlavorName is the name of the smallest flavor in this group, used as the
// slot unit for ExclusivelyFreeSlots and related capacity fields.
// +kubebuilder:validation:Optional
SmallestFlavorName string `json:"smallestFlavorName,omitempty"`
// TotalCapacity is the installed capacity across all eligible hosts in an empty-datacenter
// scenario, expressed as raw resource amounts (bytes for memory, count for cores).
// +kubebuilder:validation:Optional
TotalCapacity map[string]resource.Quantity `json:"totalCapacity,omitempty"`
// FreeCapacity is the sum of remaining resources across all candidate hosts for this
// group given current allocations. Because groups can share hosts, the sum across groups
// may exceed actual installed capacity — this field reflects per-group availability
// before any cross-group fairness split.
// +kubebuilder:validation:Optional
FreeCapacity map[string]resource.Quantity `json:"freeCapacity,omitempty"`
// ExclusivelyFreeCapacity is the share of remaining resources fairly attributed to this
// group by the round-robin capacity split. The sum across all groups for an AZ never
// exceeds actual installed capacity.
// +kubebuilder:validation:Optional
ExclusivelyFreeCapacity map[string]resource.Quantity `json:"exclusivelyFreeCapacity,omitempty"`
// ExclusivelyRawCapacity is the unquantized sum of effective memory and CPU attributed to this
// group, not constrained by slot packing or CPU/memory ratio. It is computed differently by
// group type:
// - Variable-ratio groups (e.g. general-purpose), which consume it for the _ram report and
// today are a single group with hosts exclusive to it, sum over ALL eligible hosts (the
// smallest flavor's empty-datacenter candidates), including fully occupied ones — so it
// reflects true installed hardware without the occupied-host dropout a placeable-only sum
// would suffer.
// - Fixed-ratio groups (e.g. HANA) share hosts across multiple flavor groups, so an
// all-eligible sum would double-count. They instead sum only the round-robin split's
// exclusively-assigned hosts, which stays disjoint across groups (no host counted twice).
// These groups do not read this field for capacity; it is informational (metrics) only.
// +kubebuilder:validation:Optional
ExclusivelyRawCapacity map[string]resource.Quantity `json:"exclusivelyRawCapacity,omitempty"`
// ExclusivelyFreeSlots is the number of smallest-flavor VM slots available from ExclusivelyFreeCapacity.
// +kubebuilder:validation:Optional
ExclusivelyFreeSlots int64 `json:"exclusivelyFreeSlots,omitempty"`
// ExclusivelyCommittedReservedCapacity is the committed-resource share of reservation-blocked
// memory and CPU: unfilled committed slots, attributed to this group by each reservation's own
// ResourceGroup. These slots are neither running nor free but represent installed hardware held
// for a customer, so they stay included in reported capacity. Disjoint from
// ExclusivelyFailoverReservedCapacity; each reservation belongs to one group, so the sum across
// groups never exceeds capacity.
// +kubebuilder:validation:Optional
ExclusivelyCommittedReservedCapacity map[string]resource.Quantity `json:"exclusivelyCommittedReservedCapacity,omitempty"`
// ExclusivelyCommittedReservedSlots is the number of smallest-flavor VM slots represented by
// ExclusivelyCommittedReservedCapacity.
// +kubebuilder:validation:Optional
ExclusivelyCommittedReservedSlots int64 `json:"exclusivelyCommittedReservedSlots,omitempty"`
// ExclusivelyFailoverReservedCapacity is the failover share of reservation-blocked memory and
// CPU. Failover reservations hold hardware out of service for host evacuation, so they are
// excluded from reported capacity. Disjoint from ExclusivelyCommittedReservedCapacity.
// +kubebuilder:validation:Optional
ExclusivelyFailoverReservedCapacity map[string]resource.Quantity `json:"exclusivelyFailoverReservedCapacity,omitempty"`
// ExclusivelyFailoverReservedSlots is the number of smallest-flavor VM slots represented by
// ExclusivelyFailoverReservedCapacity.
// +kubebuilder:validation:Optional
ExclusivelyFailoverReservedSlots int64 `json:"exclusivelyFailoverReservedSlots,omitempty"`
// RunningInstances is the number of VMs running in this (flavor group × AZ) whose
// flavor belongs to this group.
// +kubebuilder:validation:Optional
RunningInstances int64 `json:"runningInstances,omitempty"`
// RunningResources is the total resource consumption of running VMs, keyed by resource type.
// +kubebuilder:validation:Optional
RunningResources map[string]resource.Quantity `json:"runningResources,omitempty"`
// RunningSlots is the number of smallest-flavor VM slots the running VMs' resource consumption
// occupies (min over memory and CPU). Unlike RunningInstances, which counts VMs, this scales
// with VM size: a VM larger than the smallest flavor occupies several slots. Reported capacity
// uses this so heterogeneous groups are not undercounted.
// +kubebuilder:validation:Optional
RunningSlots int64 `json:"runningSlots,omitempty"`
// LastReconcileAt is the timestamp of the last successful reconcile.
// +kubebuilder:validation:Optional
LastReconcileAt metav1.Time `json:"lastReconcileAt,omitempty"`
// The current status conditions of the FlavorGroupCapacity.
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}
FlavorGroupCapacityStatus defines the observed state of FlavorGroupCapacity.
func (*FlavorGroupCapacityStatus) DeepCopy ¶
func (in *FlavorGroupCapacityStatus) DeepCopy() *FlavorGroupCapacityStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorGroupCapacityStatus.
func (*FlavorGroupCapacityStatus) DeepCopyInto ¶
func (in *FlavorGroupCapacityStatus) DeepCopyInto(out *FlavorGroupCapacityStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostRef ¶
type HostRef struct {
// Name is the name of the Hypervisor (the host name).
// +kubebuilder:validation:Required
// +kubebuilder:validation:MaxLength=253
Name string `json:"name"`
// AvailabilityZone is the availability zone the host belongs to. Defaults to
// the request's availability zone when unset.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxLength=253
AvailabilityZone string `json:"availabilityZone,omitempty"`
}
HostRef references a host to act on: a (cluster-scoped) Hypervisor resource identified by name. It is a purpose-built reference rather than a generic corev1.ObjectReference, whose own documentation discourages new embedded uses (ignored fields, no per-use validation) and recommends a locally focused type.
Name is the host id and is carried in the ref so routine handling does not need to fetch the Hypervisor. AvailabilityZone is the routing key the multicluster client uses to reach the right cluster; it defaults to the request's spec.availabilityZone (a drain request is AZ-scoped). Hypervisor resources currently live in a compute cluster and are not AZ-unique once an AZ spans several compute clusters; resolving a host to its cluster is left to the multicluster client so the ref survives that topology change (and a possible future move of the Hypervisor CRD into the lighthouse cluster).
func (*HostRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostRef.
func (*HostRef) DeepCopyInto ¶
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 InFlightReservationSpec ¶
type InFlightReservationSpec struct {
// VMID is the OpenStack server uuid from Nova assigned to the virtual
// machine expected to land on this reservation slot. It identifies the
// subject of the reservation (what is being placed), which is distinct
// from the reservation's owner (what controls its lifecycle, expressed via
// ownerReferences).
//
// TODO: generalize this into a domain-agnostic subject identifier once a
// non-Nova use case needs in-flight reservations. For now (KISS) we always
// have a VM uuid, so we keep this Nova-specific field.
VMID string `json:"vmID,omitempty"`
// UserID is the identifier of the user who owns the virtual machine.
UserID string `json:"userID,omitempty"`
// ProjectID is the identifier of the project/tenant that owns
// the virtual machine.
ProjectID string `json:"projectID,omitempty"`
// Intent defines which kind of virtual machine lifecycle operation
// triggered the placement of this in-flight reservation. The reconciler
// dispatches on this to decide which terminal signal releases the
// reservation.
// +kubebuilder:validation:Optional
Intent SchedulingIntent `json:"intent"`
// OperationID groups all in-flight reservations created within a single
// scheduling call (e.g. one reservation per candidate host for an initial
// placement, or target + source host for a live migration). It is a
// Cortex-generated, time-sortable uuid (UUIDv7), independent of any
// external caller's request id, so uniqueness does not depend on callers.
//
// When one operation reaches a terminal state, the reconciler releases
// exactly the reservations sharing this OperationID, leaving concurrent
// operations on the same VM untouched. For VM-owned in-flight reservations,
// when multiple operations exist for the same VM the newest one wins:
// operations are ordered by (metadata.creationTimestamp, OperationID), with
// the UUIDv7 OperationID breaking ties within the timestamp's one-second
// resolution, and older operations' reservations are released.
// +kubebuilder:validation:Optional
OperationID string `json:"operationID,omitempty"`
}
InFlightReservationSpec defines the nature and shape of the virtual machine that is expected to land on the designated reservation slot. This spec carries information needed for the scheduler to produce a valid placement for new virtual machines for the duration the virtual machine is still in buildup.
func (*InFlightReservationSpec) DeepCopy ¶
func (in *InFlightReservationSpec) DeepCopy() *InFlightReservationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InFlightReservationSpec.
func (*InFlightReservationSpec) DeepCopyInto ¶
func (in *InFlightReservationSpec) DeepCopyInto(out *InFlightReservationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InFlightReservationStatus ¶
type InFlightReservationStatus struct{} // No captured state for now.
InFlightReservationStatus defines the status fields specific to in-flight reservations.
func (*InFlightReservationStatus) DeepCopy ¶
func (in *InFlightReservationStatus) DeepCopy() *InFlightReservationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InFlightReservationStatus.
func (*InFlightReservationStatus) DeepCopyInto ¶
func (in *InFlightReservationStatus) DeepCopyInto(out *InFlightReservationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KPI.
func (*KPI) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KPI) DeepCopyObject ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KPIList.
func (*KPIList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KPIList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KPISpec ¶
type KPISpec struct {
// SchedulingDomain defines in which scheduling domain this kpi
// is used (e.g., nova, cinder, manila).
SchedulingDomain SchedulingDomain `json:"schedulingDomain"`
// 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KPISpec.
func (*KPISpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KPIStatus ¶
type KPIStatus struct {
// 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"`
}
func (*KPIStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KPIStatus.
func (*KPIStatus) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Knowledge.
func (*Knowledge) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Knowledge) DeepCopyObject ¶
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 ¶
func (in *KnowledgeDependenciesSpec) DeepCopy() *KnowledgeDependenciesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnowledgeDependenciesSpec.
func (*KnowledgeDependenciesSpec) DeepCopyInto ¶
func (in *KnowledgeDependenciesSpec) DeepCopyInto(out *KnowledgeDependenciesSpec)
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 ¶
func (in *KnowledgeExtractorSpec) DeepCopy() *KnowledgeExtractorSpec
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 {
// SchedulingDomain defines in which scheduling domain this knowledge
// is used (e.g., nova, cinder, manila).
SchedulingDomain SchedulingDomain `json:"schedulingDomain"`
// 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"`
}
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"`
// When the extracted knowledge content last changed.
// Updated only when the Raw data actually changes, not on every reconcile.
// +kubebuilder:validation:Optional
LastContentChange metav1.Time `json:"lastContentChange,omitempty"`
// 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"`
}
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.
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="600s"
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 Parameter ¶
type Parameter struct {
// The key of the parameter.
// +kubebuilder:validation:Required
Key string `json:"key"`
// +kubebuilder:validation:Optional
StringValue *string `json:"stringValue,omitempty"`
// +kubebuilder:validation:Optional
BoolValue *bool `json:"boolValue,omitempty"`
// +kubebuilder:validation:Optional
IntValue *int64 `json:"intValue,omitempty"`
// +kubebuilder:validation:Optional
FloatValue *float64 `json:"floatValue,omitempty"`
// +kubebuilder:validation:Optional
StringListValue *[]string `json:"stringListValue,omitempty"`
// +kubebuilder:validation:Optional
FloatMapValue *map[string]float64 `json:"floatMapValue,omitempty"`
// +kubebuilder:validation:Optional
StringListMapValue *map[string][]string `json:"stringListMapValue,omitempty"`
}
Parameter is a struct that can be used to define parameters for filters, weighers, and other resources that need flexible configuration.
It is strongly encouraged to use this type for configuration of resources at it provides a more strict schema and validation compared to using runtime.RawExtension directly.
func (*Parameter) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Parameter.
func (*Parameter) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Parameters ¶
type Parameters []Parameter
Parameters is a list of Parameter structs that can be used to define multiple parameters for filters, weighers, and other resources that need flexible but limited configuration.
func (Parameters) DeepCopy ¶
func (in Parameters) DeepCopy() Parameters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Parameters.
func (Parameters) DeepCopyInto ¶
func (in Parameters) DeepCopyInto(out *Parameters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pipeline.
func (*Pipeline) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Pipeline) DeepCopyObject ¶
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 {
// SchedulingDomain defines in which scheduling domain this pipeline
// is used (e.g., nova, cinder, manila).
SchedulingDomain SchedulingDomain `json:"schedulingDomain"`
// An optional description of the pipeline, helping understand its purpose.
// +kubebuilder:validation:Optional
Description string `json:"description,omitempty"`
// The type of the pipeline, used to differentiate between
// filter-weigher and detector pipelines within the same
// scheduling domain.
//
// If the type is filter-weigher, the filter and weigher attributes
// must be set. If the type is detector, the detectors attribute
// must be set.
//
// +kubebuilder:validation:Enum=filter-weigher;detector
Type PipelineType `json:"type"`
// Ordered list of filters to apply in a scheduling pipeline.
//
// This attribute is set only if the pipeline type is filter-weigher.
// Filters remove host candidates from an initial set, leaving
// valid candidates. Filters are run before weighers are applied.
// +kubebuilder:validation:Optional
Filters []FilterSpec `json:"filters,omitempty"`
// Ordered list of weighers to apply in a scheduling pipeline.
//
// This attribute is set only if the pipeline type is filter-weigher.
// These weighers are run after filters are applied.
// +kubebuilder:validation:Optional
Weighers []WeigherSpec `json:"weighers,omitempty"`
// Ordered list of detectors to apply in a descheduling pipeline.
//
// This attribute is set only if the pipeline type is detector.
// Detectors find candidates for descheduling (migration off current host).
// These detectors are run after weighers are applied.
// +kubebuilder:validation:Optional
Detectors []DetectorSpec `json:"detectors,omitempty"`
}
PipelineSpec defines the desired state of a scheduling or descheduling pipeline.
The structural constraints between type and the step lists are enforced by the API server via CEL, so they hold regardless of which controller version is running. Version-specific checks (whether a referenced step exists in the running controller and whether its params are valid) are surfaced as admission warnings by the pipeline webhook, not hard rejections, so a rolling upgrade is never blocked. +kubebuilder:validation:XValidation:rule="self.type != 'detector' || (!has(self.filters) && !has(self.weighers))",message="detector pipelines must not set filters or weighers" +kubebuilder:validation:XValidation:rule="self.type != 'filter-weigher' || !has(self.detectors)",message="filter-weigher pipelines must not set detectors"
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 {
// The current status conditions of the pipeline.
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}
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 detector steps, e.g. for generating descheduling // recommendations. PipelineTypeDetector PipelineType = "detector" )
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 ProjectQuota ¶
type ProjectQuota struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// +required
Spec ProjectQuotaSpec `json:"spec"`
// +optional
Status ProjectQuotaStatus `json:"status,omitempty,omitzero"`
}
ProjectQuota is the Schema for the projectquotas API. It persists quota values pushed by Limes via the LIQUID quota endpoint (PUT /v1/projects/:uuid/quota → liquid.ServiceQuotaRequest). Each CRD stores quota for one project in one availability zone. In a multi-cluster setup, it is routed to the cluster serving that AZ. See: https://pkg.go.dev/github.com/sapcc/go-api-declarations/liquid#ServiceQuotaRequest
func (*ProjectQuota) DeepCopy ¶
func (in *ProjectQuota) DeepCopy() *ProjectQuota
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectQuota.
func (*ProjectQuota) DeepCopyInto ¶
func (in *ProjectQuota) DeepCopyInto(out *ProjectQuota)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProjectQuota) DeepCopyObject ¶
func (in *ProjectQuota) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProjectQuotaList ¶
type ProjectQuotaList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ProjectQuota `json:"items"`
}
ProjectQuotaList contains a list of ProjectQuota
func (*ProjectQuotaList) DeepCopy ¶
func (in *ProjectQuotaList) DeepCopy() *ProjectQuotaList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectQuotaList.
func (*ProjectQuotaList) DeepCopyInto ¶
func (in *ProjectQuotaList) DeepCopyInto(out *ProjectQuotaList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProjectQuotaList) DeepCopyObject ¶
func (in *ProjectQuotaList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProjectQuotaSpec ¶
type ProjectQuotaSpec struct {
// ProjectID of the OpenStack project this quota belongs to.
// Corresponds to the :uuid in the PUT URL path.
// +kubebuilder:validation:Required
ProjectID string `json:"projectID"`
// ProjectName is the human-readable name of the OpenStack project.
// Extracted from liquid.ServiceQuotaRequest.ProjectMetadata.Name.
// +kubebuilder:validation:Optional
ProjectName string `json:"projectName,omitempty"`
// DomainID of the OpenStack domain this project belongs to.
// Extracted from liquid.ServiceQuotaRequest.ProjectMetadata.Domain.UUID.
// +kubebuilder:validation:Required
DomainID string `json:"domainID"`
// DomainName is the human-readable name of the OpenStack domain.
// Extracted from liquid.ServiceQuotaRequest.ProjectMetadata.Domain.Name.
// +kubebuilder:validation:Optional
DomainName string `json:"domainName,omitempty"`
// AvailabilityZone is the AZ this quota CRD covers (e.g. "qa-de-1a").
// In a multi-cluster setup, this determines which cluster the CRD is routed to.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
AvailabilityZone string `json:"availabilityZone"`
// Quota maps LIQUID resource names to their quota value for THIS availability zone.
// Key: liquid.ResourceName (e.g. "hw_version_hana_v2_ram")
// Value: per-AZ quota from liquid.AZResourceQuotaRequest.Quota
// See: https://pkg.go.dev/github.com/sapcc/go-api-declarations/liquid#AZResourceQuotaRequest
// +kubebuilder:validation:Optional
Quota map[string]int64 `json:"quota,omitempty"`
}
ProjectQuotaSpec defines the desired state of ProjectQuota. Populated from PUT /v1/projects/:uuid/quota payloads (liquid.ServiceQuotaRequest). Each ProjectQuota CRD represents quota for ONE project in ONE availability zone. See: https://pkg.go.dev/github.com/sapcc/go-api-declarations/liquid#ServiceQuotaRequest
func (*ProjectQuotaSpec) DeepCopy ¶
func (in *ProjectQuotaSpec) DeepCopy() *ProjectQuotaSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectQuotaSpec.
func (*ProjectQuotaSpec) DeepCopyInto ¶
func (in *ProjectQuotaSpec) DeepCopyInto(out *ProjectQuotaSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProjectQuotaStatus ¶
type ProjectQuotaStatus struct {
// ObservedGeneration is the most recent spec generation that the controller has processed.
// Used to distinguish spec changes (which require TotalUsage recompute) from
// CommittedResource changes (which only need PaygUsage recompute).
// +kubebuilder:validation:Optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// TotalUsage tracks per-resource total resource consumption in this AZ (all VMs in this project+AZ).
// Persisted by the quota controller; updated by full reconcile and HV instance diffs.
// Key: liquid.ResourceName
// +kubebuilder:validation:Optional
TotalUsage map[string]int64 `json:"totalUsage,omitempty"`
// PaygUsage tracks per-resource pay-as-you-go usage in this AZ.
// Derived as TotalUsage - CRUsage (clamped >= 0).
// Key: liquid.ResourceName
// +kubebuilder:validation:Optional
PaygUsage map[string]int64 `json:"paygUsage,omitempty"`
// TotalUsageSummary is a human-readable compact summary of TotalUsage for kubectl wide output.
// Format: "2101: c=18 i=7 r=21; 2152: c=4 i=2 r=8"
// Computed by the quota controller on each status write. Grouped by flavor group.
// +kubebuilder:validation:Optional
TotalUsageSummary string `json:"totalUsageSummary,omitempty"`
// PaygUsageSummary is a human-readable compact summary of PaygUsage for kubectl wide output.
// Format: "2101: c=14 i=5 r=13; 2152: c=4 i=2 r=8"
// Computed by the quota controller on each status write. Grouped by flavor group.
// +kubebuilder:validation:Optional
PaygUsageSummary string `json:"paygUsageSummary,omitempty"`
// LimesUsageSummary shows TotalUsage converted to Limes declared units for debugging.
// RAM for fixed-ratio groups is converted from GiB to slots (GiB*1024/SmallestFlavor.MemoryMB).
// RAM for variable-ratio groups remains in GiB (1:1). Cores and instances are 1:1.
// Format: "2101: c=25 i=8 r=70; 2152: c=4 i=2 r=8"
// +kubebuilder:validation:Optional
LimesUsageSummary string `json:"limesUsageSummary,omitempty"`
// LimesQuotaSummary shows Spec.Quota converted to Limes declared units for debugging.
// Same conversion as LimesUsageSummary: fixed-ratio RAM is GiB→slots, rest 1:1.
// Format: "2101: c=9999 i=9999 r=5039; 2152: c=9999 i=9999 r=20"
// +kubebuilder:validation:Optional
LimesQuotaSummary string `json:"limesQuotaSummary,omitempty"`
// LastReconcileAt is when the controller last reconciled this project's quota (any path).
// +kubebuilder:validation:Optional
LastReconcileAt *metav1.Time `json:"lastReconcileAt,omitempty"`
// LastFullReconcileAt is when the periodic full reconcile last completed for this project.
// Used as the watermark for isVMNewSinceLastReconcile (incremental add detection).
// Only updated by ReconcilePeriodic, NOT by PaygUsage recomputes or incremental deltas.
// +kubebuilder:validation:Optional
LastFullReconcileAt *metav1.Time `json:"lastFullReconcileAt,omitempty"`
// Conditions holds the current status conditions.
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}
ProjectQuotaStatus defines the observed state of ProjectQuota. Usage values correspond to liquid.AZResourceUsageReport fields reported via /report-usage. See: https://pkg.go.dev/github.com/sapcc/go-api-declarations/liquid#AZResourceUsageReport
func (*ProjectQuotaStatus) DeepCopy ¶
func (in *ProjectQuotaStatus) DeepCopy() *ProjectQuotaStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectQuotaStatus.
func (*ProjectQuotaStatus) DeepCopyInto ¶
func (in *ProjectQuotaStatus) DeepCopyInto(out *ProjectQuotaStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
func (in *PrometheusDatasource) DeepCopy() *PrometheusDatasource
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 Rescheduling ¶
type Rescheduling struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// spec defines the desired state of Rescheduling
// +required
Spec ReschedulingSpec `json:"spec"`
// status defines the observed state of Rescheduling
// +optional
Status ReschedulingStatus `json:"status,omitempty,omitzero"`
}
Rescheduling is the Schema for the reschedulings API
func (*Rescheduling) DeepCopy ¶
func (in *Rescheduling) DeepCopy() *Rescheduling
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rescheduling.
func (*Rescheduling) DeepCopyInto ¶
func (in *Rescheduling) DeepCopyInto(out *Rescheduling)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Rescheduling) DeepCopyObject ¶
func (in *Rescheduling) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ReschedulingAction ¶
type ReschedulingAction string
ReschedulingAction defines the action a rescheduling request asks the Rescheduler to perform. The action names an action-specific sub-spec that carries its target and constraints.
const ( // ReschedulingActionDrain requests that the entities on the targeted hosts // be moved away, optionally reserving the freed capacity. ReschedulingActionDrain ReschedulingAction = "drain" )
type ReschedulingList ¶
type ReschedulingList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Rescheduling `json:"items"`
}
ReschedulingList contains a list of Rescheduling
func (*ReschedulingList) DeepCopy ¶
func (in *ReschedulingList) DeepCopy() *ReschedulingList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReschedulingList.
func (*ReschedulingList) DeepCopyInto ¶
func (in *ReschedulingList) DeepCopyInto(out *ReschedulingList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReschedulingList) DeepCopyObject ¶
func (in *ReschedulingList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ReschedulingMove ¶
type ReschedulingMove struct {
// Entity references the moved entity.
// +kubebuilder:validation:Required
Entity EntityRef `json:"entity"`
// SourceHost is the host the entity is moved away from.
// +kubebuilder:validation:Required
SourceHost HostRef `json:"sourceHost"`
// TargetHost is the host the entity is moved onto.
// +kubebuilder:validation:Required
TargetHost HostRef `json:"targetHost"`
}
ReschedulingMove records a single entity relocation decided by the scheduling pass: an entity is moved off its source host onto the chosen target host.
func (*ReschedulingMove) DeepCopy ¶
func (in *ReschedulingMove) DeepCopy() *ReschedulingMove
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReschedulingMove.
func (*ReschedulingMove) DeepCopyInto ¶
func (in *ReschedulingMove) DeepCopyInto(out *ReschedulingMove)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReschedulingSpec ¶
type ReschedulingSpec struct {
// Action names the rescheduling action to perform.
// +kubebuilder:validation:Enum=drain
// +kubebuilder:validation:Required
Action ReschedulingAction `json:"action"`
// AvailabilityZone specifies the availability zone this request belongs to.
// It is used to route the request to the lighthouse cluster of that AZ.
// +kubebuilder:validation:Optional
AvailabilityZone string `json:"availabilityZone,omitempty"`
// Drain contains fields specific to the drain action.
// Only used when Action is drain.
// +kubebuilder:validation:Optional
Drain *DrainActionSpec `json:"drain,omitempty"`
}
ReschedulingSpec defines the desired state of Rescheduling. The spec is immutable once created: a request is a one-shot instruction, the Rescheduler decides how to execute it. The drain action requires its sub-spec. +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable once created" +kubebuilder:validation:XValidation:rule="self.action != 'drain' || has(self.drain)",message="drain action requires a drain spec"
func (*ReschedulingSpec) DeepCopy ¶
func (in *ReschedulingSpec) DeepCopy() *ReschedulingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReschedulingSpec.
func (*ReschedulingSpec) DeepCopyInto ¶
func (in *ReschedulingSpec) DeepCopyInto(out *ReschedulingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReschedulingState ¶
type ReschedulingState string
ReschedulingState reflects the lifecycle stage of a rescheduling request as observed by the Rescheduler.
const ( // ReschedulingStatePending indicates the request has been submitted // but not yet picked up by the Rescheduler. ReschedulingStatePending ReschedulingState = "Pending" // ReschedulingStateAcknowledged indicates the Rescheduler has // received the request. ReschedulingStateAcknowledged ReschedulingState = "Acknowledged" // ReschedulingStateProcessing indicates the request is being worked on. ReschedulingStateProcessing ReschedulingState = "Processing" // ReschedulingStateAccepted indicates the request was accepted for // execution. ReschedulingStateAccepted ReschedulingState = "Accepted" // ReschedulingStateRejected indicates the request was rejected and // will not be executed. ReschedulingStateRejected ReschedulingState = "Rejected" // ReschedulingStateSucceeded indicates the request completed // successfully. ReschedulingStateSucceeded ReschedulingState = "Succeeded" // ReschedulingStateFailed indicates the request failed to complete. ReschedulingStateFailed ReschedulingState = "Failed" )
type ReschedulingStatus ¶
type ReschedulingStatus struct {
// State is the current lifecycle stage of the request.
// The transition rule enforces the state machine at the apiserver for all
// writers; self-transitions (unchanged state) are allowed so conditions-only
// status writes pass, and terminal states have no outgoing transitions.
// +kubebuilder:validation:Enum=Pending;Acknowledged;Processing;Accepted;Rejected;Succeeded;Failed
// +kubebuilder:default=Pending
// +kubebuilder:validation:Optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf || (oldSelf == 'Pending' && (self == 'Acknowledged' || self == 'Rejected')) || (oldSelf == 'Acknowledged' && (self == 'Processing' || self == 'Rejected')) || (oldSelf == 'Processing' && (self == 'Accepted' || self == 'Rejected' || self == 'Failed')) || (oldSelf == 'Accepted' && (self == 'Succeeded' || self == 'Failed'))",message="illegal rescheduling request state transition"
State ReschedulingState `json:"state,omitempty"`
// Moves are the entity relocations the scheduling pass committed to when the
// request was accepted. Empty until the request reaches Accepted.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxItems=1000
Moves []ReschedulingMove `json:"moves,omitempty"`
// BlockedHosts are the hosts this request currently blocks from receiving
// incoming placement (the host-block taken for a drain with reserve). It is
// set while the request is active and cleared on rollback or, for a succeeded
// request, once BlockExpiresAt has passed. The drain-block scheduling filter
// reads this field across all requests to exclude these hosts.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxItems=10
BlockedHosts []string `json:"blockedHosts,omitempty"`
// BlockExpiresAt is the time after which the host-block of a succeeded request
// may be released. It is set when an accepted request succeeds and lets the
// block linger for a grace period so incoming placement does not immediately
// land on a just-drained host.
// +kubebuilder:validation:Optional
BlockExpiresAt *metav1.Time `json:"blockExpiresAt,omitempty"`
// Conditions carries generic, human-readable detail about the rescheduling
// request (e.g. messages explaining the current situation). It is not the
// authoritative lifecycle representation: status.state is the single source
// of truth for the request's lifecycle and drives reconcile control flow.
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}
ReschedulingStatus defines the observed state of Rescheduling.
func (*ReschedulingStatus) DeepCopy ¶
func (in *ReschedulingStatus) DeepCopy() *ReschedulingStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReschedulingStatus.
func (*ReschedulingStatus) DeepCopyInto ¶
func (in *ReschedulingStatus) DeepCopyInto(out *ReschedulingStatus)
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.
func (*Reservation) IsReady ¶
func (r *Reservation) IsReady() bool
IsReady returns true if the reservation has the Ready condition set to True.
type ReservationConditionType ¶
type ReservationConditionType = string
ReservationConditionType represents the type of condition for a reservation.
const ( // ConditionTypeFailoverHostActive indicates that the failover host is // active and ready to accept evacuations. No more virtual machines have // been seen on this host, so it is empty and ready to receive all vms // from another host. // // A reservation without this condition set to True (including a freshly // created one) represents the draining stage: it already blocks new virtual // machines from the host, but is not yet a selectable evacuation target. // // status=Unknown: The failover host is not yet ready to be used. // status=False: There has been some error or issue preventing the failover // host from being active. // status=True: The failover host is active and ready to accept evacuations. ConditionTypeFailoverHostActive ReservationConditionType = "FailoverHostActive" // ConditionTypeFailoverHostInUse indicates that the failover host reservation // is currently being used by an ongoing evacuation event with inbound // virtual machines being evacuated. // // status=Unknown: It is unknown if the failover host is currently in use. // status=False: The failover host is not currently in use. // status=True: The failover host is currently in use. ConditionTypeFailoverHostInUse ReservationConditionType = "FailoverHostInUse" )
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 ReservationSpec ¶
type ReservationSpec struct {
// Type of reservation.
// +kubebuilder:validation:Enum=CommittedResourceReservation;FailoverReservation;InFlightReservation;FailoverHostReservation
// +kubebuilder:validation:Required
Type ReservationType `json:"type"`
// SchedulingDomain specifies the scheduling domain for this reservation (e.g., "nova", "ironcore").
// +kubebuilder:validation:Optional
SchedulingDomain SchedulingDomain `json:"schedulingDomain,omitempty"`
// AvailabilityZone specifies the availability zone for this reservation, if restricted to a specific AZ.
// +kubebuilder:validation:Optional
AvailabilityZone string `json:"availabilityZone,omitempty"`
// Resources to reserve for this instance.
// +kubebuilder:validation:Optional
Resources map[hv1.ResourceName]resource.Quantity `json:"resources,omitempty"`
// StartTime is the time when the reservation becomes active.
// +kubebuilder:validation:Optional
StartTime *metav1.Time `json:"startTime,omitempty"`
// EndTime is the time when the reservation expires.
// +kubebuilder:validation:Optional
EndTime *metav1.Time `json:"endTime,omitempty"`
// TargetHost is the desired compute host where the reservation should be placed.
// This is a generic name that represents different concepts depending on the scheduling domain:
// - For Nova: the hypervisor hostname
// - For Pods: the node name
// The scheduler will attempt to place the reservation on this host.
// +kubebuilder:validation:Optional
TargetHost string `json:"targetHost,omitempty"`
// CommittedResourceReservation contains fields specific to committed resource reservations.
// Only used when Type is CommittedResourceReservation.
// +kubebuilder:validation:Optional
CommittedResourceReservation *CommittedResourceReservationSpec `json:"committedResourceReservation,omitempty"`
// FailoverReservation contains fields specific to failover reservations.
// Only used when Type is FailoverReservation.
//
// Deprecated: FailoverReservations will be replaced with FailoverHostReservations.
// +kubebuilder:validation:Optional
FailoverReservation *FailoverReservationSpec `json:"failoverReservation,omitempty"`
// InFlightReservation specifies which kind of virtual machine is expected
// to land on the reserved slot. Set when Type is InFlightReservation.
InFlightReservation *InFlightReservationSpec `json:"inFlightReservation,omitempty"`
// FailoverHostReservation contains fields specific to failover host reservations.
// Only used when Type is FailoverHostReservation.
// +kubebuilder:validation:Optional
FailoverHostReservation *FailoverHostReservationSpec `json:"failoverHostReservation,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 status conditions of the reservation.
// Conditions include:
// - type: Ready
// status: True|False|Unknown
// reason: ReservationReady
// message: Reservation is successfully scheduled
// lastTransitionTime: <timestamp>
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// Host is the actual host where the reservation is placed.
// This is set by the scheduler after successful placement and reflects the current state.
// It should match Spec.TargetHost when the reservation is successfully placed.
// This is a generic name that represents different concepts depending on the scheduling domain:
// - For Nova: the hypervisor hostname
// - For Pods: the node name
// +kubebuilder:validation:Optional
Host string `json:"host,omitempty"`
// CommittedResourceReservation contains status fields specific to committed resource reservations.
// Only used when Type is CommittedResourceReservation.
// +kubebuilder:validation:Optional
CommittedResourceReservation *CommittedResourceReservationStatus `json:"committedResourceReservation,omitempty"`
// FailoverReservation contains status fields specific to failover reservations.
// Only used when Type is FailoverReservation.
//
// Deprecated: FailoverReservations will be replaced with FailoverHostReservations.
// +kubebuilder:validation:Optional
FailoverReservation *FailoverReservationStatus `json:"failoverReservation,omitempty"`
// InFlightReservation contains status fields specific to in-flight reservations.
// Only used when Type is InFlightReservation.
// +kubebuilder:validation:Optional
InFlightReservation *InFlightReservationStatus `json:"inFlightReservation,omitempty"`
// FailoverHostReservation contains status fields specific to failover
// host reservations. Only used when Type is FailoverHostReservation.
// +kubebuilder:validation:Optional
FailoverHostReservation *FailoverHostReservationStatus `json:"failoverHostReservation,omitempty"`
}
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 ReservationType ¶
type ReservationType string
ReservationType defines the type of reservation. In Kubernetes, "Type" is the conventional field name for sub-type discrimination within a resource (similar to Service.spec.type), while "Kind" refers to the resource type itself (Pod, Deployment, etc.).
const ( // ReservationTypeCommittedResource is a reservation for committed/reserved capacity. ReservationTypeCommittedResource ReservationType = "CommittedResourceReservation" // ReservationTypeFailover is a reservation for failover capacity. // // Deprecated: FailoverReservations will be replaced with // FailoverHostReservations. See ReservationTypeFailoverHost. ReservationTypeFailover ReservationType = "FailoverReservation" // ReservationTypeInFlight is a reservation that blocks capacity for virtual // machines that are currently being scheduled, to avoid double-booking. ReservationTypeInFlight ReservationType = "InFlightReservation" // ReservationTypeFailoverHost is a reservation that blocks an entire // host for failover purposes, so that another host can gang-evacuate // its workloads to a designated spot. If this type is set, the reservation // will follow this lifecycle: // // 1. Designation. The reservation has been created on a host, but is not yet // Active (it has no FailoverHostActive=True condition). There may be virtual // machines running on this host that need live migration away. As long as not // all virtual machines can be migrated away from the host, the reservation // stays in this state. For pipeline: no new virtual machine onto this host. // // 2. Active. No more virtual machines on this host. On evacuation this // space can be used. // // 3. Failed. The descheduling failed repeatedly or takes too long, the host // is marked for a certain time to not be designated again. // // 4. In Use. Ongoing gang evacuation onto this host, which will be reused // by subsequent failover events until the evacuation is completed. // // 5. Revoked (=Deleted). The reservation is no longer valid because it no // longer matches any failover partition. This may be because the host has // been marked as no longer schedulable or has been otherwise changed. // // 6. Used (=Deleted). The failover event has been completed. The // reservation is no longer valid and the host is transformed back into // a regular host. ReservationTypeFailoverHost ReservationType = "FailoverHostReservation" )
type SchedulingDomain ¶
type SchedulingDomain string
SchedulingDomain reflects the logical domain for scheduling.
const ( // SchedulingDomainNova indicates scheduling related to the // openstack Nova service, which is the compute service responsible for // managing virtual machines in an openstack cloud infrastructure. SchedulingDomainNova SchedulingDomain = "nova" // SchedulingDomainCinder indicates scheduling related to the // openstack Cinder service, which is the block storage service responsible // for managing volumes in an openstack cloud infrastructure. SchedulingDomainCinder SchedulingDomain = "cinder" // SchedulingDomainManila indicates scheduling related to the openstack // Manila service, which is the shared file system service responsible // for managing shared file systems in an openstack cloud infrastructure. SchedulingDomainManila SchedulingDomain = "manila" // SchedulingDomainMachines indicates scheduling related to the ironcore // machines, which are virtual machines managed by the ironcore platform. SchedulingDomainMachines SchedulingDomain = "machines" // SchedulingDomainPods indicates scheduling related to Kubernetes pods, // which are the smallest deployable units in a Kubernetes cluster. SchedulingDomainPods SchedulingDomain = "pods" )
type SchedulingIntent ¶
type SchedulingIntent string
SchedulingIntent defines the intent of a scheduling decision (e.g. initial scheduling, rescheduling, failover). It is the base type for the Nova intent constants in api/external/nova and is carried on Reservation.Spec.Intent.
const ( // SchedulingIntentUnknown is the default intent when none is specified. SchedulingIntentUnknown SchedulingIntent = "Unknown" )
type TxSource ¶
type TxSource string
TxSource identifies the originator of a CommittedResourceChange.
type WeigherSpec ¶
type WeigherSpec struct {
// The name of the scheduler step in the cortex implementation.
// Must match to a step implemented by the pipeline controller.
Name string `json:"name"`
// Additional configuration for the step that can be used
// +kubebuilder:validation:Optional
Params Parameters `json:"params,omitempty"`
// Additional description of the step which helps understand its purpose
// and decisions made by it.
// +kubebuilder:validation:Optional
Description string `json:"description,omitempty"`
// Optional multiplier to apply to the step's output.
// This can be used to increase or decrease the weight of a step
// relative to other steps in the same pipeline.
// +kubebuilder:validation:Optional
Multiplier *float64 `json:"multiplier,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.
Source Files
¶
- committed_resource_change_types.go
- committed_resource_types.go
- common_types.go
- datasource_types.go
- descheduling_types.go
- flavor_group_capacity_types.go
- groupversion_info.go
- knowledge_types.go
- kpi_types.go
- pipeline_types.go
- project_quota_types.go
- rescheduling_types.go
- reservation_types.go
- scheduling_intent.go
- zz_generated.deepcopy.go