v1

package
v0.0.0-...-b86d7ce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2021 License: MIT Imports: 12 Imported by: 0

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

View Source
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

func (in *NodePool) DeepCopy() *NodePool

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePool.

func (*NodePool) DeepCopyInto

func (in *NodePool) DeepCopyInto(out *NodePool)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodePool) DeepCopyObject

func (in *NodePool) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*NodePool) Default

func (r *NodePool) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*NodePool) NodeLabelSelector

func (n *NodePool) NodeLabelSelector() labels.Selector

NodeLabelSelector 返回节点 label 选择器

func (*NodePool) NodeRole

func (n *NodePool) NodeRole() string

NodeRole 返回节点对应的 role 标签名

func (*NodePool) RuntimeClass

func (n *NodePool) RuntimeClass() *v1beta1.RuntimeClass

RuntimeClass 生成对应的 runtime class 对象

func (*NodePool) SetupWebhookWithManager

func (r *NodePool) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*NodePool) ValidateCreate

func (r *NodePool) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*NodePool) ValidateDelete

func (r *NodePool) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*NodePool) ValidateUpdate

func (r *NodePool) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

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) 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL