Documentation ¶
Index ¶
- Constants
- Variables
- func DemandCustomResourceDefinition() v1beta1.CustomResourceDefinition
- func DemandCustomResourceDefinitionName() string
- func DemandGroupVersionResource() schema.GroupVersionResource
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type Demand
- type DemandList
- type DemandSpec
- type DemandStatus
- type DemandUnit
Constants ¶
const ( // DemandPhaseEmpty is the state of a demand object when it is first created DemandPhaseEmpty string = "" // DemandPhasePending is the state a demand object is in when Scaler has acknowledged it but has not yet taken // action to fulfill the demand DemandPhasePending string = "pending" // DemandPhaseFulfilled is the state a demand object is in when Scaler has taken action and the action has completed // to fulfill the demand. At this point, it is expected that there is capacity to meet the demand the object represents DemandPhaseFulfilled string = "fulfilled" // DemandPhaseCannotFulfill is the state a demand object is in when Scaler is unable to satisfy the demand. This is // possible if the demand contains a single unit that is larger than the instance group is configured to use, or if // the instance group has reached its maximum capacity and cannot allocate more DemandPhaseCannotFulfill string = "cannot-fulfill" )
const GroupName = "scaler.palantir.com"
GroupName used for resources from this package.
Variables ¶
var ( // SchemeBuilder is a runtime SchemaBuilder SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a SchemaBuilder AddToSchema function AddToScheme = SchemeBuilder.AddToScheme )
var ( // AllDemandPhases is a list of all phases that a demand object could be in AllDemandPhases = []string{ DemandPhaseEmpty, DemandPhasePending, DemandPhaseFulfilled, DemandPhaseCannotFulfill, } )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion represents the kubernetes schema.GroupVersion for the demand resource
Functions ¶
func DemandCustomResourceDefinition ¶
func DemandCustomResourceDefinition() v1beta1.CustomResourceDefinition
DemandCustomResourceDefinition returns the CustomResourceDefinition for the demand resource
func DemandCustomResourceDefinitionName ¶
func DemandCustomResourceDefinitionName() string
DemandCustomResourceDefinitionName returns the demand resource name as a string
func DemandGroupVersionResource ¶
func DemandGroupVersionResource() schema.GroupVersionResource
DemandGroupVersionResource returns the schema.GroupVersionResource for the demand resource
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource returns the schema.GroupResource for the demand resource
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 represents currently unschedulable resources.
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"` Items []Demand `json:"items"` }
DemandList is a list of Demand resources
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 { Units []DemandUnit `json:"units"` InstanceGroup string `json:"instance-group"` // IsLongLived changes the lifecycle for a demand from // ephemeral and immutable to long-lived and mutable. // This is useful to set a buffer in an instance-group: // an amount of compute resources that is left unused // but ready for quick reservation should there be need. IsLongLived bool `json:"is-long-lived"` }
DemandSpec represents the units and status of a Demand resource
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 {
Phase string `json:"phase"`
}
DemandStatus represents the status a demand object is in
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 DemandUnit ¶
type DemandUnit struct { CPU resource.Quantity `json:"cpu"` Memory resource.Quantity `json:"memory"` Count int `json:"count"` }
DemandUnit represents a single unit of demand as a count of CPU and Memory requirements
func (*DemandUnit) DeepCopy ¶
func (in *DemandUnit) DeepCopy() *DemandUnit
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DemandUnit.
func (*DemandUnit) DeepCopyInto ¶
func (in *DemandUnit) DeepCopyInto(out *DemandUnit)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.