aso

package
v1.11.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

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.

func PauseResource added in v1.11.0

func PauseResource(ctx context.Context, ctrlClient client.Client, spec azure.ASOResourceSpecGetter, clusterName string, serviceName string) error

PauseResource pauses an ASO resource by updating its `reconcile-policy` to `skip`.

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.

type TagsGetterSetter added in v1.11.0

type TagsGetterSetter interface {
	GetAdditionalTags() infrav1.Tags
	GetDesiredTags(resource genruntime.MetaObject) (infrav1.Tags, error)
	GetActualTags(resource genruntime.MetaObject) (infrav1.Tags, error)
	SetTags(resource genruntime.MetaObject, tags infrav1.Tags) error
}

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