composed

package
v0.15.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelKeyNamePrefixForComposed = "crossplane.io/composite"
	LabelKeyClaimName             = "crossplane.io/claim-name"
	LabelKeyClaimNamespace        = "crossplane.io/claim-namespace"
)

Label keys.

Variables

This section is empty.

Functions

func IsReady added in v0.13.0

IsReady returns whether the composed resource is ready.

Types

type APIConnectionDetailsFetcher

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

APIConnectionDetailsFetcher fetches the connection secret of given composed resource if it has a connection secret reference.

func (*APIConnectionDetailsFetcher) Fetch

Fetch returns the connection secret details of composed resource.

type Composer

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

An Composer composes infrastructure resources in a Kubernetes API server.

func NewComposer

func NewComposer(kube client.Client, opts ...ComposerOption) *Composer

NewComposer returns a new Composer that composes infrastructure resources in a Kubernetes API server.

func (*Composer) Compose

Compose the supplied Composed resource into the supplied Composite resource using the supplied CompositeTemplate.

type ComposerOption

type ComposerOption func(*Composer)

ComposerOption configures the Composer object.

func WithClientApplicator

func WithClientApplicator(ca resource.ClientApplicator) ComposerOption

WithClientApplicator returns a ComposerOption that changes the ClientApplicator of Composer.

func WithConfigurator

func WithConfigurator(c Configurator) ComposerOption

WithConfigurator returns a ComposerOption that changes the Configurator of Composer.

func WithConnectionDetailFetcher

func WithConnectionDetailFetcher(cdf ConnectionDetailsFetcher) ComposerOption

WithConnectionDetailFetcher returns a ComposerOption that changes the ConnectionDetailsFetcher of Composer.

func WithOverlayApplicator

func WithOverlayApplicator(oa OverlayApplicator) ComposerOption

WithOverlayApplicator returns a ComposerOption that changes the OverlayApplicator of Composer.

type Configurator

type Configurator interface {
	Configure(cp resource.Composite, cd resource.Composed, t v1beta1.ComposedTemplate) error
}

Configurator is used to configure the Composed resource.

type ConfigureFn

type ConfigureFn func(cp resource.Composite, cd resource.Composed, t v1beta1.ComposedTemplate) error

ConfigureFn is a function that implements Configurator interface.

func (ConfigureFn) Configure

Configure calls ConfigureFn.

type ConnectionDetailsFetcher

type ConnectionDetailsFetcher interface {
	Fetch(ctx context.Context, cd resource.Composed, t v1beta1.ComposedTemplate) (managed.ConnectionDetails, error)
}

ConnectionDetailsFetcher fetches the connection details of the Composed resource.

type DefaultConfigurator

type DefaultConfigurator struct{}

DefaultConfigurator configures the composed resource with given raw template and metadata information from composite resource.

func (*DefaultConfigurator) Configure

Configure applies the raw template and sets name and generateName.

type DefaultOverlayApplicator

type DefaultOverlayApplicator struct{}

DefaultOverlayApplicator applies patches to the composed resource using the values on Composite resource and field bindings in ComposedTemplate.

func (*DefaultOverlayApplicator) Overlay

Overlay applies patches to composed resource.

type FetchFn

FetchFn is a function that implements the ConnectionDetailsFetcher interface.

func (FetchFn) Fetch

Fetch calls FetchFn.

type Observation

type Observation struct {
	Ref               corev1.ObjectReference
	ConnectionDetails managed.ConnectionDetails
	Ready             bool
}

Observation is the result of composed reconciliation.

type OverlayApplicator

type OverlayApplicator interface {
	Overlay(cp resource.Composite, cd resource.Composed, t v1beta1.ComposedTemplate) error
}

OverlayApplicator is used to apply an overlay at each reconcile.

type OverlayFn

OverlayFn is a function that implements OverlayApplicator interface.

func (OverlayFn) Overlay

Overlay calls OverlayFn.

type ReadinessCheckFn added in v0.13.0

type ReadinessCheckFn func(ctx context.Context, cd resource.Composed, t v1beta1.ComposedTemplate) (ready bool, err error)

A ReadinessCheckFn checks whether a composed resource is ready or not.

func (ReadinessCheckFn) IsReady added in v0.13.0

func (fn ReadinessCheckFn) IsReady(ctx context.Context, cd resource.Composed, t v1beta1.ComposedTemplate) (ready bool, err error)

IsReady reports whether a composed resource is ready or not.

type ReadinessChecker added in v0.13.0

type ReadinessChecker interface {
	IsReady(ctx context.Context, cd resource.Composed, t v1beta1.ComposedTemplate) (ready bool, err error)
}

A ReadinessChecker checks whether a composed resource is ready or not.

Jump to

Keyboard shortcuts

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