reconcilers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: Apache-2.0, MIT Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSharedReconcilerTypeFor added in v0.2.0

func CreateSharedReconcilerTypeFor(clusterName string, reconcilerType SharedReconcilerType, gks ...schema.GroupKind) controller.ReconcilerType

func CreateSimpleUsageReconcilerTypeFor added in v0.2.0

func CreateSimpleUsageReconcilerTypeFor(clusterName string, gks ...schema.GroupKind) controller.ReconcilerType

func SecretUsageReconciler added in v0.2.0

func SecretUsageReconciler(clusterName string) controller.ConfigurationModifier

func SharedReconcilerForGKs added in v0.2.0

func SharedReconcilerForGKs(name string, cluster string, reconcilerType SharedReconcilerType,
	gks ...schema.GroupKind) controller.ConfigurationModifier

func SlaveReconcilerType

func SlaveReconcilerType(name string, slaveResources Resources, reconciler controller.ReconcilerType, masterResources Resources) controller.ReconcilerType

func SlaveReconcilerTypeBySpec

func SlaveReconcilerTypeBySpec(reconciler controller.ReconcilerType, spec SlaveAccessSpec) controller.ReconcilerType

func UsageReconcilerForGKs added in v0.2.0

func UsageReconcilerForGKs(name string, cluster string, gks ...schema.GroupKind) controller.ConfigurationModifier

func UsageReconcilerTypeBySpec

func UsageReconcilerTypeBySpec(reconciler controller.ReconcilerType, spec UsageAccessSpec) controller.ReconcilerType

Types

type NestedReconciler

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

func NewNestedReconciler

func NewNestedReconciler(reconciler controller.ReconcilerType, c controller.Interface) (*NestedReconciler, error)

func (*NestedReconciler) Command

func (this *NestedReconciler) Command(logger logger.LogContext, cmd string) reconcile.Status

func (*NestedReconciler) Delete

func (*NestedReconciler) Deleted

func (*NestedReconciler) Reconcile

func (this *NestedReconciler) Reconcile(logger logger.LogContext, obj resources.Object) reconcile.Status

func (*NestedReconciler) Setup

func (this *NestedReconciler) Setup()

func (*NestedReconciler) Start

func (this *NestedReconciler) Start()

type ReconcilerSupport added in v0.2.0

type ReconcilerSupport struct {
	reconcile.DefaultReconciler
	// contains filtered or unexported fields
}

func NewReconcilerSupport added in v0.2.0

func NewReconcilerSupport(c controller.Interface) ReconcilerSupport

func (*ReconcilerSupport) Controller added in v0.2.0

func (this *ReconcilerSupport) Controller() controller.Interface

type Resources

type Resources func(c controller.Interface) []resources.Interface

func ClusterResources

func ClusterResources(cluster string, gks ...schema.GroupKind) Resources

type SecretUsageCache added in v0.2.0

type SecretUsageCache struct {
	*SimpleUsageCache
	// contains filtered or unexported fields
}

func AccessSecretUsageCache added in v0.2.0

func AccessSecretUsageCache(controller controller.Interface) *SecretUsageCache

func (*SecretUsageCache) GetSecretDataByName added in v0.2.0

func (this *SecretUsageCache) GetSecretDataByName(name resources.ObjectName, src ...cluster.Interface) (map[string][]byte, error)

func (*SecretUsageCache) GetUsersForSecretByName added in v0.2.0

func (this *SecretUsageCache) GetUsersForSecretByName(name resources.ObjectName, src ...cluster.Interface) resources.ClusterObjectKeySet

type SharedReconciler added in v0.2.0

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

func GetSharedReconciler added in v0.2.0

func GetSharedReconciler(t SharedReconcilerType, controller controller.Interface) *SharedReconciler

GetSharedReconciler returns an instance of a reconciler unique for the complete controller manager

func NewSharedReconciler added in v0.2.0

func NewSharedReconciler(t SharedReconcilerType) *SharedReconciler

func (*SharedReconciler) State added in v0.2.0

func (this *SharedReconciler) State() interface{}

type SharedReconcilerType added in v0.2.0

type SharedReconcilerType interface {
	CreateReconciler(controller controller.Interface, state interface{}) (reconcile.Interface, error)
	CreateState() interface{}
}

func NewSharedReconcilerType added in v0.2.0

func NewSharedReconcilerType(r func(controller controller.Interface, state interface{}) (reconcile.Interface, error),
	s func() interface{}) SharedReconcilerType

type SimpleUsageCache added in v0.2.0

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

func GetSharedSimpleUsageCache added in v0.2.0

func GetSharedSimpleUsageCache(controller controller.Interface) *SimpleUsageCache

GetSharedSimpleUsageCache returns an instance of a usage cache unique for the complete controller manager

func NewSimpleUsageCache added in v0.2.0

func NewSimpleUsageCache() *SimpleUsageCache

func (*SimpleUsageCache) AddUseFor added in v0.2.0

func (*SimpleUsageCache) GetUsersFor added in v0.2.0

func (*SimpleUsageCache) GetUsesFor added in v0.2.0

func (*SimpleUsageCache) RemoveUseFor added in v0.2.0

func (this *SimpleUsageCache) RemoveUseFor(user resources.ClusterObjectKey, used resources.ClusterObjectKey)

func (*SimpleUsageCache) SetUsesFor added in v0.2.0

func (*SimpleUsageCache) UpdateUsesFor added in v0.2.0

type SlaveAccess

type SlaveAccess struct {
	controller.Interface
	reconcile.DefaultReconciler
	// contains filtered or unexported fields
}

func NewSlaveAccess

func NewSlaveAccess(c controller.Interface, name string, slave_func Resources, master_func Resources) *SlaveAccess

func NewSlaveAccessBySpec

func NewSlaveAccessBySpec(c controller.Interface, spec SlaveAccessSpec) *SlaveAccess

func (*SlaveAccess) AddSlave

func (this *SlaveAccess) AddSlave(obj resources.Object, slave resources.Object) error

func (*SlaveAccess) AddSlaveFilter

func (this *SlaveAccess) AddSlaveFilter(filter ...resources.ObjectFilter)

func (*SlaveAccess) AssertSingleSlave

func (this *SlaveAccess) AssertSingleSlave(logger logger.LogContext, key resources.ClusterObjectKey, slaves []resources.Object, match resources.ObjectMatcher) resources.Object

func (*SlaveAccess) CreateOrModifySlave added in v0.2.0

func (this *SlaveAccess) CreateOrModifySlave(obj resources.Object, slave resources.Object, mod resources.Modifier) (bool, error)

func (*SlaveAccess) CreateSlave

func (this *SlaveAccess) CreateSlave(obj resources.Object, slave resources.Object) error

func (*SlaveAccess) GetMasters

func (this *SlaveAccess) GetMasters(all_clusters bool, kinds ...schema.GroupKind) resources.ClusterObjectKeySet

func (*SlaveAccess) GetMastersFor

func (this *SlaveAccess) GetMastersFor(key resources.ClusterObjectKey, all_clusters bool, kinds ...schema.GroupKind) resources.ClusterObjectKeySet

func (*SlaveAccess) Key

func (this *SlaveAccess) Key() interface{}

func (*SlaveAccess) LookupSlaves

func (this *SlaveAccess) LookupSlaves(key resources.ClusterObjectKey, kinds ...schema.GroupKind) []resources.Object

func (*SlaveAccess) MasterResoures

func (this *SlaveAccess) MasterResoures() []resources.Interface

func (*SlaveAccess) Setup

func (this *SlaveAccess) Setup()

func (*SlaveAccess) SlaveResoures

func (this *SlaveAccess) SlaveResoures() []resources.Interface

func (*SlaveAccess) Slaves

func (this *SlaveAccess) Slaves() *resources.SlaveCache

func (*SlaveAccess) UpdateSlave

func (this *SlaveAccess) UpdateSlave(slave resources.Object) error

type SlaveAccessSink added in v0.2.0

type SlaveAccessSink interface {
	InjectSlaveAccess(*SlaveAccess)
}

type SlaveAccessSpec

type SlaveAccessSpec struct {
	Name            string
	Slaves          Resources
	Masters         Resources
	RequeueDeleting bool
}

type SlaveReconciler

type SlaveReconciler struct {
	*NestedReconciler
	*SlaveAccess
}

func NewSlaveReconciler

func NewSlaveReconciler(c controller.Interface, name string, slaveResources Resources, reconciler controller.ReconcilerType, masterResources Resources) (*SlaveReconciler, error)

func NewSlaveReconcilerBySpec

func NewSlaveReconcilerBySpec(c controller.Interface, reconciler controller.ReconcilerType, spec SlaveAccessSpec) (*SlaveReconciler, error)

func (*SlaveReconciler) Deleted

func (*SlaveReconciler) Reconcile

func (this *SlaveReconciler) Reconcile(logger logger.LogContext, obj resources.Object) reconcile.Status

func (*SlaveReconciler) Setup

func (this *SlaveReconciler) Setup()

type UsageAccess

type UsageAccess struct {
	controller.Interface
	reconcile.DefaultReconciler
	// contains filtered or unexported fields
}

func NewUsageAccessBySpec

func NewUsageAccessBySpec(c controller.Interface, spec UsageAccessSpec) *UsageAccess

func (*UsageAccess) DeleteOwner

func (this *UsageAccess) DeleteOwner(key resources.ClusterObjectKey)

func (*UsageAccess) GetOwners

func (this *UsageAccess) GetOwners(all_clusters bool, kinds ...schema.GroupKind) resources.ClusterObjectKeySet

func (*UsageAccess) GetOwnersFor

func (this *UsageAccess) GetOwnersFor(key resources.ClusterObjectKey, all_clusters bool, kinds ...schema.GroupKind) resources.ClusterObjectKeySet

func (*UsageAccess) GetUsed

func (this *UsageAccess) GetUsed(all_clusters bool, kinds ...schema.GroupKind) resources.ClusterObjectKeySet

func (*UsageAccess) Key

func (this *UsageAccess) Key() interface{}

func (*UsageAccess) LookupUsages

func (*UsageAccess) MasterResoures

func (this *UsageAccess) MasterResoures() []resources.Interface

func (*UsageAccess) RenewOwner

func (this *UsageAccess) RenewOwner(obj resources.Object) bool

func (*UsageAccess) Setup

func (this *UsageAccess) Setup()

func (*UsageAccess) Usages

func (this *UsageAccess) Usages() *resources.UsageCache

type UsageAccessSink added in v0.2.0

type UsageAccessSink interface {
	InjectUsageAccess(*UsageAccess)
}

type UsageAccessSpec

type UsageAccessSpec struct {
	Name                string
	MasterResources     Resources
	Extractor           resources.UsedExtractor
	ExtractorFactory    UsedExtractorFactory
	RequeueDeleting     bool
	RequeueMaster       resources.KeyFilter // master resources to trigger for used updated
	RequeueMasterByUsed resources.KeyFilter // used resources to trigger masters on update
}

type UsageReconciler

type UsageReconciler struct {
	*NestedReconciler
	*UsageAccess
}

func NewUsageReconcilerBySpec

func NewUsageReconcilerBySpec(c controller.Interface, reconciler controller.ReconcilerType, spec UsageAccessSpec) (*UsageReconciler, error)

func (*UsageReconciler) Deleted

func (*UsageReconciler) Reconcile

func (this *UsageReconciler) Reconcile(logger logger.LogContext, obj resources.Object) reconcile.Status

func (*UsageReconciler) Setup

func (this *UsageReconciler) Setup()

type UsedExtractorFactory

type UsedExtractorFactory func(controller.Interface) resources.UsedExtractor

Jump to

Keyboard shortcuts

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