composite

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ControllerName

func ControllerName(name string) string

ControllerName returns the recommended name for controllers that use this package to reconcile a particular kind of composite infrastructure resource.

Types

type APIConfigurator

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

An APIConfigurator configures a composite resource using its composition.

func NewAPIConfigurator

func NewAPIConfigurator(c client.Client) *APIConfigurator

NewAPIConfigurator returns a Configurator that configures a composite resource using its composition.

func (*APIConfigurator) Configure

Configure the supplied composite resource using its composition.

type APIFilteredSecretPublisher

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

APIFilteredSecretPublisher publishes ConnectionDetails content after filtering it through a set of permitted keys.

func NewAPIFilteredSecretPublisher

func NewAPIFilteredSecretPublisher(c client.Client, filter []string) *APIFilteredSecretPublisher

NewAPIFilteredSecretPublisher returns a ConnectionPublisher that only publishes connection secret keys that are included in the supplied filter.

func (*APIFilteredSecretPublisher) PublishConnection

PublishConnection publishes the supplied ConnectionDetails to the Secret referenced in the resource.

func (*APIFilteredSecretPublisher) UnpublishConnection

UnpublishConnection is no-op since PublishConnection only creates resources that will be garbage collected by Kubernetes when the managed resource is deleted.

type APISelectorResolver

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

APISelectorResolver is used to resolve the composition selector on the instance to composition reference.

func NewAPISelectorResolver

func NewAPISelectorResolver(c client.Client) *APISelectorResolver

NewAPISelectorResolver returns a SelectorResolver for composite resource.

func (*APISelectorResolver) ResolveSelector

func (r *APISelectorResolver) ResolveSelector(ctx context.Context, cp resource.Composite) error

ResolveSelector resolves selector to a reference if it doesn't exist.

type Composer

type Composer interface {
	Compose(ctx context.Context, cp resource.Composite, cd resource.Composed, t v1alpha1.ComposedTemplate) (composedctrl.Observation, error)
}

A Composer composes infrastructure resources.

type Configurator

type Configurator interface {
	Configure(ctx context.Context, cr resource.Composite, cp *v1alpha1.Composition) error
}

A Configurator configures a composite resource using its composition.

type ConnectionPublisher

type ConnectionPublisher interface {
	// PublishConnection details for the supplied resource. Publishing
	// must be additive; i.e. if details (a, b, c) are published, subsequently
	// publishing details (b, c, d) should update (b, c) but not remove a.
	PublishConnection(ctx context.Context, o resource.ConnectionSecretOwner, c managed.ConnectionDetails) error

	// UnpublishConnection details for the supplied resource.
	UnpublishConnection(ctx context.Context, o resource.ConnectionSecretOwner, c managed.ConnectionDetails) error
}

A ConnectionPublisher manages the supplied ConnectionDetails for the supplied resource. Publishers must handle the case in which the supplied ConnectionDetails are empty.

type ConnectionSecretFilterer

type ConnectionSecretFilterer interface {
	GetConnectionSecretKeys() []string
}

ConnectionSecretFilterer returns a set of allowed keys.

type Reconciler

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

A Reconciler reconciles composite infrastructure resources.

func NewReconciler

func NewReconciler(mgr manager.Manager, of resource.CompositeKind, opts ...ReconcilerOption) *Reconciler

NewReconciler returns a new Reconciler of composite infrastructure resources.

func (*Reconciler) Reconcile

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

Reconcile a composite infrastructure resource.

type ReconcilerOption

type ReconcilerOption func(*Reconciler)

ReconcilerOption is used to configure the Reconciler.

func WithComposer

func WithComposer(rc Composer) ReconcilerOption

WithComposer specifies how the Reconciler should compose resources.

func WithConfigurator

func WithConfigurator(c Configurator) ReconcilerOption

WithConfigurator specifies how the Reconciler should configure composite resources using their composition

func WithConnectionPublisher

func WithConnectionPublisher(p ConnectionPublisher) ReconcilerOption

WithConnectionPublisher specifies how the Reconciler should publish connection secrets.

func WithLogger

func WithLogger(log logging.Logger) ReconcilerOption

WithLogger specifies how the Reconciler should log messages.

func WithRecorder

func WithRecorder(er event.Recorder) ReconcilerOption

WithRecorder specifies how the Reconciler should record Kubernetes events.

func WithSelectorResolver

func WithSelectorResolver(p SelectorResolver) ReconcilerOption

WithSelectorResolver specifies how the Reconciler should publish connection secrets.

type SelectorResolver

type SelectorResolver interface {
	ResolveSelector(ctx context.Context, cr resource.Composite) error
}

SelectorResolver selects the composition reference with the information given as selector.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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