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 CinderDatasource
- type CinderDatasourceType
- type CommittedResourceAllocation
- type CommittedResourceReservationSpec
- type CommittedResourceReservationStatus
- type CurrentDecision
- type Datasource
- type DatasourceList
- type DatasourceSpec
- type DatasourceStatus
- type DatasourceType
- type Decision
- type DecisionList
- type DecisionResult
- type DecisionSpec
- type DecisionStatus
- type Descheduling
- type DeschedulingList
- type DeschedulingSpec
- type DeschedulingSpecHostType
- type DeschedulingSpecVMReferenceType
- type DeschedulingStatus
- type DetectorSpec
- type FailoverReservationSpec
- type FailoverReservationStatus
- type FilterSpec
- type History
- type HistoryList
- type HistorySpec
- type HistoryStatus
- type IdentityDatasource
- type IdentityDatasourceType
- 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 PrometheusDatasource
- type Reservation
- type ReservationList
- type ReservationSpec
- type ReservationStatus
- type ReservationType
- type SchedulingDomain
- type SchedulingHistoryEntry
- type SchedulingIntent
- type StepResult
- type WeigherSpec
Constants ¶
const ( // The descheduling was successfully processed. DeschedulingConditionReady = "Ready" // The descheduling is currently being processed. DeschedulingConditionInProgress = "InProgress" )
const ( // The scheduling decision is ready (a host was successfully selected). HistoryConditionReady = "Ready" // The scheduling decision selected a target host. HistoryReasonSchedulingSucceeded = "SchedulingSucceeded" // The pipeline run failed before a host could be selected. HistoryReasonPipelineRunFailed = "PipelineRunFailed" // The pipeline completed but no suitable host was found. HistoryReasonNoHostFound = "NoHostFound" )
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" )
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" )
Annotation keys for Reservation metadata.
const (
// The datasource is ready to be used.
DatasourceConditionReady = "Ready"
)
const (
// The decision was successfully processed.
DecisionConditionReady = "Ready"
)
const (
// If the kpi was successfully processed.
KPIConditionReady = "Ready"
)
const (
// The knowledge is ready to be used.
KnowledgeConditionReady = "Ready"
)
const (
// ReservationConditionReady indicates whether the reservation is active and ready.
ReservationConditionReady = "Ready"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "cortex.cloud", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var ( // Some datasources may depend on other datasources to be present. // If these aren't yet available, this will be the returned error. ErrWaitingForDependencyDatasource = errors.New("waiting for dependency datasource to become available") )
Functions ¶
func BoxFeatureList ¶
func BoxFeatureList[T any](features []T) (runtime.RawExtension, error)
Convert a list of strongly typed feature structs to raw features.
func UnboxFeatureList ¶
func UnboxFeatureList[T any](raw runtime.RawExtension) ([]T, error)
Convert raw features to a list of strongly typed feature structs.
Types ¶
type CinderDatasource ¶
type CinderDatasource struct {
// The type of resource to sync.
Type CinderDatasourceType `json:"type"`
}
func (*CinderDatasource) DeepCopy ¶
func (in *CinderDatasource) DeepCopy() *CinderDatasource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CinderDatasource.
func (*CinderDatasource) DeepCopyInto ¶
func (in *CinderDatasource) DeepCopyInto(out *CinderDatasource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CinderDatasourceType ¶
type CinderDatasourceType string
const (
CinderDatasourceTypeStoragePools CinderDatasourceType = "storagePools"
)
type CommittedResourceAllocation ¶
type CommittedResourceAllocation struct {
// Timestamp when this workload was assigned to the reservation.
// +kubebuilder:validation:Required
CreationTimestamp metav1.Time `json:"creationTimestamp"`
// Resources consumed by this instance.
// +kubebuilder:validation:Required
Resources map[hv1.ResourceName]resource.Quantity `json:"resources"`
}
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 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"`
// 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
// +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.
type CommittedResourceReservationStatus ¶
type CommittedResourceReservationStatus struct {
// Allocations maps VM/instance UUIDs to the host they are currently running on.
// Key: VM/instance UUID, Value: Host name where the VM is currently running.
// +kubebuilder:validation:Optional
Allocations map[string]string `json:"allocations,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 CurrentDecision ¶
type CurrentDecision struct {
// The timestamp of when the decision was made.
Timestamp metav1.Time `json:"timestamp"`
// The pipeline that was used for the decision.
PipelineRef corev1.ObjectReference `json:"pipelineRef"`
// The intent of the decision (e.g., initial scheduling, rescheduling, etc.).
Intent SchedulingIntent `json:"intent"`
// Whether the scheduling decision was successful.
Successful bool `json:"successful"`
// The target host selected for the resource. nil when no host was found.
// +kubebuilder:validation:Optional
TargetHost *string `json:"targetHost,omitempty"`
// A human-readable explanation of the scheduling decision.
// +kubebuilder:validation:Optional
Explanation string `json:"explanation,omitempty"`
// The top hosts ordered by score (limited to 3).
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxItems=3
OrderedHosts []string `json:"orderedHosts,omitempty"`
}
CurrentDecision holds the full context of the most recent scheduling decision. When a new decision arrives the previous CurrentDecision is compacted into a SchedulingHistoryEntry and appended to History.
func (*CurrentDecision) DeepCopy ¶
func (in *CurrentDecision) DeepCopy() *CurrentDecision
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CurrentDecision.
func (*CurrentDecision) DeepCopyInto ¶
func (in *CurrentDecision) DeepCopyInto(out *CurrentDecision)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 Decision ¶
type Decision struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// spec defines the desired state of Decision
// +required
Spec DecisionSpec `json:"spec"`
// status defines the observed state of Decision
// +optional
Status DecisionStatus `json:"status,omitempty,omitzero"`
}
Currently the Decision CRD is an in-memory scheduling object used by the external scheduler API and filter-weigher pipelines to compute a placement result. It is currently NOT persisted to etcd — the scheduling outcome is recorded in the History CRD instead. The long-term shape of this CRD is still under discussion; until that is settled the Decision serves only as a transient carrier within a single scheduling run.
func (*Decision) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Decision.
func (*Decision) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Decision) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DecisionList ¶
type DecisionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Decision `json:"items"`
}
DecisionList contains a list of Decision
func (*DecisionList) DeepCopy ¶
func (in *DecisionList) DeepCopy() *DecisionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DecisionList.
func (*DecisionList) DeepCopyInto ¶
func (in *DecisionList) DeepCopyInto(out *DecisionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DecisionList) DeepCopyObject ¶
func (in *DecisionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DecisionResult ¶
type DecisionResult struct {
// Raw input weights to the pipeline.
// +kubebuilder:validation:Optional
RawInWeights map[string]float64 `json:"rawInWeights"`
// Normalized input weights to the pipeline.
// +kubebuilder:validation:Optional
NormalizedInWeights map[string]float64 `json:"normalizedInWeights"`
// Outputs of the decision pipeline including the activations used
// to make the final ordering of compute hosts.
// +kubebuilder:validation:Optional
StepResults []StepResult `json:"stepResults,omitempty"`
// Aggregated output weights from the pipeline.
// +kubebuilder:validation:Optional
AggregatedOutWeights map[string]float64 `json:"aggregatedOutWeights"`
// Final ordered list of hosts from most preferred to least preferred.
// +kubebuilder:validation:Optional
OrderedHosts []string `json:"orderedHosts,omitempty"`
// The first element of the ordered hosts is considered the target host.
// +kubebuilder:validation:Optional
TargetHost *string `json:"targetHost,omitempty"`
}
func (*DecisionResult) DeepCopy ¶
func (in *DecisionResult) DeepCopy() *DecisionResult
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DecisionResult.
func (*DecisionResult) DeepCopyInto ¶
func (in *DecisionResult) DeepCopyInto(out *DecisionResult)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DecisionSpec ¶
type DecisionSpec struct {
// SchedulingDomain defines in which scheduling domain this decision
// was or is processed (e.g., nova, cinder, manila).
SchedulingDomain SchedulingDomain `json:"schedulingDomain"`
// A reference to the pipeline that should be used for this decision.
// This reference can be used to look up the pipeline definition and its
// scheduler step configuration for additional context.
PipelineRef corev1.ObjectReference `json:"pipelineRef"`
// An identifier for the underlying resource to be scheduled.
// For example, this can be the UUID of a nova instance or cinder volume.
// This can be used to correlate multiple decisions for the same resource.
ResourceID string `json:"resourceID"`
// If the type is "nova", this field contains the raw nova decision request.
// +kubebuilder:validation:Optional
NovaRaw *runtime.RawExtension `json:"novaRaw,omitempty"`
// If the type is "cinder", this field contains the raw cinder decision request.
// +kubebuilder:validation:Optional
CinderRaw *runtime.RawExtension `json:"cinderRaw,omitempty"`
// If the type is "manila", this field contains the raw manila decision request.
// +kubebuilder:validation:Optional
ManilaRaw *runtime.RawExtension `json:"manilaRaw,omitempty"`
// If the type is "machine", this field contains the machine reference.
// +kubebuilder:validation:Optional
MachineRef *corev1.ObjectReference `json:"machineRef,omitempty"`
// If the type is "pod", this field contains the pod reference.
// +kubebuilder:validation:Optional
PodRef *corev1.ObjectReference `json:"podRef,omitempty"`
// The intent of the scheduling decision (e.g., initial scheduling, rescheduling, etc.).
// +kubebuilder:validation:Optional
Intent SchedulingIntent `json:"intent,omitempty"`
}
func (*DecisionSpec) DeepCopy ¶
func (in *DecisionSpec) DeepCopy() *DecisionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DecisionSpec.
func (*DecisionSpec) DeepCopyInto ¶
func (in *DecisionSpec) DeepCopyInto(out *DecisionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DecisionStatus ¶
type DecisionStatus struct {
// The result of this decision.
// +kubebuilder:validation:Optional
Result *DecisionResult `json:"result,omitempty"`
// If there were previous decisions for the underlying resource, they can
// be resolved here to provide historical context for the decision.
// +kubebuilder:validation:Optional
History *[]corev1.ObjectReference `json:"history,omitempty"`
// The number of decisions that preceded this one for the same resource.
// +kubebuilder:validation:Optional
Precedence *int `json:"precedence,omitempty"`
// A human-readable explanation of the decision result.
// +kubebuilder:validation:Optional
Explanation string `json:"explanation,omitempty"`
// The current status conditions of the decision.
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}
func (*DecisionStatus) DeepCopy ¶
func (in *DecisionStatus) DeepCopy() *DecisionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DecisionStatus.
func (*DecisionStatus) DeepCopyInto ¶
func (in *DecisionStatus) DeepCopyInto(out *DecisionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type 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 FailoverReservationSpec ¶
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.
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 ¶
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.
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 History ¶
type History struct {
metav1.TypeMeta `json:",inline"`
// Standard object metadata.
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec defines the desired state of History.
// +required
Spec HistorySpec `json:"spec"`
// Status defines the observed state of History.
// +optional
Status HistoryStatus `json:"status,omitempty"`
}
The history is a CRD that provides a record of past scheduling decisions for a given resource (e.g., a nova instance). A new history entry is created for each scheduling decision, and the most recent decision is stored in the status.current field. The history is capped at 10 entries to prevent unbounded growth. This CRD is designed to be used by an operations team to troubleshoot scheduling decisions and understand the context around why a particular host was selected (or not selected) for a resource.
func (*History) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new History.
func (*History) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*History) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HistoryList ¶
type HistoryList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []History `json:"items"`
}
HistoryList contains a list of History
func (*HistoryList) DeepCopy ¶
func (in *HistoryList) DeepCopy() *HistoryList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HistoryList.
func (*HistoryList) DeepCopyInto ¶
func (in *HistoryList) DeepCopyInto(out *HistoryList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HistoryList) DeepCopyObject ¶
func (in *HistoryList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HistorySpec ¶
type HistorySpec struct {
// The scheduling domain this object with the history belongs to.
SchedulingDomain SchedulingDomain `json:"schedulingDomain"`
// The resource ID this history belongs to (e.g., the UUID of a nova instance).
ResourceID string `json:"resourceID"`
// The availability zone of the resource, if known. Only set for scheduling
// domains that provide AZ information (e.g., Nova).
// +kubebuilder:validation:Optional
AvailabilityZone *string `json:"availabilityZone,omitempty"`
}
func (*HistorySpec) DeepCopy ¶
func (in *HistorySpec) DeepCopy() *HistorySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HistorySpec.
func (*HistorySpec) DeepCopyInto ¶
func (in *HistorySpec) DeepCopyInto(out *HistorySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HistoryStatus ¶
type HistoryStatus struct {
// Current represents the latest scheduling decision with full context.
// +kubebuilder:validation:Optional
Current CurrentDecision `json:"current,omitempty"`
// History of past scheduling decisions (limited to last 10).
// +kubebuilder:validation:Optional
History []SchedulingHistoryEntry `json:"history,omitempty"`
// Conditions represent the latest available observations of the history's state.
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}
func (*HistoryStatus) DeepCopy ¶
func (in *HistoryStatus) DeepCopy() *HistoryStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HistoryStatus.
func (*HistoryStatus) DeepCopyInto ¶
func (in *HistoryStatus) DeepCopyInto(out *HistoryStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IdentityDatasource ¶
type IdentityDatasource struct {
// The type of resource to sync.
Type IdentityDatasourceType `json:"type"`
}
func (*IdentityDatasource) DeepCopy ¶
func (in *IdentityDatasource) DeepCopy() *IdentityDatasource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityDatasource.
func (*IdentityDatasource) DeepCopyInto ¶
func (in *IdentityDatasource) DeepCopyInto(out *IdentityDatasource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IdentityDatasourceType ¶
type IdentityDatasourceType string
const ( IdentityDatasourceTypeProjects IdentityDatasourceType = "projects" IdentityDatasourceTypeDomains IdentityDatasourceType = "domains" )
type KPI ¶
type KPI struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// spec defines the desired state of KPI
// +required
Spec KPISpec `json:"spec"`
// status defines the observed state of KPI
// +optional
Status KPIStatus `json:"status,omitempty,omitzero"`
}
KPI is the Schema for the deschedulings API
func (*KPI) DeepCopy ¶
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"`
}
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"`
// If this pipeline should create history objects.
// When this is false, the pipeline will still process requests.
// +kubebuilder:default=false
CreateHistory bool `json:"createHistory,omitempty"`
// If this pipeline should ignore host preselection and gather all
// available placement candidates before applying filters, instead of
// relying on a pre-filtered set and weights.
// +kubebuilder:default=false
IgnorePreselection bool `json:"ignorePreselection,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"`
}
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 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 Reservation ¶
type Reservation struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// spec defines the desired state of Reservation
// +required
Spec ReservationSpec `json:"spec"`
// status defines the observed state of Reservation
// +optional
Status ReservationStatus `json:"status,omitempty,omitzero"`
}
Reservation is the Schema for the reservations API
func (*Reservation) DeepCopy ¶
func (in *Reservation) DeepCopy() *Reservation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Reservation.
func (*Reservation) DeepCopyInto ¶
func (in *Reservation) DeepCopyInto(out *Reservation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Reservation) DeepCopyObject ¶
func (in *Reservation) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ReservationList ¶
type ReservationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Reservation `json:"items"`
}
ReservationList contains a list of Reservation
func (*ReservationList) DeepCopy ¶
func (in *ReservationList) DeepCopy() *ReservationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReservationList.
func (*ReservationList) DeepCopyInto ¶
func (in *ReservationList) DeepCopyInto(out *ReservationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReservationList) DeepCopyObject ¶
func (in *ReservationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ReservationSpec ¶
type ReservationSpec struct {
// Type of reservation.
// +kubebuilder:validation:Enum=CommittedResourceReservation;FailoverReservation
// +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.
// +kubebuilder:validation:Optional
FailoverReservation *FailoverReservationSpec `json:"failoverReservation,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.
// +kubebuilder:validation:Optional
FailoverReservation *FailoverReservationStatus `json:"failoverReservation,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. ReservationTypeFailover ReservationType = "FailoverReservation" )
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 SchedulingHistoryEntry ¶
type SchedulingHistoryEntry struct {
// The timestamp of when the decision was made.
Timestamp metav1.Time `json:"timestamp"`
// The pipeline that was used for the decision.
PipelineRef corev1.ObjectReference `json:"pipelineRef"`
// The intent of the decision (e.g., initial scheduling, rescheduling, etc.).
Intent SchedulingIntent `json:"intent"`
// The top hosts ordered by score for the decision (limited to 3).
// This is not a complete list of all candidates — only the highest-ranked
// hosts are retained to keep the history compact.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxItems=3
OrderedHosts []string `json:"orderedHosts,omitempty"`
// Whether the scheduling decision was successful.
// +kubebuilder:validation:Optional
Successful bool `json:"successful"`
}
func (*SchedulingHistoryEntry) DeepCopy ¶
func (in *SchedulingHistoryEntry) DeepCopy() *SchedulingHistoryEntry
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingHistoryEntry.
func (*SchedulingHistoryEntry) DeepCopyInto ¶
func (in *SchedulingHistoryEntry) DeepCopyInto(out *SchedulingHistoryEntry)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SchedulingIntent ¶
type SchedulingIntent string
SchedulingIntent defines the intent of a scheduling decision.
const ( // Used as default intent if the operator does not specify one. SchedulingIntentUnknown SchedulingIntent = "Unknown" )
Other intents can be defined by the operators.
type StepResult ¶
type StepResult struct {
// object reference to the scheduler step.
StepName string `json:"stepName"`
// Activations of the step for each host.
Activations map[string]float64 `json:"activations"`
}
func (*StepResult) DeepCopy ¶
func (in *StepResult) DeepCopy() *StepResult
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepResult.
func (*StepResult) DeepCopyInto ¶
func (in *StepResult) DeepCopyInto(out *StepResult)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type 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.