namespacectrl

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package namespacectrl contains Namespace Controller logic, and some tests for it

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamespaceReconciler

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

NamespaceReconciler covers the case in which the user adds the enabling liqo label to his namespace, and the NamespaceOffloading resource associated with that namespace is created, if it is not already there.

func (*NamespaceReconciler) CreateNamespaceOffloading added in v0.3.0

func (r *NamespaceReconciler) CreateNamespaceOffloading(ctx context.Context,
	namespace *corev1.Namespace) error

CreateNamespaceOffloading creates a NamespaceOffloading resource with an annotation which represents the ownership of the controller on this resource (this annotation will be useful during deletion phase).

func (*NamespaceReconciler) DeleteNamespaceOffloadingIfOwned added in v0.3.0

func (r *NamespaceReconciler) DeleteNamespaceOffloadingIfOwned(ctx context.Context,
	namespaceOffloading *offv1alpha1.NamespaceOffloading) error

DeleteNamespaceOffloadingIfOwned checks if the NamespaceOffloading resource is owned by the controller and if so, delete it.

func (*NamespaceReconciler) Reconcile

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

Reconcile covers the case in which the user adds the enabling liqo label to his namespace, and the NamespaceOffloading resource associated with that namespace is created, if it is not already there.

func (*NamespaceReconciler) SetupWithManager

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

SetupWithManager reconciles only when a Namespace is involved in Liqo logic.

Jump to

Keyboard shortcuts

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