Documentation
¶
Overview ¶
+kubebuilder:object:generate=true +groupName=capacity.titus.netflix.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeBuilder initializes a scheme builder SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: capacity.GroupName, Version: "v1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Demand ¶
type Demand struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DemandSpec `json:"spec,omitempty"` Status DemandStatus `json:"status,omitempty"` }
Demand is the Schema for the demands API
func (*Demand) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Demand.
func (*Demand) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Demand) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DemandList ¶
type DemandList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Demand `json:"items"` }
DemandList contains a list of Demand
func (*DemandList) DeepCopy ¶
func (in *DemandList) DeepCopy() *DemandList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DemandList.
func (*DemandList) DeepCopyInto ¶
func (in *DemandList) DeepCopyInto(out *DemandList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DemandList) DeepCopyObject ¶
func (in *DemandList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DemandSpec ¶
type DemandSpec struct { CapacityGroup string `json:"capacity_group,omitempty"` // Reservations are capacity reservations defined in CapacityGroup Reservations ResourceGroups `json:"reservations,omitempty"` }
DemandSpec defines the desired state of Demand
func (*DemandSpec) DeepCopy ¶
func (in *DemandSpec) DeepCopy() *DemandSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DemandSpec.
func (*DemandSpec) DeepCopyInto ¶
func (in *DemandSpec) DeepCopyInto(out *DemandSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DemandStatus ¶
type DemandStatus struct { // Bound is aggregate demand used by running pods Bound map[ResourcePoolName]v1.ComputeResource `json:"bound,omitempty"` // Unbound is demand waiting for capacity Unbound map[ResourcePoolName]ResourceGroups `json:"unbound,omitempty"` // ReservedUnallocated is demand from unused reservations ReservedUnallocated map[ResourcePoolName]ResourceGroups `json:"reserved_unallocated,omitempty"` // LastPublishTimestamp provides the time when the Status was last updated LastPublishTimestamp metav1.Time `json:"last_publish_timestamp,omitempty"` }
DemandStatus defines the observed state of Demand
func (*DemandStatus) DeepCopy ¶
func (in *DemandStatus) DeepCopy() *DemandStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DemandStatus.
func (*DemandStatus) DeepCopyInto ¶
func (in *DemandStatus) DeepCopyInto(out *DemandStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceGroup ¶
type ResourceGroup struct { Count uint32 `json:"count"` v1.ComputeResource `json:"resource"` }
ResourceGroup is capacity as a pair of count and ComputeResource
func (*ResourceGroup) DeepCopy ¶
func (in *ResourceGroup) DeepCopy() *ResourceGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceGroup.
func (*ResourceGroup) DeepCopyInto ¶
func (in *ResourceGroup) DeepCopyInto(out *ResourceGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceGroups ¶
type ResourceGroups []ResourceGroup
func (ResourceGroups) DeepCopy ¶
func (in ResourceGroups) DeepCopy() ResourceGroups
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceGroups.
func (ResourceGroups) DeepCopyInto ¶
func (in ResourceGroups) DeepCopyInto(out *ResourceGroups)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourcePoolName ¶
type ResourcePoolName string
type Trough ¶
type Trough struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TroughSpec `json:"spec,omitempty"` Status TroughStatus `json:"status,omitempty"` }
Trough is the Schema for the Troughs API
func (*Trough) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Trough.
func (*Trough) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Trough) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TroughList ¶
type TroughList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Trough `json:"items"` }
TroughList contains a list of Trough
func (*TroughList) DeepCopy ¶
func (in *TroughList) DeepCopy() *TroughList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TroughList.
func (*TroughList) DeepCopyInto ¶
func (in *TroughList) DeepCopyInto(out *TroughList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TroughList) DeepCopyObject ¶
func (in *TroughList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TroughSpec ¶
type TroughSpec struct { // ResourcePool is the host of this trough ResourcePool ResourcePoolName `json:"resource_pool"` // Percent is the amount of trough capacity to export as allocatable Percent uint32 `json:"percent"` // SchedulerName is the name of the scheduler profile to use for scheduling pods into this trough SchedulerName string `json:"scheduler_name,omitempty"` }
TroughSpec defines the desired state of Trough
func (*TroughSpec) DeepCopy ¶
func (in *TroughSpec) DeepCopy() *TroughSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TroughSpec.
func (*TroughSpec) DeepCopyInto ¶
func (in *TroughSpec) DeepCopyInto(out *TroughSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TroughStatus ¶
type TroughStatus struct { // Capacity is total trough capacity. Only part of this may be available as Allocatable depending on spec.percent Capacity *v1.ComputeResource `json:"capacity,omitempty"` // Allocatable is subset of the total trough capacity that is considered allocatable Allocatable *v1.ComputeResource `json:"allocatable,omitempty"` // Free is the available trough for immediate use. No new trough user pods should be admitted if this is zero. Free *v1.ComputeResource `json:"free,omitempty"` // LastUpdated is the time in RFC3339 format of last update to trough LastUpdated string `json:"last_updated,omitempty"` // LastEvaluated is the time in RFC3339 format of last trough availability evaluation LastEvaluated string `json:"last_evaluated,omitempty"` }
TroughStatus is the capacity available as trough
func (*TroughStatus) DeepCopy ¶
func (in *TroughStatus) DeepCopy() *TroughStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TroughStatus.
func (*TroughStatus) DeepCopyInto ¶
func (in *TroughStatus) DeepCopyInto(out *TroughStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.