namespacemapctrl

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package namespacemapctrl contains NamespaceMap Controller logic and some functions for managing remote Namespaces.

Index

Constants

View Source
const (
	// NamespaceMapControllerFinalizer is the finalizer added to NamespaceMaps to ensure graceful termination.
	NamespaceMapControllerFinalizer = "namespacemap-controller.liqo.io/finalizer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NamespaceMapReconciler

type NamespaceMapReconciler struct {
	client.Client
}

NamespaceMapReconciler creates remote namespaces and updates NamespaceMaps Status.

func (*NamespaceMapReconciler) EnsureNamespaces

func (r *NamespaceMapReconciler) EnsureNamespaces(ctx context.Context, nm *vkv1alpha1.NamespaceMap) error

EnsureNamespaces checks if there are Namespaces that have to be created or deleted, in accordance with DesiredMapping field. It updates also NamespaceOffloading status in according to the remote Namespace Status.

func (*NamespaceMapReconciler) NamespaceMapDeletionProcess

func (r *NamespaceMapReconciler) NamespaceMapDeletionProcess(ctx context.Context, nm *vkv1alpha1.NamespaceMap) error

NamespaceMapDeletionProcess handles the graceful termination of a NamespaceMap, deleting all namespaces and eventually removing the finalizer.

func (*NamespaceMapReconciler) Reconcile

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

Reconcile adds/removes NamespaceMap finalizer, and checks differences between DesiredMapping and CurrentMapping in order to create/delete the Namespaces if it is necessary.

func (*NamespaceMapReconciler) RemoveNamespaceMapControllerFinalizer

func (r *NamespaceMapReconciler) RemoveNamespaceMapControllerFinalizer(ctx context.Context, nm *mapsv1alpha1.NamespaceMap) error

RemoveNamespaceMapControllerFinalizer remove the NamespaceMapController finalizer.

func (*NamespaceMapReconciler) SetNamespaceMapControllerFinalizer

func (r *NamespaceMapReconciler) SetNamespaceMapControllerFinalizer(ctx context.Context, nm *mapsv1alpha1.NamespaceMap) error

SetNamespaceMapControllerFinalizer adds NamespaceMapControllerFinalizer to a NamespaceMap, if it is not already there.

func (*NamespaceMapReconciler) SetupWithManager

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

SetupWithManager monitors only updates on NamespaceMap.

Jump to

Keyboard shortcuts

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