resources

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: Apache-2.0 Imports: 15 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Owns []schema.GroupVersionKind
}

type Resources

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

func New

func New(c client.Client, cfg Config) *Resources

func (*Resources) APIApply

func (r *Resources) APIApply(ctx context.Context, cr client.Object) error

APIApply step 0: get existing resources step 1: remove the exisiting resources from the internal resource list that overlap with the new resources step 2: delete the exisiting resources that are no longer needed step 3: apply the new resources to the api server

func (*Resources) APIDelete

func (r *Resources) APIDelete(ctx context.Context, cr client.Object) error

APIDelete is used to delete the existing resources that are owned by this cr the implementation retrieves the existing resources and deletes them

func (*Resources) AddNewResource

func (r *Resources) AddNewResource(ctx context.Context, cr, o client.Object)

AddNewResource adds a new resource to the inventoru

func (*Resources) GetNewResources

func (r *Resources) GetNewResources() map[corev1.ObjectReference]client.Object

Jump to

Keyboard shortcuts

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