Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the nodes v1 API group +kubebuilder:object:generate=true +groupName=nodes.lailin.xyz
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "nodes.lailin.xyz", Version: "v1"} // 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 )
Functions ¶
This section is empty.
Types ¶
type NodePool ¶
type NodePool struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec NodePoolSpec `json:"spec,omitempty"`
Status NodePoolStatus `json:"status,omitempty"`
}
NodePool is the Schema for the nodepools API
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.
func (*NodePool) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*NodePool) NodeLabelSelector ¶
NodeLabelSelector 返回节点 label 选择器
func (*NodePool) RuntimeClass ¶
func (n *NodePool) RuntimeClass() *v1beta1.RuntimeClass
RuntimeClass 生成对应的 runtime class 对象
type NodePoolList ¶
type NodePoolList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []NodePool `json:"items"`
}
NodePoolList contains a list of NodePool
func (*NodePoolList) DeepCopy ¶
func (in *NodePoolList) DeepCopy() *NodePoolList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolList.
func (*NodePoolList) DeepCopyInto ¶
func (in *NodePoolList) DeepCopyInto(out *NodePoolList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodePoolList) DeepCopyObject ¶
func (in *NodePoolList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodePoolSpec ¶
type NodePoolSpec struct {
// Taints 污点
Taints []corev1.Taint `json:"taints,omitempty"`
// Labels 标签
Labels map[string]string `json:"labels,omitempty"`
// Handler 对应 Runtime Class 的 Handler
Handler string `json:"handler,omitempty"`
}
NodePoolSpec 节点池,MVP 版本只允许一个节点属于一个节点池 TODO: 后续需要支持一个节点属于多个资源池
func (*NodePoolSpec) ApplyNode ¶
func (s *NodePoolSpec) ApplyNode(node corev1.Node) *corev1.Node
ApplyNode 生成 Node 结构,可以用于 Patch 数据
func (*NodePoolSpec) CleanNode ¶
func (s *NodePoolSpec) CleanNode(node corev1.Node) *corev1.Node
CleanNode 清理节点标签污点信息,仅保留系统标签
func (*NodePoolSpec) DeepCopy ¶
func (in *NodePoolSpec) DeepCopy() *NodePoolSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolSpec.
func (*NodePoolSpec) DeepCopyInto ¶
func (in *NodePoolSpec) DeepCopyInto(out *NodePoolSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodePoolStatus ¶
type NodePoolStatus struct {
Status int `json:"status"`
NodeCount int `json:"nodeCount"`
NotReadyNodeCount int `json:"notReadyNodeCount"`
}
NodePoolStatus defines the observed state of NodePool
func (*NodePoolStatus) DeepCopy ¶
func (in *NodePoolStatus) DeepCopy() *NodePoolStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolStatus.
func (*NodePoolStatus) DeepCopyInto ¶
func (in *NodePoolStatus) DeepCopyInto(out *NodePoolStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.