aso

package
v1.13.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsManaged

func IsManaged[T genruntime.MetaObject](ctx context.Context, ctrlClient client.Client, spec azure.ASOResourceSpecGetter[T], clusterName string) (bool, error)

IsManaged returns whether the ASO resource referred to by spec was created by CAPZ and therefore whether CAPZ should manage its lifecycle.

Types

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, spec azure.ASOResourceSpecGetter[T], serviceName string) (err error)
	PauseResource(ctx context.Context, spec azure.ASOResourceSpecGetter[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 deepCopier[T]](ctrlClient client.Client, clusterName string) 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
}

Scope represents the common functionality related to all scopes needed for ASO services.

type Service

type Service[T deepCopier[T], S Scope] struct {
	Reconciler[T]

	Scope S
	Specs []azure.ASOResourceSpecGetter[T]

	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 deepCopier[T], S Scope](name string, scope S) *Service[T, S]

NewService creates a new Service.

func (*Service[T, S]) Delete added in v1.12.0

func (s *Service[T, S]) Delete(ctx context.Context) error

Delete deletes the resources.

func (*Service[T, S]) Name added in v1.12.0

func (s *Service[T, S]) Name() string

Name returns the service name.

func (*Service[T, S]) Pause added in v1.12.0

func (s *Service[T, S]) Pause(ctx context.Context) error

Pause implements azure.Pauser.

func (*Service[T, S]) Reconcile added in v1.12.0

func (s *Service[T, S]) Reconcile(ctx context.Context) error

Reconcile idempotently creates or updates the resources.

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.

Directories

Path Synopsis
Package mock_aso is a generated GoMock package.
Package mock_aso is a generated GoMock package.

Jump to

Keyboard shortcuts

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