Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the imperator v1alpha1 API group +kubebuilder:object:generate=true +groupName=imperator.tenzen-y.io
Index ¶
- Constants
- Variables
- func GenerateAffinityMatchExpression(machineType *MachineType, machineGroup string) []corev1.NodeSelectorRequirement
- func GenerateMachineTypeLabelTaintKey(machineTypeName string) string
- func GenerateToleration(machineTypeName, machineGroup string) []corev1.Toleration
- func NewResourceInjector(c client.Client) *resourceInjector
- type AvailableMachineCondition
- type GPUSpec
- type Machine
- func (in *Machine) DeepCopy() *Machine
- func (in *Machine) DeepCopyInto(out *Machine)
- func (in *Machine) DeepCopyObject() runtime.Object
- func (r *Machine) Default()
- func (r *Machine) SetupWebhookWithManager(signalHandler context.Context, mgr ctrl.Manager) error
- func (r *Machine) ValidateAllOperation() error
- func (r *Machine) ValidateCreate() error
- func (r *Machine) ValidateDelete() error
- func (r *Machine) ValidateGPUSpec() error
- func (r *Machine) ValidateLabel() error
- func (r *Machine) ValidateNodeName() error
- func (r *Machine) ValidateNodePoolMachineTypeName() error
- func (r *Machine) ValidateUpdate(old runtime.Object) error
- type MachineDetailSpec
- type MachineList
- type MachineNodeCondition
- type MachineNodePool
- type MachineNodePoolList
- type MachineNodePoolSpec
- type MachineNodePoolStatus
- type MachineSpec
- type MachineStatus
- type MachineType
- type NodePool
- type NodePoolCondition
- type NodePoolMachineType
- type NodePoolMachineTypeStock
- type NodePoolMode
- type UsageCondition
Constants ¶
const (
ConditionReady = "Ready"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "imperator.tenzen-y.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func GenerateAffinityMatchExpression ¶
func GenerateAffinityMatchExpression(machineType *MachineType, machineGroup string) []corev1.NodeSelectorRequirement
func GenerateToleration ¶
func GenerateToleration(machineTypeName, machineGroup string) []corev1.Toleration
func NewResourceInjector ¶
Types ¶
type AvailableMachineCondition ¶
type AvailableMachineCondition struct {
// +kubebuilder:validation:Required
Name string `json:"name,omitempty"`
// +kubebuilder:validation:Required
Usage UsageCondition `json:"usage,omitempty"`
}
func (*AvailableMachineCondition) DeepCopy ¶
func (in *AvailableMachineCondition) DeepCopy() *AvailableMachineCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AvailableMachineCondition.
func (*AvailableMachineCondition) DeepCopyInto ¶
func (in *AvailableMachineCondition) DeepCopyInto(out *AvailableMachineCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GPUSpec ¶
type GPUSpec struct {
// +optional
Type corev1.ResourceName `json:"type,omitempty"`
// +optional
Num resource.Quantity `json:"num,omitempty"`
// nvidia.com/gpu.family
// +optional
Family string `json:"family,omitempty"`
// nvidia.com/gpu.product
// +optional
Product string `json:"product,omitempty"`
// nvidia.com/gpu.machine
// +optional
Machine string `json:"machine,omitempty"`
}
func (*GPUSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUSpec.
func (*GPUSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Machine ¶
type Machine struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MachineSpec `json:"spec,omitempty"`
Status MachineStatus `json:"status,omitempty"`
}
Machine is the Schema for the machines API
func (*Machine) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Machine.
func (*Machine) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Machine) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Machine) Default ¶
func (r *Machine) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*Machine) SetupWebhookWithManager ¶
func (*Machine) ValidateAllOperation ¶
func (*Machine) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Machine) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*Machine) ValidateGPUSpec ¶
func (*Machine) ValidateLabel ¶
func (*Machine) ValidateNodeName ¶
func (*Machine) ValidateNodePoolMachineTypeName ¶
type MachineDetailSpec ¶
type MachineDetailSpec struct {
// +kubebuilder:validation:Required
CPU resource.Quantity `json:"cpu"`
// +kubebuilder:validation:Required
Memory resource.Quantity `json:"memory"`
// +optional
GPU *GPUSpec `json:"gpu,omitempty"`
}
func (*MachineDetailSpec) DeepCopy ¶
func (in *MachineDetailSpec) DeepCopy() *MachineDetailSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDetailSpec.
func (*MachineDetailSpec) DeepCopyInto ¶
func (in *MachineDetailSpec) DeepCopyInto(out *MachineDetailSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineList ¶
type MachineList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Machine `json:"items"`
}
MachineList contains a list of Machine
func (*MachineList) DeepCopy ¶
func (in *MachineList) DeepCopy() *MachineList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineList.
func (*MachineList) DeepCopyInto ¶
func (in *MachineList) DeepCopyInto(out *MachineList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MachineList) DeepCopyObject ¶
func (in *MachineList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MachineNodeCondition ¶
type MachineNodeCondition string
MachineNodeCondition is condition of Kubernetes Nodes +kubebuilder:validation:Enum=Healthy;Maintenance;Unhealthy
const ( NodeHealthy MachineNodeCondition = "Healthy" NodeMaintenance MachineNodeCondition = "Maintenance" NodeUnhealthy MachineNodeCondition = "Unhealthy" )
type MachineNodePool ¶
type MachineNodePool struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MachineNodePoolSpec `json:"spec,omitempty"`
Status MachineNodePoolStatus `json:"status,omitempty"`
}
MachineNodePool is the Schema for the machinenodepools API
func (*MachineNodePool) DeepCopy ¶
func (in *MachineNodePool) DeepCopy() *MachineNodePool
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineNodePool.
func (*MachineNodePool) DeepCopyInto ¶
func (in *MachineNodePool) DeepCopyInto(out *MachineNodePool)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MachineNodePool) DeepCopyObject ¶
func (in *MachineNodePool) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MachineNodePoolList ¶
type MachineNodePoolList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MachineNodePool `json:"items"`
}
MachineNodePoolList contains a list of MachineNodePool
func (*MachineNodePoolList) DeepCopy ¶
func (in *MachineNodePoolList) DeepCopy() *MachineNodePoolList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineNodePoolList.
func (*MachineNodePoolList) DeepCopyInto ¶
func (in *MachineNodePoolList) DeepCopyInto(out *MachineNodePoolList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MachineNodePoolList) DeepCopyObject ¶
func (in *MachineNodePoolList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MachineNodePoolSpec ¶
type MachineNodePoolSpec struct {
// MachineGroupName is node pool group
// +kubebuilder:validation:Required
MachineGroupName string `json:"machineGroupName"`
// NodePool is node list that machineGroup is managing.
// +kubebuilder:validation:Required
NodePool []NodePool `json:"nodePool"`
// MachineTypeStock is available machineType list.
// +kubebuilder:validation:Required
MachineTypeStock []NodePoolMachineTypeStock `json:"machineTypeStock"`
}
MachineNodePoolSpec defines the desired state of MachineNodePool
func (*MachineNodePoolSpec) DeepCopy ¶
func (in *MachineNodePoolSpec) DeepCopy() *MachineNodePoolSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineNodePoolSpec.
func (*MachineNodePoolSpec) DeepCopyInto ¶
func (in *MachineNodePoolSpec) DeepCopyInto(out *MachineNodePoolSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineNodePoolStatus ¶
type MachineNodePoolStatus struct {
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// +optional
NodePoolCondition []NodePoolCondition `json:"nodePool,omitempty"`
}
MachineNodePoolStatus defines the observed state of MachineNodePool
func (*MachineNodePoolStatus) DeepCopy ¶
func (in *MachineNodePoolStatus) DeepCopy() *MachineNodePoolStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineNodePoolStatus.
func (*MachineNodePoolStatus) DeepCopyInto ¶
func (in *MachineNodePoolStatus) DeepCopyInto(out *MachineNodePoolStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineSpec ¶
type MachineSpec struct {
// NodePool is node list that machineGroup is managing.
// +kubebuilder:validation:Required
NodePool []NodePool `json:"nodePool"`
// +kubebuilder:validation:Required
MachineTypes []MachineType `json:"machineTypes"`
}
MachineSpec defines the desired state of Machine
func (*MachineSpec) DeepCopy ¶
func (in *MachineSpec) DeepCopy() *MachineSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSpec.
func (*MachineSpec) DeepCopyInto ¶
func (in *MachineSpec) DeepCopyInto(out *MachineSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineStatus ¶
type MachineStatus struct {
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// +kubebuilder:validation:Required
AvailableMachines []AvailableMachineCondition `json:"availableMachines,omitempty"`
}
MachineStatus defines the observed state of Machine
func (*MachineStatus) DeepCopy ¶
func (in *MachineStatus) DeepCopy() *MachineStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineStatus.
func (*MachineStatus) DeepCopyInto ¶
func (in *MachineStatus) DeepCopyInto(out *MachineStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineType ¶
type MachineType struct {
// +kubebuilder:validation:Required
Name string `json:"name"`
// +kubebuilder:validation:Required
Spec MachineDetailSpec `json:"spec"`
// +kubebuilder:validation:Required
// +kubebuilder:validation:Minimum:=0
Available int32 `json:"available"`
}
func (*MachineType) DeepCopy ¶
func (in *MachineType) DeepCopy() *MachineType
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineType.
func (*MachineType) DeepCopyInto ¶
func (in *MachineType) DeepCopyInto(out *MachineType)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodePool ¶
type NodePool struct {
// +kubebuilder:validation:Required
Name string `json:"name"`
// +kubebuilder:validation:Required
// +kubebuilder:validation:Enum=ready;maintenance
Mode NodePoolMode `json:"mode"`
// +optional
// default=false
Taint bool `json:"taint,omitempty"`
// +kubebuilder:validation:Required
MachineType []NodePoolMachineType `json:"machineType"`
}
func (*NodePool) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePool.
func (*NodePool) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodePoolCondition ¶
type NodePoolCondition struct {
// +optional
Name string `json:"name,omitempty"`
// +optional
NodeCondition MachineNodeCondition `json:"condition,omitempty"`
}
func (*NodePoolCondition) DeepCopy ¶
func (in *NodePoolCondition) DeepCopy() *NodePoolCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolCondition.
func (*NodePoolCondition) DeepCopyInto ¶
func (in *NodePoolCondition) DeepCopyInto(out *NodePoolCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodePoolMachineType ¶
type NodePoolMachineType struct {
// +kubebuilder:validation:Required
Name string `json:"name"`
}
func (*NodePoolMachineType) DeepCopy ¶
func (in *NodePoolMachineType) DeepCopy() *NodePoolMachineType
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolMachineType.
func (*NodePoolMachineType) DeepCopyInto ¶
func (in *NodePoolMachineType) DeepCopyInto(out *NodePoolMachineType)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodePoolMachineTypeStock ¶
type NodePoolMachineTypeStock struct {
// +kubebuilder:validation:Required
Name string `json:"name"`
}
func (*NodePoolMachineTypeStock) DeepCopy ¶
func (in *NodePoolMachineTypeStock) DeepCopy() *NodePoolMachineTypeStock
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolMachineTypeStock.
func (*NodePoolMachineTypeStock) DeepCopyInto ¶
func (in *NodePoolMachineTypeStock) DeepCopyInto(out *NodePoolMachineTypeStock)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodePoolMode ¶
type NodePoolMode string
const ( NodeModeReady NodePoolMode = "ready" NodeModeNotReady NodePoolMode = "not-ready" NodeModeMaintenance NodePoolMode = "maintenance" )
func (NodePoolMode) Value ¶
func (mode NodePoolMode) Value() string
type UsageCondition ¶
type UsageCondition struct {
// +kubebuilder:validation:Required
// +kubebuilder:validation:Minimum:=0
Maximum int32 `json:"maximum"`
// +kubebuilder:validation:Required
// +kubebuilder:validation:Minimum:=0
Reserved int32 `json:"reserved"`
// +kubebuilder:validation:Required
// +kubebuilder:validation:Minimum:=0
Used int32 `json:"used"`
// +kubebuilder:validation:Required
// +kubebuilder:validation:Minimum:=0
Waiting int32 `json:"waiting"`
}
func (*UsageCondition) DeepCopy ¶
func (in *UsageCondition) DeepCopy() *UsageCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UsageCondition.
func (*UsageCondition) DeepCopyInto ¶
func (in *UsageCondition) DeepCopyInto(out *UsageCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.