asogroups

package
v1.10.6 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "group"

ServiceName is the name of this service.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupScope

type GroupScope interface {
	azure.AsyncStatusUpdater
	ASOGroupSpec() azure.ASOResourceSpecGetter
	GetClient() client.Client
	ClusterName() string
}

GroupScope defines the scope interface for a group service.

type GroupSpec

type GroupSpec struct {
	Name           string
	Namespace      string
	Location       string
	ClusterName    string
	AdditionalTags infrav1.Tags
	Owner          metav1.OwnerReference
}

GroupSpec defines the specification for a Resource Group.

func (*GroupSpec) Parameters

func (s *GroupSpec) Parameters(ctx context.Context, object genruntime.MetaObject) (genruntime.MetaObject, error)

Parameters implements aso.ResourceSpecGetter.

func (*GroupSpec) ResourceRef

func (s *GroupSpec) ResourceRef() genruntime.MetaObject

ResourceRef implements aso.ResourceSpecGetter.

func (*GroupSpec) WasManaged

func (s *GroupSpec) WasManaged(object genruntime.MetaObject) bool

WasManaged implements azure.ASOResourceSpecGetter.

type Service

type Service struct {
	Scope GroupScope
	aso.Reconciler
}

Service provides operations on Azure resources.

func New

func New(scope GroupScope) *Service

New creates a new service.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context) error

Delete deletes the resource group if it is managed by capz.

func (*Service) IsManaged

func (s *Service) IsManaged(ctx context.Context) (bool, error)

IsManaged returns true if the ASO ResourceGroup was created by CAPZ, meaning that the resource group's lifecycle is managed.

func (*Service) Name

func (s *Service) Name() string

Name returns the service name.

func (*Service) Reconcile

func (s *Service) Reconcile(ctx context.Context) error

Reconcile idempotently creates or updates a resource group.

func (*Service) ShouldDeleteIndividualResources

func (s *Service) ShouldDeleteIndividualResources(ctx context.Context) bool

ShouldDeleteIndividualResources returns false if the resource group is managed and reconciled by ASO, meaning that we can rely on a single resource group delete operation as opposed to deleting every individual resource.

Directories

Path Synopsis
Run go generate to regenerate this mock.
Run go generate to regenerate this mock.

Jump to

Keyboard shortcuts

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