Documentation ¶
Index ¶
- func ControllerName(name string) string
- type APIConfigurator
- type APIFilteredSecretPublisher
- type APISelectorResolver
- type Composer
- type Configurator
- type ConnectionPublisher
- type ConnectionSecretFilterer
- type Reconciler
- type ReconcilerOption
- func WithComposer(rc Composer) ReconcilerOption
- func WithConfigurator(c Configurator) ReconcilerOption
- func WithConnectionPublisher(p ConnectionPublisher) ReconcilerOption
- func WithLogger(log logging.Logger) ReconcilerOption
- func WithRecorder(er event.Recorder) ReconcilerOption
- func WithSelectorResolver(p SelectorResolver) ReconcilerOption
- type SelectorResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ControllerName ¶
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 ¶
func (c *APIConfigurator) Configure(ctx context.Context, cp resource.Composite, comp *v1alpha1.Composition) error
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 ¶
func (a *APIFilteredSecretPublisher) PublishConnection(ctx context.Context, o resource.ConnectionSecretOwner, c managed.ConnectionDetails) error
PublishConnection publishes the supplied ConnectionDetails to the Secret referenced in the resource.
func (*APIFilteredSecretPublisher) UnpublishConnection ¶
func (a *APIFilteredSecretPublisher) UnpublishConnection(_ context.Context, _ resource.ConnectionSecretOwner, _ managed.ConnectionDetails) error
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 ¶
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.
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.