v1alpha1

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 5 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=site.superedge.io

Package v1alpha1 contains API Schema definitions for the site.superedge.io v1alpha1 API group +kubebuilder:object:generate=true +groupName=site.superedge.io

+k8s:deepcopy-gen=package +groupName=superedge.io

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "site.superedge.io", Version: "v1alpha1"}
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: superedge.GroupName, Version: superedge.Version}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type NodeGroup

type NodeGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   NodeGroupSpec   `json:"spec,omitempty"`
	Status NodeGroupStatus `json:"status,omitempty"`
}

func (*NodeGroup) DeepCopy

func (in *NodeGroup) DeepCopy() *NodeGroup

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

func (*NodeGroup) DeepCopyInto

func (in *NodeGroup) DeepCopyInto(out *NodeGroup)

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

func (*NodeGroup) DeepCopyObject

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

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

type NodeGroupList

type NodeGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NodeGroup `json:"items"`
}

func (*NodeGroupList) DeepCopy

func (in *NodeGroupList) DeepCopy() *NodeGroupList

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

func (*NodeGroupList) DeepCopyInto

func (in *NodeGroupList) DeepCopyInto(out *NodeGroupList)

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

func (*NodeGroupList) DeepCopyObject

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

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

type NodeGroupSpec

type NodeGroupSpec struct {
	// If specified, If nodeUnit exists, join NodeGroup directly
	// +optional
	NodeUnits []string `json:"nodeunits,omitempty" protobuf:"bytes,12,opt,name=nodeunits"`

	// If specified, Label selector for nodeUnit.
	// +optional
	Selector *Selector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`

	// If specified, create new NodeUnits based on node have same label keys, for different values will create different nodeunites
	// +optional
	AutoFindNodeKeys []string `json:"autofindnodekeys,omitempty" protobuf:"bytes,12,opt,name=autofindnodekeys"`

	// If specified, Nodegroup bound workload
	// +optional
	Workload []Workload `json:"workload,omitempty" protobuf:"bytes,12,opt,name=workload"`
}

NodeGroupSpec defines the desired state of NodeGroup

func (*NodeGroupSpec) DeepCopy

func (in *NodeGroupSpec) DeepCopy() *NodeGroupSpec

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

func (*NodeGroupSpec) DeepCopyInto

func (in *NodeGroupSpec) DeepCopyInto(out *NodeGroupSpec)

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

type NodeGroupStatus

type NodeGroupStatus struct {
	// NodeUnit that is number in nodegroup
	//+kubebuilder:default=0
	// +optional
	UnitNumber int `json:"unitnumber" protobuf:"bytes,2,rep,name=unitnumber"`
	// Nodeunit contained in nodegroup
	// +optional
	NodeUnits []string `json:"nodeunits,omitempty" protobuf:"bytes,12,opt,name=nodeunits"`
	// The status of the workload in the nodegroup in each nodeunit
	// +optional
	WorkloadStatus []WorkloadStatus `json:"workloadstatus,omitempty" protobuf:"bytes,12,opt,name=workloadstatus"`
}

NodeGroupStatus defines the observed state of NodeGroup

func (*NodeGroupStatus) DeepCopy

func (in *NodeGroupStatus) DeepCopy() *NodeGroupStatus

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

func (*NodeGroupStatus) DeepCopyInto

func (in *NodeGroupStatus) DeepCopyInto(out *NodeGroupStatus)

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

type NodeSelector

type NodeSelector struct {
	// Type of nodeunit, vaule: Cloud、Edge
	// +optional
	Type NodeUnitType `json:"type,omitempty" protobuf:"bytes,2,rep,name=type"`
}

NodeUnitSpec defines the desired state of NodeUnit

func (*NodeSelector) DeepCopy

func (in *NodeSelector) DeepCopy() *NodeSelector

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

func (*NodeSelector) DeepCopyInto

func (in *NodeSelector) DeepCopyInto(out *NodeSelector)

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

type NodeUnit

type NodeUnit struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   NodeUnitSpec   `json:"spec,omitempty"`
	Status NodeUnitStatus `json:"status,omitempty"`
}

NodeUnit is the Schema for the nodeunits API

func (*NodeUnit) DeepCopy

func (in *NodeUnit) DeepCopy() *NodeUnit

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

func (*NodeUnit) DeepCopyInto

func (in *NodeUnit) DeepCopyInto(out *NodeUnit)

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

func (*NodeUnit) DeepCopyObject

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

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

type NodeUnitList

type NodeUnitList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NodeUnit `json:"items"`
}

NodeUnitList contains a list of NodeUnit

func (*NodeUnitList) DeepCopy

func (in *NodeUnitList) DeepCopy() *NodeUnitList

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

func (*NodeUnitList) DeepCopyInto

func (in *NodeUnitList) DeepCopyInto(out *NodeUnitList)

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

func (*NodeUnitList) DeepCopyObject

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

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

type NodeUnitSpec

type NodeUnitSpec struct {
	// Type of nodeunit, vaule: Cloud、Edge
	// +optional
	//+kubebuilder:default=edge
	Type NodeUnitType `json:"type" protobuf:"bytes,2,rep,name=type"`

	// Unschedulable controls nodeUnit schedulability of new workwolads. By default, nodeUnit is schedulable.
	// +optional
	//+kubebuilder:default=false
	Unschedulable bool `json:"unschedulable,omitempty" protobuf:"varint,4,opt,name=unschedulable"`

	// If specified, If node exists, join nodeunit directly
	// +optional
	Nodes []string `json:"nodes,omitempty" protobuf:"bytes,12,opt,name=nodes"`

	// If specified, Label selector for nodes.
	// +optional
	Selector *Selector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`

	// If specified, set the relevant properties to the node of nodeunit.
	// +optional
	SetNode SetNode `json:"setnode,omitempty" protobuf:"bytes,12,opt,name=setnode"`
	// If specified, allow to set taints to nodeunit for the scheduler to choose
	// +optional
	Taints []corev1.Taint `json:"taints,omitempty" protobuf:"bytes,5,opt,name=taints"`
}

NodeUnitSpec defines the desired state of NodeUnit

func (*NodeUnitSpec) DeepCopy

func (in *NodeUnitSpec) DeepCopy() *NodeUnitSpec

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

func (*NodeUnitSpec) DeepCopyInto

func (in *NodeUnitSpec) DeepCopyInto(out *NodeUnitSpec)

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

type NodeUnitStatus

type NodeUnitStatus struct {
	// Node that is ready in nodeunit
	//+kubebuilder:default='1/1'
	// +optional
	ReadyRate string `json:"readyrate" protobuf:"bytes,4,rep,name=readyrate"`
	// Node selected by nodeunit
	// +optional
	ReadyNodes []string `json:"readynodes,omitempty" protobuf:"bytes,12,opt,name=readynodes"`
	// Node that is not ready in nodeunit
	// +optional
	NotReadyNodes []string `json:"notreadynodes,omitempty" protobuf:"bytes,12,opt,name=notreadynodes"`
}

NodeUnitStatus defines the observed state of NodeUnit

func (*NodeUnitStatus) DeepCopy

func (in *NodeUnitStatus) DeepCopy() *NodeUnitStatus

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

func (*NodeUnitStatus) DeepCopyInto

func (in *NodeUnitStatus) DeepCopyInto(out *NodeUnitStatus)

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

type NodeUnitType

type NodeUnitType string
const (
	EdgeNodeUnit   NodeUnitType = "edge"
	CloudNodeUnit  NodeUnitType = "cloud"
	MasterNodeUnit NodeUnitType = "master"
	OtherNodeUnit  NodeUnitType = "other"
)

type Selector

type Selector struct {
	// matchLabels is a map of {key,value} pairs.
	// +optional
	MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,opt,name=matchLabels"`
	// matchExpressions is a list of label selector requirements. The requirements are ANDed.
	// +optional
	MatchExpressions []metav1.LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,opt,name=matchExpressions"`
	//If specified, select node to join nodeUnit according to Annotations
	// +optional
	Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,opt,name=annotations"`
}

func (*Selector) DeepCopy

func (in *Selector) DeepCopy() *Selector

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

func (*Selector) DeepCopyInto

func (in *Selector) DeepCopyInto(out *Selector)

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

type SetNode

type SetNode struct {
	//If specified, set labels to all nodes of nodeunit
	// +optional
	Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,opt,name=labels"`

	//If specified, set annotations to all nodes of nodeunit
	// +optional
	Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,opt,name=annotations"`

	// If specified, set taints to all nodes of nodeunit
	// +optional
	Taints []corev1.Taint `json:"taints,omitempty" protobuf:"bytes,5,opt,name=taints"`
}

func (*SetNode) DeepCopy

func (in *SetNode) DeepCopy() *SetNode

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

func (*SetNode) DeepCopyInto

func (in *SetNode) DeepCopyInto(out *SetNode)

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

type Workload

type Workload struct {
	// workload name
	// +optional
	Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
	// workload type, Value can be pod, deploy, ds, service, job, st
	// +optional
	Type WorkloadType `json:"type" protobuf:"bytes,2,opt,name=type"`
	// If specified, Label selector for workload.
	// +optional
	Selector *Selector `json:"selector" protobuf:"bytes,2,opt,name=selector"`
}

func (*Workload) DeepCopy

func (in *Workload) DeepCopy() *Workload

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

func (*Workload) DeepCopyInto

func (in *Workload) DeepCopyInto(out *Workload)

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

type WorkloadStatus

type WorkloadStatus struct {
	// workload Name
	// +optional
	WorkloadName string `json:"workloadname,omitempty" protobuf:"bytes,12,opt,name=workloadname"`
	// workload Ready Units
	// +optional
	ReadyUnit []string `json:"readyunit,omitempty" protobuf:"bytes,12,opt,name=readyunit"`
	// workload NotReady Units
	// +optional
	NotReadyUnit []string `json:"notreadyunit,omitempty" protobuf:"bytes,12,opt,name=notreadyunit"`
}

NodeGroupStatus defines the observed state of NodeGroup

func (*WorkloadStatus) DeepCopy

func (in *WorkloadStatus) DeepCopy() *WorkloadStatus

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

func (*WorkloadStatus) DeepCopyInto

func (in *WorkloadStatus) DeepCopyInto(out *WorkloadStatus)

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

type WorkloadType

type WorkloadType string
const (
	WorkloadPod          WorkloadType = "Pod"
	WorkloadJob          WorkloadType = "Job"
	WorkloadCronjob      WorkloadType = "CronJob"
	WorkloadDeploy       WorkloadType = "Deployment"
	WorkloadService      WorkloadType = "Service"
	WorkloadReplicaSet   WorkloadType = "ReplicaSet"
	WorkloadDaemonset    WorkloadType = "DaemonSet"
	WorkloadStatuefulset WorkloadType = "StatuefulSet"
)

Jump to

Keyboard shortcuts

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