managedresources

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0, MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultClass = "resources"

DefaultClass is used a resource class is no class is specified on the command line

View Source
const (
	// FinalizerName is the finalizer base name that is injected into ManagedResources.
	// The concrete finalizer is finally componed by this base name and the resource class.
	FinalizerName = "resources.gardener.cloud/gardener-resource-manager"
)

Variables

This section is empty.

Functions

func EquiSetForKind

func EquiSetForKind(kind string, groups ...string) []metav1.GroupKind

func SecretToManagedResourceMapper

func SecretToManagedResourceMapper(client client.Client, predicates ...predicate.Predicate) handler.Mapper

SecretToManagedResourceMapper returns a mapper that returns requests for ManagedResources whose referenced secrets have been modified.

Types

type ClassFilter

type ClassFilter struct {
	// contains filtered or unexported fields
}

ClassFilter keeps the resource class for the actual controller instance and is used as Filter predicate for events finally passed to the controller

func NewClassFilter

func NewClassFilter(class string) *ClassFilter

NewClassFilter returns a new `ClassFilter` instance.

func (*ClassFilter) Active

func (f *ClassFilter) Active(o runtime.Object) (action bool, responsible bool)

Active checks whether a dedicated object must be handled by the actual controller instance. This is split into two conditions. An object must be handled if it has already been handled, indicated by the actual finalizer, or if the actual controller is responsible for the object.

func (*ClassFilter) Create

func (f *ClassFilter) Create(e event.CreateEvent) bool

Create implements `predicate.Predicate`.

func (*ClassFilter) Delete

func (f *ClassFilter) Delete(e event.DeleteEvent) bool

Delete implements `predicate.Predicate`.

func (*ClassFilter) FinalizerName

func (f *ClassFilter) FinalizerName() string

FinalizerName determines the finalizer name to be used for the actual resource class

func (*ClassFilter) Generic

func (f *ClassFilter) Generic(e event.GenericEvent) bool

Generic implements `predicate.Predicate`.

func (*ClassFilter) ResourceClass

func (f *ClassFilter) ResourceClass() string

ResourceClass returns the actually configured resource class

func (*ClassFilter) Responsible

func (f *ClassFilter) Responsible(o runtime.Object) bool

Responsible checks whether an object should be managed by the actual controller instance

func (*ClassFilter) Update

func (f *ClassFilter) Update(e event.UpdateEvent) bool

Update implements `predicate.Predicate`.

type GroupKindSet

type GroupKindSet map[metav1.GroupKind]struct{}

func (GroupKindSet) Delete

func (s GroupKindSet) Delete(gks ...metav1.GroupKind) GroupKindSet

func (GroupKindSet) Insert

func (s GroupKindSet) Insert(gks ...metav1.GroupKind) GroupKindSet

type ObjectIndex

type ObjectIndex struct {
	// contains filtered or unexported fields
}

func NewObjectIndex

func NewObjectIndex(resources []resourcesv1alpha1.ObjectReference, equis equivalences) *ObjectIndex

func (ObjectIndex) Found

func (ObjectIndex) GetEquivalencesFor

func (i ObjectIndex) GetEquivalencesFor(gk metav1.GroupKind) GroupKindSet

func (*ObjectIndex) Objects

type Reconciler

type Reconciler struct {
	// contains filtered or unexported fields
}

Reconciler contains information in order to reconcile instances of ManagedResource.

func NewReconciler

func NewReconciler(ctx context.Context, log logr.Logger, c, targetClient client.Client, targetRESTMapper *restmapper.DeferredDiscoveryRESTMapper, class *ClassFilter, syncPeriod time.Duration) *Reconciler

NewReconciler creates a new reconciler with the given target client.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

Reconcile implements `reconcile.Reconciler`.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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