Documentation
¶
Overview ¶
+kubebuilder:object:generate=true +groupName=ltb-backend.ltb
Index ¶
- Variables
- type LabInstance
- type LabInstanceList
- type LabInstanceNodes
- type LabInstanceSpec
- type LabInstanceStatus
- type LabTemplate
- type LabTemplateList
- type LabTemplateSpec
- type LabTemplateStatus
- type NodeInterface
- type NodeType
- type NodeTypeList
- type NodeTypeRef
- type NodeTypeSpec
- type NodeTypeStatus
- type Port
Constants ¶
This section is empty.
Variables ¶
var ( GroupVersion = schema.GroupVersion{Group: "ltb-backend.ltb", Version: "v1alpha1"} SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type LabInstance ¶
type LabInstance struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec LabInstanceSpec `json:"spec,omitempty"`
Status LabInstanceStatus `json:"status,omitempty"`
}
A lab instance is created as a specific instance of a deployed lab, using the configuration from the corresponding lab template.
func (*LabInstance) DeepCopy ¶
func (in *LabInstance) DeepCopy() *LabInstance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabInstance.
func (*LabInstance) DeepCopyInto ¶
func (in *LabInstance) DeepCopyInto(out *LabInstance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LabInstance) DeepCopyObject ¶
func (in *LabInstance) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LabInstanceList ¶
type LabInstanceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LabInstance `json:"items"`
}
+kubebuilder:object:root=true
func (*LabInstanceList) DeepCopy ¶
func (in *LabInstanceList) DeepCopy() *LabInstanceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabInstanceList.
func (*LabInstanceList) DeepCopyInto ¶
func (in *LabInstanceList) DeepCopyInto(out *LabInstanceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LabInstanceList) DeepCopyObject ¶
func (in *LabInstanceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LabInstanceNodes ¶
type LabInstanceNodes struct {
// The name of the lab node.
Name string `json:"name"`
// The type of the lab node.
NodeTypeRef NodeTypeRef `json:"nodeTypeRef"`
// Array of interface configurations for the lab node. (currently not supported)
Interfaces []NodeInterface `json:"interfaces,omitempty"`
// The configuration for the lab node.
Config string `json:"config,omitempty"`
// Array of ports which should be publicly exposed for the lab node.
Ports []Port `json:"ports,omitempty"`
RenderedNodeSpec string `json:"renderedNodeSpec,omitempty"`
}
Configuration for a lab node.
func (*LabInstanceNodes) DeepCopy ¶
func (in *LabInstanceNodes) DeepCopy() *LabInstanceNodes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabInstanceNodes.
func (*LabInstanceNodes) DeepCopyInto ¶
func (in *LabInstanceNodes) DeepCopyInto(out *LabInstanceNodes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LabInstanceSpec ¶
type LabInstanceSpec struct {
// Reference to the name of a LabTemplate to use for the lab instance.
LabTemplateReference string `json:"labTemplateReference"`
// The DNS address, which will be used to expose the lab instance.
// It should point to the Kubernetes node where the lab instance is running.
DNSAddress string `json:"dnsAddress"`
}
LabInstanceSpec define which LabTemplate should be used for the lab instance and the DNS address.
func (*LabInstanceSpec) DeepCopy ¶
func (in *LabInstanceSpec) DeepCopy() *LabInstanceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabInstanceSpec.
func (*LabInstanceSpec) DeepCopyInto ¶
func (in *LabInstanceSpec) DeepCopyInto(out *LabInstanceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LabInstanceStatus ¶
type LabInstanceStatus struct {
Status string `json:"status,omitempty"`
NumPodsRunning string `json:"numPodsRunning,omitempty"`
NumVMsRunning string `json:"numVMsRunning,omitempty"`
}
func (*LabInstanceStatus) DeepCopy ¶
func (in *LabInstanceStatus) DeepCopy() *LabInstanceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabInstanceStatus.
func (*LabInstanceStatus) DeepCopyInto ¶
func (in *LabInstanceStatus) DeepCopyInto(out *LabInstanceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LabTemplate ¶
type LabTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec LabTemplateSpec `json:"spec,omitempty"`
Status LabTemplateStatus `json:"status,omitempty"`
}
Defines the lab topology, its nodes and their configuration.
func (*LabTemplate) DeepCopy ¶
func (in *LabTemplate) DeepCopy() *LabTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabTemplate.
func (*LabTemplate) DeepCopyInto ¶
func (in *LabTemplate) DeepCopyInto(out *LabTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LabTemplate) DeepCopyObject ¶
func (in *LabTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LabTemplateList ¶
type LabTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LabTemplate `json:"items"`
}
func (*LabTemplateList) DeepCopy ¶
func (in *LabTemplateList) DeepCopy() *LabTemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabTemplateList.
func (*LabTemplateList) DeepCopyInto ¶
func (in *LabTemplateList) DeepCopyInto(out *LabTemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LabTemplateList) DeepCopyObject ¶
func (in *LabTemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LabTemplateSpec ¶
type LabTemplateSpec struct {
// Array of lab nodes and their configuration.
Nodes []LabInstanceNodes `json:"nodes"`
// Array of connections between lab nodes. (currently not supported)
Neighbors []string `json:"neighbors"`
}
LabTemplateSpec defines the Lab nodes and their connections.
func (*LabTemplateSpec) DeepCopy ¶
func (in *LabTemplateSpec) DeepCopy() *LabTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabTemplateSpec.
func (*LabTemplateSpec) DeepCopyInto ¶
func (in *LabTemplateSpec) DeepCopyInto(out *LabTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LabTemplateStatus ¶
type LabTemplateStatus struct {
}
func (*LabTemplateStatus) DeepCopy ¶
func (in *LabTemplateStatus) DeepCopy() *LabTemplateStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabTemplateStatus.
func (*LabTemplateStatus) DeepCopyInto ¶
func (in *LabTemplateStatus) DeepCopyInto(out *LabTemplateStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeInterface ¶
type NodeInterface struct {
// IPv4 address of the interface.
IPv4 string `json:"ipv4,omitempty"`
// IPv6 address of the interface.
IPv6 string `json:"ipv6,omitempty"`
}
Interface configuration for the lab node (currently not supported)
func (*NodeInterface) DeepCopy ¶
func (in *NodeInterface) DeepCopy() *NodeInterface
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeInterface.
func (*NodeInterface) DeepCopyInto ¶
func (in *NodeInterface) DeepCopyInto(out *NodeInterface)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeType ¶
type NodeType struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec NodeTypeSpec `json:"spec,omitempty"`
Status NodeTypeStatus `json:"status,omitempty"`
}
NodeType defines a type of node that can be used in a lab template
func (*NodeType) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeType.
func (*NodeType) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeType) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeTypeList ¶
type NodeTypeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []NodeType `json:"items"`
}
func (*NodeTypeList) DeepCopy ¶
func (in *NodeTypeList) DeepCopy() *NodeTypeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTypeList.
func (*NodeTypeList) DeepCopyInto ¶
func (in *NodeTypeList) DeepCopyInto(out *NodeTypeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeTypeList) DeepCopyObject ¶
func (in *NodeTypeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeTypeRef ¶
type NodeTypeRef struct {
// Reference to the name of a NodeType.
Type string `json:"type"`
// Image to use for the NodeType. Is available as variable in the NodeType and functionality depends on its usage.
Image string `json:"image,omitempty"`
// Version of the NodeType. Is available as variable in the NodeType and functionality depends on its usage.
Version string `json:"version,omitempty"`
}
NodeTypeRef references a NodeType with the possibility to provide additional information to the NodeType.
func (*NodeTypeRef) DeepCopy ¶
func (in *NodeTypeRef) DeepCopy() *NodeTypeRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTypeRef.
func (*NodeTypeRef) DeepCopyInto ¶
func (in *NodeTypeRef) DeepCopyInto(out *NodeTypeRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeTypeSpec ¶
type NodeTypeSpec struct {
// Kind can be used to specify if the nodes is either a pod or a vm
Kind string `json:"kind,omitempty"`
// NodeSpec is the PodSpec or VirtualMachineSpec configuration for the node with the possibility to use go templating syntax to include LabTemplate variables (see [User Guide](https://lab-topology-builder.github.io/LTB-K8s-Backend/user-guide/#example-node-type))
// See [PodSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#podspec-v1-core) and [VirtualMachineSpec](https://kubevirt.io/api-reference/master/definitions.html#_v1_virtualmachinespec)
NodeSpec string `json:"nodeSpec,omitempty"`
}
NodeTypeSpec defines the Kind and NodeSpec for a NodeType
func (*NodeTypeSpec) DeepCopy ¶
func (in *NodeTypeSpec) DeepCopy() *NodeTypeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTypeSpec.
func (*NodeTypeSpec) DeepCopyInto ¶
func (in *NodeTypeSpec) DeepCopyInto(out *NodeTypeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeTypeStatus ¶
type NodeTypeStatus struct {
}
NodeTypeStatus defines the observed state of NodeType
func (*NodeTypeStatus) DeepCopy ¶
func (in *NodeTypeStatus) DeepCopy() *NodeTypeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTypeStatus.
func (*NodeTypeStatus) DeepCopyInto ¶
func (in *NodeTypeStatus) DeepCopyInto(out *NodeTypeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Port ¶
type Port struct {
// Arbitrary name for the port.
Name string `json:"name"`
// Choose either TCP or UDP.
Protocol corev1.Protocol `json:"protocol"`
// The port number to expose.
Port int32 `json:"port"`
}
Port of a lab node which should be publicly exposed.
func (*Port) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Port.
func (*Port) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.