resourcetracker

package
v0.0.0-...-2c539bb Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Finalizer for resourcetracker to clean up recorded resources
	Finalizer = "resourcetracker.core.oam.dev/finalizer"
)

Variables

View Source
var (
	// OptimizeListOp optimize ResourceTracker List Op by adding index
	OptimizeListOp = true
)

Functions

func AddResourceTrackerCacheIndex

func AddResourceTrackerCacheIndex(cache cache.Cache) error

AddResourceTrackerCacheIndex add indexing configuration for cache

func CreateComponentRevisionResourceTracker

func CreateComponentRevisionResourceTracker(ctx context.Context, cli client.Client, app *v1beta1.Application) (*v1beta1.ResourceTracker, error)

CreateComponentRevisionResourceTracker create resourcetracker to record all component revision for application

func CreateCurrentResourceTracker

func CreateCurrentResourceTracker(ctx context.Context, cli client.Client, app *v1beta1.Application) (*v1beta1.ResourceTracker, error)

CreateCurrentResourceTracker create versioned resourcetracker for the latest generation of application

func CreateRootResourceTracker

func CreateRootResourceTracker(ctx context.Context, cli client.Client, app *v1beta1.Application) (*v1beta1.ResourceTracker, error)

CreateRootResourceTracker create root resourcetracker for application

func DeletedManifestInResourceTracker

func DeletedManifestInResourceTracker(ctx context.Context, cli client.Client, rt *v1beta1.ResourceTracker, manifest *unstructured.Unstructured, remove bool) error

DeletedManifestInResourceTracker marks resources as deleted in resourcetracker, if remove is true, resources will be removed from resourcetracker

func ExtendResourceTrackerListOption

func ExtendResourceTrackerListOption(list client.ObjectList, opts []client.ListOption) []client.ListOption

ExtendResourceTrackerListOption wraps list rt options by adding indexing fields

func ListApplicationResourceTrackers

func ListApplicationResourceTrackers(ctx context.Context, cli client.Client, app *v1beta1.Application) (rootRT *v1beta1.ResourceTracker, currentRT *v1beta1.ResourceTracker, historyRTs []*v1beta1.ResourceTracker, crRT *v1beta1.ResourceTracker, err error)

ListApplicationResourceTrackers list resource trackers for application with all historyRTs sorted by version number

func RecordManifestsInResourceTracker

func RecordManifestsInResourceTracker(ctx context.Context, cli client.Client, rt *v1beta1.ResourceTracker, manifests []*unstructured.Unstructured, metaOnly bool) error

RecordManifestsInResourceTracker records resources in ResourceTracker

func SortResourceTrackersByVersion

func SortResourceTrackersByVersion(rts []*v1beta1.ResourceTracker, descending bool) []*v1beta1.ResourceTracker

SortResourceTrackersByVersion sort resourceTrackers by version

Types

This section is empty.

Jump to

Keyboard shortcuts

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