unmanageddetector

package
v1.98.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Reconciler

type Reconciler struct {
	lifecyclehandler.LifecycleHandler
	// contains filtered or unexported fields
}

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (res reconcile.Result, err error)

type UnmanagedDetectorPredicate

type UnmanagedDetectorPredicate struct{}

UnmanagedDetectorPredicate is the predicate meant to be used by the unmanaged-detector controller. It sets up unmanaged-detector such that it handles Create events only.

func (UnmanagedDetectorPredicate) Create

func (UnmanagedDetectorPredicate) Delete

KCC controllers in general do not handle Delete events since resources deleted directly on the API server should not be reconciled. Instead, user-requested deletions are handled via the updated DeletionTimestamp. That is, user-requested deletions are handled via Update events, and as explained above, there is no scenario where unmanaged-detector would need to handle Update events.

func (UnmanagedDetectorPredicate) Generic

func (UnmanagedDetectorPredicate) Update

There is no scenario where unmanaged-detector would need to handle Update events.

Firstly, an Update event implies there had been a Create event already, which would have been handled by unmanaged-detector.

Secondly, once unmanaged-detector successfuly reconciles a resource once, it never has to reconcile the resource again. This is because if the resource is marked Unmanaged, then unmanaged-detector's job is done: the onus is now on the user to create a ConfigConnectorContext. On the other hand, if the resource is determined to be managed, then unmanaged-detector's job is also done: it is not possible for a resource to later become unmanaged since ConfigConnectorContext deletions are blocked if there are resources in its namespace.

Even if the resource had been created before unmanaged-detector came online (e.g. if KCC is changed from cluster-mode to namespaced-mode), this is no problem as well since controllers reconcile all resources they are configured to watch when they first come up.

Jump to

Keyboard shortcuts

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