Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChartConsumer ¶
type ChartConsumer interface {
// ReleaseName returns the name of the Helm release of this resource. This
// name is shared between all Helm Charts.
ReleaseName() string
// Charts returns all the Helm Charts that the controller uses to reconcile
// the state of the associated resource.
//
// The provider infers the required Helm Charts from the underlying Custom
// Resource and tries to locate and load them.
//
// It returns and error if it fails to identify, locate, or load any of the
// required Helm Charts.
Charts() (charts.Catalog, error)
}
ChartConsumer offers a mechanism to associate specific Helm Charts to an individual Custom Resource that consumes them to reconcile its state.
The provider is a Custom Resource wrapper that can identify the required Helm Charts based on the specification of the underlying resource. Each provider can have different capabilities which impact their ability to locate and load the required Helm Charts.
type CustomResourceWrapper ¶
type CustomResourceWrapper interface {
// Name is a convenient method that returns the fully qualified name of the
// underlying Custom Resource.
Name() types.NamespacedName
// Origin returns the reference to the underlying Custom Resource.
Origin() client.Object
}
CustomResourceWrapper is a general purpose wrapper for Custom Resources. It provides a semantic interface to interact with resource instances and guards the controllers against the structural changes to Custom Resource Definition while satisfying certain behaviors from Custom Resources.
A wrapper is immutable and does not update itself after initialization. Therefore, it must be created when the underlying resource changes, for example at the very beginning of the reconcile loop.
type ValueProvider ¶
type ValueProvider interface {
// Values returns a mapping of a Custom Resource specification.
//
// You should not make any assumption about how the mapping is done. An
// implementation may choose to do it eagerly or lazily. However, a mapping
// must be one-way, meaning that the changes that are applied to it must not
// propagate to the underlying resource.
//
// The provider does not watch the resource. It is the responsibility of the
// caller to notify the provider upon changes. The provider may be able to
// re-map the changed resources but it is not obligated to support it.
Values() support.Values
// Hash returns a unique hash for of the underlying Custom Resource.
//
// You should not make any assumption about when the hash calculated. An
// implementation may choose to do it eagerly or lazily. However it must
// guarantee that, after the completion of mapping, at any point in time
// it returns the same value that does not change per mapping.
Hash() string
}
ValueProvider offers a mechanism to adapt a Custom Resource and bind its specification to an arbitrary tree-like data structure. This structure can be consumed by any other component in the framework and in particular is useful for rendering templates, including Helm Charts.