controllers

package
v0.0.0-...-0dca7f5 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TestData for Template rendering
	TestNodeData = ltbv1alpha1.LabInstanceNodes{
		Name: "test",
		NodeTypeRef: ltbv1alpha1.NodeTypeRef{
			Type:    "testnodetype",
			Image:   "ubuntu",
			Version: "latest",
		},
		Interfaces: []ltbv1alpha1.NodeInterface{
			{
				IPv4: "192.168.0.1/24",
			},
			{
				IPv4: "172.16.0.1/24",
			},
			{
				IPv4: "10.0.0.1/24",
			},
		},
	}
)

Functions

func CreateIngress

func CreateIngress(labInstance *ltbv1alpha1.LabInstance, node *ltbv1alpha1.LabInstanceNodes, kind string) (*networkingv1.Ingress, error)

func CreatePod

func CreatePod(labInstance *ltbv1alpha1.LabInstance, node *ltbv1alpha1.LabInstanceNodes) (*corev1.Pod, error)

func CreateResource

func CreateResource(labInstance *ltbv1alpha1.LabInstance, node *ltbv1alpha1.LabInstanceNodes, resource client.Object, kind string) (client.Object, error)

func CreateService

func CreateService(labInstance *ltbv1alpha1.LabInstance, node *ltbv1alpha1.LabInstanceNodes) (*corev1.Service, error)

func CreateSvcAccRoleRoleBind

func CreateSvcAccRoleRoleBind(labInstance *ltbv1alpha1.LabInstance) (*corev1.ServiceAccount, *rbacv1.Role, *rbacv1.RoleBinding)

func MapTemplateToPod

func MapTemplateToPod(labInstance *ltbv1alpha1.LabInstance, node *ltbv1alpha1.LabInstanceNodes) (*corev1.Pod, error)

func UpdateLabInstanceStatus

func UpdateLabInstanceStatus(pods []*corev1.Pod, vms []*kubevirtv1.VirtualMachine, labInstance *ltbv1alpha1.LabInstance) error

Types

type LabInstanceReconciler

type LabInstanceReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*LabInstanceReconciler) GetLabTemplate

func (r *LabInstanceReconciler) GetLabTemplate(ctx context.Context, labInstance *ltbv1alpha1.LabInstance, labTemplate *ltbv1alpha1.LabTemplate) ReturnToReconciler

func (*LabInstanceReconciler) GetNodeType

func (*LabInstanceReconciler) Reconcile

func (r *LabInstanceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*LabInstanceReconciler) ReconcileNetwork

func (r *LabInstanceReconciler) ReconcileNetwork(ctx context.Context, labInstance *ltbv1alpha1.LabInstance) ReturnToReconciler

func (*LabInstanceReconciler) ReconcileResource

func (r *LabInstanceReconciler) ReconcileResource(labInstance *ltbv1alpha1.LabInstance, resource client.Object, node *ltbv1alpha1.LabInstanceNodes, nodeKind string) ReturnToReconciler

func (*LabInstanceReconciler) ResourceExists

func (r *LabInstanceReconciler) ResourceExists(resource client.Object) (bool, error)

func (*LabInstanceReconciler) SetupWithManager

func (r *LabInstanceReconciler) SetupWithManager(mgr ctrl.Manager) error

type LabTemplateReconciler

type LabTemplateReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*LabTemplateReconciler) Reconcile

func (r *LabTemplateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*LabTemplateReconciler) SetupWithManager

func (r *LabTemplateReconciler) SetupWithManager(mgr ctrl.Manager) error

type NodeTypeReconciler

type NodeTypeReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*NodeTypeReconciler) Reconcile

func (r *NodeTypeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*NodeTypeReconciler) SetupWithManager

func (r *NodeTypeReconciler) SetupWithManager(mgr ctrl.Manager) error

type ReturnToReconciler

type ReturnToReconciler struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳