Documentation ¶
Index ¶
- func IsManaged[T genruntime.MetaObject](ctx context.Context, ctrlClient client.Client, resource T, owner client.Object) (bool, error)
- func PatchedParameters[T genruntime.MetaObject](ctx context.Context, scheme *runtime.Scheme, ...) (T, error)
- type Patcher
- type Reconciler
- type Scope
- type Service
- type TagsGetterSetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsManaged ¶
func IsManaged[T genruntime.MetaObject](ctx context.Context, ctrlClient client.Client, resource T, owner client.Object) (bool, error)
IsManaged returns whether the ASO resource referred to by spec was created by CAPZ and therefore whether CAPZ should manage its lifecycle.
func PatchedParameters ¶ added in v1.14.0
func PatchedParameters[T genruntime.MetaObject](ctx context.Context, scheme *runtime.Scheme, spec azure.ASOResourceSpecGetter[T], existing T) (T, error)
PatchedParameters returns the Parameters of spec with patches applied.
Types ¶
type Patcher ¶ added in v1.14.0
type Patcher interface {
ExtraPatches() []string
}
Patcher supplies extra patches to be applied to an ASO resource.
type Reconciler ¶
type Reconciler[T genruntime.MetaObject] interface { CreateOrUpdateResource(ctx context.Context, spec azure.ASOResourceSpecGetter[T], serviceName string) (result T, err error) DeleteResource(ctx context.Context, resource T, serviceName string) (err error) PauseResource(ctx context.Context, resource T, serviceName string) (err error) }
Reconciler is a generic interface used to perform reconciliation of Azure resources backed by ASO.
func New ¶
func New[T genruntime.MetaObject](ctrlClient client.Client, clusterName string, owner client.Object) Reconciler[T]
New creates a new ASO reconciler.
type Scope ¶ added in v1.12.0
type Scope interface { azure.AsyncStatusUpdater GetClient() client.Client ClusterName() string ASOOwner() client.Object }
Scope represents the common functionality related to all scopes needed for ASO services.
type Service ¶
type Service[T genruntime.MetaObject, S Scope] struct { Reconciler[T] Scope S Specs []azure.ASOResourceSpecGetter[T] // ListFunc is used to enumerate ASO existent resources. Currently this interface is designed only to aid // discovery of ASO resources that no longer have a CAPZ reference, and can thus be deleted. This behavior // may be skipped for a service by leaving this field nil. ListFunc func(ctx context.Context, client client.Client, opts ...client.ListOption) (resources []T, err error) ConditionType clusterv1.ConditionType PostCreateOrUpdateResourceHook func(ctx context.Context, scope S, result T, err error) error PostReconcileHook func(ctx context.Context, scope S, err error) error PostDeleteHook func(ctx context.Context, scope S, err error) error // contains filtered or unexported fields }
Service provides operations on Azure resources.
func NewService ¶ added in v1.12.0
func NewService[T genruntime.MetaObject, S Scope](name string, scope S) *Service[T, S]
NewService creates a new Service.
type TagsGetterSetter ¶ added in v1.11.0
type TagsGetterSetter[T genruntime.MetaObject] interface { GetAdditionalTags() infrav1.Tags GetDesiredTags(resource T) infrav1.Tags SetTags(resource T, tags infrav1.Tags) }
TagsGetterSetter represents an object that supports tags.
Click to show internal directories.
Click to hide internal directories.