aso

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ReconcilePolicyAnnotation is the annotation key for ASO's reconcile policy mechanism.
	ReconcilePolicyAnnotation = "serviceoperator.azure.com/reconcile-policy"
	// ReconcilePolicySkip indicates changes will not be PUT or DELETEd in Azure from ASO.
	ReconcilePolicySkip = "skip"
	// ReconcilePolicyManage indicates changes will be PUT and DELETEd in Azure from ASO.
	ReconcilePolicyManage = "manage"
)

Variables

This section is empty.

Functions

func IsManaged

func IsManaged(ctx context.Context, ctrlClient client.Client, spec azure.ASOResourceSpecGetter, 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 interface {
	CreateOrUpdateResource(ctx context.Context, spec azure.ASOResourceSpecGetter, serviceName string) (result genruntime.MetaObject, err error)
	DeleteResource(ctx context.Context, spec azure.ASOResourceSpecGetter, serviceName string) (err error)
}

Reconciler is a generic interface used to perform reconciliation of Azure resources backed by ASO.

type Service

type Service struct {
	client.Client
	// contains filtered or unexported fields
}

Service is an implementation of the Reconciler interface. It handles creation and deletion of resources using ASO.

func New

func New(ctrlClient client.Client, clusterName string) *Service

New creates a new ASO service.

func (*Service) CreateOrUpdateResource

func (s *Service) CreateOrUpdateResource(ctx context.Context, spec azure.ASOResourceSpecGetter, serviceName string) (result genruntime.MetaObject, err error)

CreateOrUpdateResource implements the logic for creating a new or updating an existing resource with ASO.

func (*Service) DeleteResource

func (s *Service) DeleteResource(ctx context.Context, spec azure.ASOResourceSpecGetter, serviceName string) (err error)

DeleteResource implements the logic for deleting a resource Asynchronously.

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