migrationhierarchy

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeSNS

func ComposeSNS(name string, namespace string, quota corev1.ResourceList, labels map[string]string) *danav1.Subnamespace

ComposeSNS returns a subnamespace object based on the given parameters.

Types

type MigrationHierarchyMutator

type MigrationHierarchyMutator struct {
	Client  client.Client
	Decoder admission.Decoder
}

func (*MigrationHierarchyMutator) Handle

Handle implements the mutation webhook.

func (*MigrationHierarchyMutator) UpdateRequester

func (m *MigrationHierarchyMutator) UpdateRequester(migrationHierarchyObject danav1.MigrationHierarchy, requester string) ([]byte, error)

UpdateRequester adds a requester annotation to the object.

type MigrationHierarchyReconciler

type MigrationHierarchyReconciler struct {
	client.Client
	Scheme      *runtime.Scheme
	NamespaceDB *namespacedb.NamespaceDB
	SnsEvents   chan event.GenericEvent
}

MigrationHierarchyReconciler reconciles a MigrationHierarchy object

func (*MigrationHierarchyReconciler) Reconcile

func (*MigrationHierarchyReconciler) SetupWithManager

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

func (*MigrationHierarchyReconciler) UpdateAllNSChildrenOfNs

func (r *MigrationHierarchyReconciler) UpdateAllNSChildrenOfNs(ctx context.Context, parentNS *objectcontext.ObjectContext) error

UpdateAllNSChildrenOfNs updates all the children namespaces of a parent namespace recursively.

func (*MigrationHierarchyReconciler) UpdateNSBasedOnParent

func (r *MigrationHierarchyReconciler) UpdateNSBasedOnParent(ctx context.Context, parentNS, childNS *objectcontext.ObjectContext) error

UpdateNSBasedOnParent updates the labels and annotations of a namespace based on its parent labels and annotations.

type MigrationHierarchyValidator

type MigrationHierarchyValidator struct {
	Client      client.Client
	Decoder     admission.Decoder
	NamespaceDB *namespacedb.NamespaceDB
	MaxSNS      int
}

func (*MigrationHierarchyValidator) Handle

Handle implements the validation webhook.

Jump to

Keyboard shortcuts

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