Documentation
¶
Overview ¶
Package resource provides types and functions that can be used to build Kubernetes controllers that reconcile Crossplane resources.
Index ¶
- Constants
- func Apply(ctx context.Context, c client.Client, o runtime.Object, ao ...ApplyOption) errordeprecated
- func ConnectionSecretFor(o ConnectionSecretOwner, kind schema.GroupVersionKind) *corev1.Secret
- func GetExternalTags(mg Managed) map[string]string
- func GetKind(obj runtime.Object, ot runtime.ObjectTyper) (schema.GroupVersionKind, error)
- func Ignore(is ErrorIs, err error) error
- func IgnoreNotFound(err error) error
- func IsBindable(b Bindable) bool
- func IsBound(b Bindable) bool
- func IsConditionTrue(c v1alpha1.Condition) bool
- func LocalConnectionSecretFor(o LocalConnectionSecretOwner, kind schema.GroupVersionKind) *corev1.Secret
- func MustCreateObject(kind schema.GroupVersionKind, oc runtime.ObjectCreater) runtime.Object
- func MustGetKind(obj runtime.Object, ot runtime.ObjectTyper) schema.GroupVersionKind
- func NewPredicates(fn PredicateFn) predicate.Funcs
- func ResolveClassClaimValues(classValue, claimValue string) (string, error)
- func SetBindable(b Bindable)
- type APIConnectionPropagator
- type APIFinalizer
- type APIManagedConnectionPropagator
- type APIPatchingApplicator
- type APIUpdatingApplicator
- type Applicator
- type ApplyFn
- type ApplyOption
- type AttributeReferencer
- type Bindable
- type CanReference
- type Claim
- type ClaimKind
- type ClaimList
- type ClaimReferencer
- type Class
- type ClassKind
- type ClassList
- type ClassReferencer
- type ClassSelector
- type ClientApplicator
- type Composed
- type ComposedResourcesReferencer
- type Composite
- type CompositeKind
- type CompositeResourceReferencer
- type CompositionReferencer
- type CompositionSelector
- type Conditioned
- type ConnectionPropagator
- type ConnectionPropagatorFn
- type ConnectionSecretOwner
- type ConnectionSecretWriterTo
- type CredentialsSecretReferencer
- type EnqueueRequestForClaim
- func (e *EnqueueRequestForClaim) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForClaim) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForClaim) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForClaim) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
- type EnqueueRequestForPropagated
- func (e *EnqueueRequestForPropagated) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForPropagated) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForPropagated) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForPropagated) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
- type ErrorIs
- type Finalizer
- type FinalizerFns
- type LocalConnectionSecretOwner
- type LocalConnectionSecretWriterTo
- type Managed
- type ManagedConnectionPropagator
- type ManagedConnectionPropagatorFn
- type ManagedKind
- type ManagedList
- type ManagedResourceReferencer
- type Object
- type PredicateFn
- func AllOf(fn ...PredicateFn) PredicateFn
- func AnyOf(fn ...PredicateFn) PredicateFn
- func HasClassReferenceKind(k ClassKind) PredicateFn
- func HasClassSelector() PredicateFn
- func HasManagedResourceReferenceKind(k ManagedKind) PredicateFn
- func HasNoClassReference() PredicateFn
- func HasNoClassSelector() PredicateFn
- func HasNoManagedResourceReference() PredicateFn
- func IsControlledByKind(k schema.GroupVersionKind) PredicateFn
- func IsManagedKind(k ManagedKind, ot runtime.ObjectTyper) PredicateFn
- func IsPropagated() PredicateFn
- func IsPropagator() PredicateFn
- type Provider
- type ProviderReferencer
- type Reclaimer
- type ReferenceStatus
- type ReferenceStatusType
- type Requirement
- type RequirementKind
- type RequirementReferencer
- type Target
- type TargetKind
Constants ¶
const ( ExternalResourceTagKeyKind = "crossplane-kind" ExternalResourceTagKeyName = "crossplane-name" ExternalResourceTagKeyClass = "crossplane-class" ExternalResourceTagKeyProvider = "crossplane-provider" )
External resources are tagged/labelled with the following keys in the cloud provider API if the type supports.
const SecretTypeConnection corev1.SecretType = "connection.crossplane.io/v1alpha1"
SecretTypeConnection is the type of Crossplane connection secrets.
Variables ¶
This section is empty.
Functions ¶
func ConnectionSecretFor ¶
func ConnectionSecretFor(o ConnectionSecretOwner, kind schema.GroupVersionKind) *corev1.Secret
ConnectionSecretFor creates a connection for the supplied ConnectionSecretOwner, assumed to be of the supplied kind. The secret is written to 'default' namespace if the ConnectionSecretOwner does not specify a namespace.
func GetExternalTags ¶
GetExternalTags returns the identifying tags to be used to tag the external resource in provider API.
func GetKind ¶
func GetKind(obj runtime.Object, ot runtime.ObjectTyper) (schema.GroupVersionKind, error)
GetKind returns the GroupVersionKind of the supplied object. It return an error if the object is unknown to the supplied ObjectTyper, the object is unversioned, or the object does not have exactly one registered kind.
func Ignore ¶
Ignore any errors that satisfy the supplied ErrorIs function by returning nil. Errors that do not satisfy the suppled function are returned unmodified.
func IgnoreNotFound ¶
IgnoreNotFound returns the supplied error, or nil if the error indicates a Kubernetes resource was not found.
func IsBindable ¶
IsBindable returns true if the supplied Bindable is ready for binding to another Bindable, such as a resource claim or managed
func IsBound ¶
IsBound returns true if the supplied Bindable is bound to another Bindable, such as a resource claim or managed
func IsConditionTrue ¶
IsConditionTrue returns if condition status is true
func LocalConnectionSecretFor ¶
func LocalConnectionSecretFor(o LocalConnectionSecretOwner, kind schema.GroupVersionKind) *corev1.Secret
LocalConnectionSecretFor creates a connection secret in the namespace of the supplied LocalConnectionSecretOwner, assumed to be of the supplied kind.
func MustCreateObject ¶
func MustCreateObject(kind schema.GroupVersionKind, oc runtime.ObjectCreater) runtime.Object
MustCreateObject returns a new Object of the supplied kind. It panics if the kind is unknown to the supplied ObjectCreator.
func MustGetKind ¶
func MustGetKind(obj runtime.Object, ot runtime.ObjectTyper) schema.GroupVersionKind
MustGetKind returns the GroupVersionKind of the supplied object. It panics if the object is unknown to the supplied ObjectTyper, the object is unversioned, or the object does not have exactly one registered kind.
func NewPredicates ¶
func NewPredicates(fn PredicateFn) predicate.Funcs
NewPredicates returns a set of Funcs that are all satisfied by the supplied PredicateFn. The PredicateFn is run against the new object during updates.
func ResolveClassClaimValues ¶
ResolveClassClaimValues validates the supplied claim value against the supplied resource class value. If both are non-zero they must match.
func SetBindable ¶
func SetBindable(b Bindable)
SetBindable indicates that the supplied Bindable is ready for binding to another Bindable, such as a resource claim or managed resource by setting its binding phase to "Unbound". It is a no-op for Bindables in phases "Bound" or "Released", because these phases may not transition back to "Unbound".
Types ¶
type APIConnectionPropagator ¶ added in v0.8.0
type APIConnectionPropagator struct {
// contains filtered or unexported fields
}
An APIConnectionPropagator propagates connection details by reading them from and writing them to a Kubernetes API server.
func NewAPIConnectionPropagator ¶ added in v0.8.0
func NewAPIConnectionPropagator(c client.Client, t runtime.ObjectTyper) *APIConnectionPropagator
NewAPIConnectionPropagator returns a new APIConnectionPropagator.
func (*APIConnectionPropagator) PropagateConnection ¶ added in v0.8.0
func (a *APIConnectionPropagator) PropagateConnection(ctx context.Context, to LocalConnectionSecretOwner, from ConnectionSecretOwner) error
PropagateConnection details from the supplied resource.
type APIFinalizer ¶ added in v0.8.0
type APIFinalizer struct {
// contains filtered or unexported fields
}
An APIFinalizer adds and removes finalizers to and from a resource.
func NewAPIFinalizer ¶ added in v0.8.0
func NewAPIFinalizer(c client.Client, finalizer string) *APIFinalizer
NewAPIFinalizer returns a new APIFinalizer.
func (*APIFinalizer) AddFinalizer ¶ added in v0.8.0
func (a *APIFinalizer) AddFinalizer(ctx context.Context, obj Object) error
AddFinalizer to the supplied Managed resource.
func (*APIFinalizer) RemoveFinalizer ¶ added in v0.8.0
func (a *APIFinalizer) RemoveFinalizer(ctx context.Context, obj Object) error
RemoveFinalizer from the supplied Managed resource.
type APIManagedConnectionPropagator ¶
type APIManagedConnectionPropagator struct {
Propagator ConnectionPropagator
}
An APIManagedConnectionPropagator propagates connection details by reading them from and writing them to a Kubernetes API server.
func NewAPIManagedConnectionPropagator
deprecated
func NewAPIManagedConnectionPropagator(c client.Client, t runtime.ObjectTyper) *APIManagedConnectionPropagator
NewAPIManagedConnectionPropagator returns a new APIConnectionPropagator.
Deprecated: Use NewAPIConnectionPropagator.
func (*APIManagedConnectionPropagator) PropagateConnection ¶
func (a *APIManagedConnectionPropagator) PropagateConnection(ctx context.Context, to LocalConnectionSecretOwner, mg Managed) error
PropagateConnection details from the supplied resource.
type APIPatchingApplicator ¶ added in v0.7.0
type APIPatchingApplicator struct {
// contains filtered or unexported fields
}
An APIPatchingApplicator applies changes to an object by either creating or patching it in a Kubernetes API server.
func NewAPIPatchingApplicator ¶ added in v0.7.0
func NewAPIPatchingApplicator(c client.Client) *APIPatchingApplicator
NewAPIPatchingApplicator returns an Applicator that applies changes to an object by either creating or patching it in a Kubernetes API server.
func (*APIPatchingApplicator) Apply ¶ added in v0.7.0
func (a *APIPatchingApplicator) Apply(ctx context.Context, o runtime.Object, ao ...ApplyOption) error
Apply changes to the supplied object. The object will be created if it does not exist, or patched if it does.
type APIUpdatingApplicator ¶ added in v0.7.0
type APIUpdatingApplicator struct {
// contains filtered or unexported fields
}
An APIUpdatingApplicator applies changes to an object by either creating or updating it in a Kubernetes API server.
func NewAPIUpdatingApplicator ¶ added in v0.7.0
func NewAPIUpdatingApplicator(c client.Client) *APIUpdatingApplicator
NewAPIUpdatingApplicator returns an Applicator that applies changes to an object by either creating or updating it in a Kubernetes API server.
func (*APIUpdatingApplicator) Apply ¶ added in v0.7.0
func (a *APIUpdatingApplicator) Apply(ctx context.Context, o runtime.Object, ao ...ApplyOption) error
Apply changes to the supplied object. The object will be created if it does not exist, or updated if it does.
type Applicator ¶
An Applicator applies changes to an object.
type ApplyOption ¶
An ApplyOption is called before patching the current object to match the desired object. ApplyOptions are not called if no current object exists.
func ConnectionSecretMustBeControllableBy ¶ added in v0.7.0
func ConnectionSecretMustBeControllableBy(u types.UID) ApplyOption
ConnectionSecretMustBeControllableBy requires that the current object is a connection secret that is controllable by an object with the supplied UID. Contemporary connection secrets are of SecretTypeConnection, while legacy connection secrets are of corev1.SecretTypeOpaque. Contemporary connection secrets are considered controllable if they are already controlled by the supplied UID, or have no controller reference. Legacy connection secrets are only considered controllable if they are already controlled by the supplied UID. It is not safe to assume legacy connection secrets without a controller reference are controllable because they are indistinguishable from Kubernetes secrets that have nothing to do with Crossplane.
func ControllersMustMatch
deprecated
func ControllersMustMatch() ApplyOption
ControllersMustMatch requires the current object to have a controller reference, and for that controller reference to match the controller reference of the desired object.
Deprecated: Use ControllableBy.
func MustBeControllableBy ¶ added in v0.7.0
func MustBeControllableBy(u types.UID) ApplyOption
MustBeControllableBy requires that the current object is controllable by an object with the supplied UID. An object is controllable if its controller reference matches the supplied UID, or it has no controller reference.
type AttributeReferencer ¶
type AttributeReferencer interface { // GetStatus retries the referenced resource, as well as other non-managed // resources (like a `Provider`) and reports their readiness for use as a // referenced resource. GetStatus(ctx context.Context, res CanReference, r client.Reader) ([]ReferenceStatus, error) // Build retrieves the referenced resource, as well as other non-managed // resources (like a `Provider`), and builds the referenced attribute, // returning it as a string value. Build(ctx context.Context, res CanReference, r client.Reader) (value string, err error) // Assign accepts a managed resource object, and assigns the given value to // its corresponding property. Assign(res CanReference, value string) error }
An AttributeReferencer resolves cross-resource attribute references. See https://github.com/crossplane/crossplane/blob/master/design/one-pager-cross-resource-referencing.md for more information
type Bindable ¶
type Bindable interface { SetBindingPhase(p v1alpha1.BindingPhase) GetBindingPhase() v1alpha1.BindingPhase }
A Bindable resource may be bound to another resource. Resources are bindable when they available for use.
type CanReference ¶
A CanReference is a resource that can reference another resource in its spec in order to automatically resolve corresponding spec field values by inspecting the referenced resource.
type Claim ¶
type Claim interface { Object ClassSelector ClassReferencer ManagedResourceReferencer LocalConnectionSecretWriterTo Conditioned Bindable }
A Claim is a Kubernetes object representing an abstract resource claim (e.g. an SQL database) that may be bound to a concrete managed resource (e.g. a CloudSQL instance).
type ClaimKind ¶
type ClaimKind schema.GroupVersionKind
A ClaimKind contains the type metadata for a kind of resource claim.
type ClaimList ¶ added in v0.8.0
type ClaimList interface { runtime.Object // GetItems returns the list of resource claims. GetItems() []Claim }
A ClaimList is a list of resource claims.
type ClaimReferencer ¶
type ClaimReferencer interface { SetClaimReference(r *corev1.ObjectReference) GetClaimReference() *corev1.ObjectReference }
A ClaimReferencer may reference a resource claim.
type Class ¶
A Class is a Kubernetes object representing configuration specifications for a managed resource.
type ClassKind ¶
type ClassKind schema.GroupVersionKind
A ClassKind contains the type metadata for a kind of resource class.
func (ClassKind) List ¶
func (k ClassKind) List() schema.GroupVersionKind
List returns the list kind associated with a ClassKind.
type ClassList ¶ added in v0.8.0
type ClassList interface { runtime.Object // GetItems returns the list of resource classes. GetItems() []Class }
A ClassList is a list of resource classes.
type ClassReferencer ¶
type ClassReferencer interface { SetClassReference(r *corev1.ObjectReference) GetClassReference() *corev1.ObjectReference }
A ClassReferencer may reference a resource class.
type ClassSelector ¶
type ClassSelector interface { SetClassSelector(s *metav1.LabelSelector) GetClassSelector() *metav1.LabelSelector }
A ClassSelector may reference a resource class.
type ClientApplicator ¶ added in v0.7.0
type ClientApplicator struct { client.Client Applicator }
A ClientApplicator may be used to build a single 'client' that satisfies both client.Client and Applicator.
type Composed ¶ added in v0.8.0
type Composed interface { Object Conditioned ConnectionSecretWriterTo }
Composed resources can be a composed into a Composite resource.
type ComposedResourcesReferencer ¶ added in v0.8.0
type ComposedResourcesReferencer interface { SetResourceReferences([]corev1.ObjectReference) GetResourceReferences() []corev1.ObjectReference }
A ComposedResourcesReferencer may reference the resources it composes.
type Composite ¶ added in v0.8.0
type Composite interface { Object CompositionSelector CompositionReferencer ComposedResourcesReferencer RequirementReferencer Reclaimer ConnectionSecretWriterTo Conditioned }
A Composite resource composes one or more Composed resources.
type CompositeKind ¶ added in v0.8.0
type CompositeKind schema.GroupVersionKind
A CompositeKind contains the type metadata for a kind of composite resource.
type CompositeResourceReferencer ¶ added in v0.8.0
type CompositeResourceReferencer interface { SetResourceReference(r *corev1.ObjectReference) GetResourceReference() *corev1.ObjectReference }
A CompositeResourceReferencer can reference a composite resource.
type CompositionReferencer ¶ added in v0.8.0
type CompositionReferencer interface { SetCompositionReference(*corev1.ObjectReference) GetCompositionReference() *corev1.ObjectReference }
A CompositionReferencer may reference a composition of resources.
type CompositionSelector ¶ added in v0.8.0
type CompositionSelector interface { SetCompositionSelector(*metav1.LabelSelector) GetCompositionSelector() *metav1.LabelSelector }
A CompositionSelector may select a composition of resources.
type Conditioned ¶
type Conditioned interface { SetConditions(c ...v1alpha1.Condition) GetCondition(v1alpha1.ConditionType) v1alpha1.Condition }
A Conditioned may have conditions set or retrieved. Conditions are typically indicate the status of both a resource and its reconciliation process.
type ConnectionPropagator ¶ added in v0.8.0
type ConnectionPropagator interface {
PropagateConnection(ctx context.Context, to LocalConnectionSecretOwner, from ConnectionSecretOwner) error
}
A ConnectionPropagator is responsible for propagating information required to connect to a resource.
type ConnectionPropagatorFn ¶ added in v0.8.0
type ConnectionPropagatorFn func(ctx context.Context, to LocalConnectionSecretOwner, from ConnectionSecretOwner) error
A ConnectionPropagatorFn is a function that satisfies the
ConnectionPropagator interface.
type ConnectionSecretOwner ¶
type ConnectionSecretOwner interface { runtime.Object metav1.Object ConnectionSecretWriterTo }
A ConnectionSecretOwner may create and manage a connection secret in an arbitrary namespace.
type ConnectionSecretWriterTo ¶
type ConnectionSecretWriterTo interface { SetWriteConnectionSecretToReference(r *v1alpha1.SecretReference) GetWriteConnectionSecretToReference() *v1alpha1.SecretReference }
A ConnectionSecretWriterTo may write a connection secret to an arbitrary namespace.
type CredentialsSecretReferencer ¶
type CredentialsSecretReferencer interface { GetCredentialsSecretReference() v1alpha1.SecretKeySelector SetCredentialsSecretReference(r v1alpha1.SecretKeySelector) }
A CredentialsSecretReferencer may refer to a credential secret in an arbitrary namespace.
type EnqueueRequestForClaim ¶
type EnqueueRequestForClaim struct{}
EnqueueRequestForClaim enqueues a reconcile.Request for the NamespacedName of a ClaimReferencer's ClaimReference.
func (*EnqueueRequestForClaim) Create ¶
func (e *EnqueueRequestForClaim) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
Create adds a NamespacedName for the supplied CreateEvent if its Object is a ClaimReferencer.
func (*EnqueueRequestForClaim) Delete ¶
func (e *EnqueueRequestForClaim) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
Delete adds a NamespacedName for the supplied DeleteEvent if its Object is a ClaimReferencer.
func (*EnqueueRequestForClaim) Generic ¶
func (e *EnqueueRequestForClaim) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
Generic adds a NamespacedName for the supplied GenericEvent if its Object is a ClaimReferencer.
func (*EnqueueRequestForClaim) Update ¶
func (e *EnqueueRequestForClaim) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
Update adds a NamespacedName for the supplied UpdateEvent if its Objects are ClaimReferencers.
type EnqueueRequestForPropagated ¶
type EnqueueRequestForPropagated struct{}
EnqueueRequestForPropagated enqueues a reconcile.Request for the NamespacedName of a propagated object, i.e. an object with propagation metadata annotations.
func (*EnqueueRequestForPropagated) Create ¶
func (e *EnqueueRequestForPropagated) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
Create adds a NamespacedName for the supplied CreateEvent if its Object is propagated.
func (*EnqueueRequestForPropagated) Delete ¶
func (e *EnqueueRequestForPropagated) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
Delete adds a NamespacedName for the supplied DeleteEvent if its Object is propagated.
func (*EnqueueRequestForPropagated) Generic ¶
func (e *EnqueueRequestForPropagated) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
Generic adds a NamespacedName for the supplied GenericEvent if its Object is propagated.
func (*EnqueueRequestForPropagated) Update ¶
func (e *EnqueueRequestForPropagated) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
Update adds a NamespacedName for the supplied UpdateEvent if its Objects are propagated.
type Finalizer ¶ added in v0.8.0
type Finalizer interface { AddFinalizer(ctx context.Context, obj Object) error RemoveFinalizer(ctx context.Context, obj Object) error }
A Finalizer manages the finalizers on the resource.
type FinalizerFns ¶ added in v0.8.0
type FinalizerFns struct { AddFinalizerFn func(ctx context.Context, obj Object) error RemoveFinalizerFn func(ctx context.Context, obj Object) error }
A FinalizerFns satisfy the Finalizer interface.
func (FinalizerFns) AddFinalizer ¶ added in v0.8.0
func (f FinalizerFns) AddFinalizer(ctx context.Context, obj Object) error
AddFinalizer to the supplied resource.
func (FinalizerFns) RemoveFinalizer ¶ added in v0.8.0
func (f FinalizerFns) RemoveFinalizer(ctx context.Context, obj Object) error
RemoveFinalizer from the supplied resource.
type LocalConnectionSecretOwner ¶
type LocalConnectionSecretOwner interface { runtime.Object metav1.Object LocalConnectionSecretWriterTo }
A LocalConnectionSecretOwner may create and manage a connection secret in its own namespace.
type LocalConnectionSecretWriterTo ¶
type LocalConnectionSecretWriterTo interface { SetWriteConnectionSecretToReference(r *v1alpha1.LocalSecretReference) GetWriteConnectionSecretToReference() *v1alpha1.LocalSecretReference }
A LocalConnectionSecretWriterTo may write a connection secret to its own namespace.
type Managed ¶
type Managed interface { Object ClassReferencer ClaimReferencer ProviderReferencer ConnectionSecretWriterTo Reclaimer Conditioned Bindable }
A Managed is a Kubernetes object representing a concrete managed resource (e.g. a CloudSQL instance).
type ManagedConnectionPropagator ¶
type ManagedConnectionPropagator interface {
PropagateConnection(ctx context.Context, o LocalConnectionSecretOwner, mg Managed) error
}
A ManagedConnectionPropagator is responsible for propagating information required to connect to a managed resource (for example the connection secret) from the managed resource to its resource claim.
type ManagedConnectionPropagatorFn ¶
type ManagedConnectionPropagatorFn func(ctx context.Context, o LocalConnectionSecretOwner, mg Managed) error
A ManagedConnectionPropagatorFn is a function that satisfies the ManagedConnectionPropagator interface.
func (ManagedConnectionPropagatorFn) PropagateConnection ¶
func (fn ManagedConnectionPropagatorFn) PropagateConnection(ctx context.Context, o LocalConnectionSecretOwner, mg Managed) error
PropagateConnection information from the supplied managed resource to the supplied resource claim.
type ManagedKind ¶
type ManagedKind schema.GroupVersionKind
A ManagedKind contains the type metadata for a kind of managed resource.
type ManagedList ¶ added in v0.8.0
type ManagedList interface { runtime.Object // GetItems returns the list of managed resources. GetItems() []Managed }
A ManagedList is a list of managed resources.
type ManagedResourceReferencer ¶
type ManagedResourceReferencer interface { SetResourceReference(r *corev1.ObjectReference) GetResourceReference() *corev1.ObjectReference }
A ManagedResourceReferencer may reference a concrete managed resource.
type PredicateFn ¶
A PredicateFn returns true if the supplied object should be reconciled.
func AllOf ¶
func AllOf(fn ...PredicateFn) PredicateFn
AllOf accepts objects that pass all of the supplied predicate functions.
func AnyOf ¶
func AnyOf(fn ...PredicateFn) PredicateFn
AnyOf accepts objects that pass any of the supplied predicate functions.
func HasClassReferenceKind ¶
func HasClassReferenceKind(k ClassKind) PredicateFn
HasClassReferenceKind accepts objects that reference the supplied resource class kind.
func HasClassSelector ¶
func HasClassSelector() PredicateFn
HasClassSelector accepts resource claims that do not specify a resource class selector.
func HasManagedResourceReferenceKind ¶
func HasManagedResourceReferenceKind(k ManagedKind) PredicateFn
HasManagedResourceReferenceKind accepts objects that reference the supplied managed resource kind.
func HasNoClassReference ¶
func HasNoClassReference() PredicateFn
HasNoClassReference accepts resource claims that do not reference a specific resource class.
func HasNoClassSelector ¶
func HasNoClassSelector() PredicateFn
HasNoClassSelector accepts resource claims that do not specify a resource class selector.
func HasNoManagedResourceReference ¶
func HasNoManagedResourceReference() PredicateFn
HasNoManagedResourceReference accepts resource claims that do not reference a specific managed resource.
func IsControlledByKind ¶
func IsControlledByKind(k schema.GroupVersionKind) PredicateFn
IsControlledByKind accepts objects that are controlled by a resource of the supplied kind.
func IsManagedKind ¶
func IsManagedKind(k ManagedKind, ot runtime.ObjectTyper) PredicateFn
IsManagedKind accepts objects that are of the supplied managed resource kind.
func IsPropagated ¶
func IsPropagated() PredicateFn
IsPropagated accepts objects that consent to be partially or fully propagated from another object of the same kind.
func IsPropagator ¶
func IsPropagator() PredicateFn
IsPropagator accepts objects that request to be partially or fully propagated to another object of the same kind.
type Provider ¶
type Provider interface { Object CredentialsSecretReferencer }
A Provider is a Kubernetes object that refers to credentials to connect to an external system.
type ProviderReferencer ¶
type ProviderReferencer interface { GetProviderReference() *corev1.ObjectReference SetProviderReference(p *corev1.ObjectReference) }
A ProviderReferencer may reference a provider resource.
type Reclaimer ¶
type Reclaimer interface { SetReclaimPolicy(p v1alpha1.ReclaimPolicy) GetReclaimPolicy() v1alpha1.ReclaimPolicy }
A Reclaimer may specify a ReclaimPolicy.
type ReferenceStatus ¶
type ReferenceStatus struct { Name string Status ReferenceStatusType }
ReferenceStatus has the name and status of a reference
func (ReferenceStatus) String ¶
func (r ReferenceStatus) String() string
type ReferenceStatusType ¶
type ReferenceStatusType int
ReferenceStatusType is an enum type for the possible values for a Reference Status
const ( ReferenceStatusUnknown ReferenceStatusType = iota ReferenceNotFound ReferenceNotReady ReferenceReady )
Reference statuses.
func (ReferenceStatusType) String ¶
func (t ReferenceStatusType) String() string
type Requirement ¶ added in v0.8.0
type Requirement interface { Object CompositionSelector CompositionReferencer CompositeResourceReferencer LocalConnectionSecretWriterTo Conditioned }
A Requirement for a Composite resource.
type RequirementKind ¶ added in v0.8.0
type RequirementKind schema.GroupVersionKind
A RequirementKind contains the type metadata for a kind of requirement resource.
type RequirementReferencer ¶ added in v0.8.0
type RequirementReferencer interface { SetRequirementReference(r *corev1.ObjectReference) GetRequirementReference() *corev1.ObjectReference }
A RequirementReferencer can reference a requirement resource.
type Target ¶
type Target interface { Object LocalConnectionSecretWriterTo ManagedResourceReferencer Conditioned }
A Target is a Kubernetes object that refers to credentials to connect to a deployment target. Target is a subset of the Claim interface.
type TargetKind ¶
type TargetKind schema.GroupVersionKind
A TargetKind contains the type metadata for a kind of target resource.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package fake provides fake Crossplane resources for use in tests.
|
Package fake provides fake Crossplane resources for use in tests. |
Package unstructured contains utilities unstructured Kubernetes objects.
|
Package unstructured contains utilities unstructured Kubernetes objects. |
composed
Package composed contains an unstructured composed resource.
|
Package composed contains an unstructured composed resource. |
composite
Package composite contains an unstructured composite resource.
|
Package composite contains an unstructured composite resource. |
requirement
Package requirement contains an unstructured resource requirement.
|
Package requirement contains an unstructured resource requirement. |