Documentation ¶
Overview ¶
Package namespacemapctrl contains NamespaceMap Controller logic and some functions for managing remote Namespaces.
Index ¶
- Constants
- type NamespaceMapReconciler
- func (r *NamespaceMapReconciler) EnsureNamespaces(ctx context.Context, nm *vkv1alpha1.NamespaceMap) error
- func (r *NamespaceMapReconciler) NamespaceMapDeletionProcess(ctx context.Context, nm *vkv1alpha1.NamespaceMap) error
- func (r *NamespaceMapReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *NamespaceMapReconciler) RemoveNamespaceMapControllerFinalizer(ctx context.Context, nm *mapsv1alpha1.NamespaceMap) error
- func (r *NamespaceMapReconciler) SetNamespaceMapControllerFinalizer(ctx context.Context, nm *mapsv1alpha1.NamespaceMap) error
- func (r *NamespaceMapReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
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 ¶
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.