gc

package
v2.5.0 Latest Latest
Warning

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

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

Documentation

Overview

Package gc provides a way to perform gc operations against a tenant/workload/child cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSResource

type AWSResource struct {
	ARN  *arn.ARN
	Tags map[string]string
}

AWSResource represents a resource in AWS.

type ResourceCleanupFunc

type ResourceCleanupFunc func(ctx context.Context, resources []*AWSResource) error

ResourceCleanupFunc is a function type to cleaning up resources for a specific AWS service type.

type ResourceCleanupFuncs

type ResourceCleanupFuncs []ResourceCleanupFunc

ResourceCleanupFuncs is a collection of ResourceCleanupFunc.

func (ResourceCleanupFuncs) Execute

func (fn ResourceCleanupFuncs) Execute(ctx context.Context, resources []*AWSResource) error

Execute will execute all the defined clean up functions against the aws resources.

type ResourceCollectFunc added in v2.1.0

type ResourceCollectFunc func(ctx context.Context) ([]*AWSResource, error)

ResourceCollectFunc is a function type to collect resources for a specific AWS service type.

type ResourceCollectFuncs added in v2.1.0

type ResourceCollectFuncs []ResourceCollectFunc

ResourceCollectFuncs is a collection of ResourceCollectFunc.

func (ResourceCollectFuncs) Execute added in v2.1.0

func (fn ResourceCollectFuncs) Execute(ctx context.Context) ([]*AWSResource, error)

Execute will execute all the defined collect functions against the aws resources.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is used to perform operations against a tenant/workload/child cluster.

func NewService

func NewService(clusterScope cloud.ClusterScoper, opts ...ServiceOption) *Service

NewService creates a new Service.

func (*Service) ReconcileDelete

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

ReconcileDelete is responsible for determining if the infra cluster needs to be garbage collected. If does then it will perform garbage collection. For example, it will delete the ELB/NLBs that where created as a result of Services of type load balancer.

type ServiceOption

type ServiceOption func(*Service)

ServiceOption is an option for creating the service.

func WithGCStrategy added in v2.1.0

func WithGCStrategy(alternativeGCStrategy bool) ServiceOption

WithGCStrategy is an option for specifying using the alternative GC strategy.

Jump to

Keyboard shortcuts

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