resourcetracker

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

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 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 rootRT -> The ResourceTracker that records life-long resources. These resources will only be recycled when application is removed. currentRT -> The ResourceTracker that tracks the resources used by the latest version of application. historyRTs -> The ResourceTrackers that tracks the resources in outdated versions. crRT -> The ResourceTracker that tracks the component revisions created by the application.

func RecordManifestsInResourceTracker added in v1.2.3

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

RecordManifestsInResourceTracker records resources in ResourceTracker

func SortResourceTrackersByVersion

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

SortResourceTrackersByVersion sort resourceTrackers by version

Types

type ResourceDetailRetriever added in v1.3.1

type ResourceDetailRetriever func(*resourceRow, string) error

ResourceDetailRetriever retriever to get details for resource

func RetrieveKubeCtlGetMessageGenerator added in v1.3.1

func RetrieveKubeCtlGetMessageGenerator(cfg *rest.Config) (ResourceDetailRetriever, error)

RetrieveKubeCtlGetMessageGenerator get details like kubectl get

type ResourceTreePrintOptions added in v1.3.1

type ResourceTreePrintOptions struct {
	DetailRetriever ResourceDetailRetriever
	multicluster.ClusterNameMapper
	// MaxWidth if set, the detail part will auto wrap
	MaxWidth *int
	// Format for details
	Format string
}

ResourceTreePrintOptions print options for resource tree

func (*ResourceTreePrintOptions) PrintResourceTree added in v1.3.1

func (options *ResourceTreePrintOptions) PrintResourceTree(writer io.Writer, currentPlacements []v1alpha1.PlacementDecision, currentRT *v1beta1.ResourceTracker, historyRT []*v1beta1.ResourceTracker)

PrintResourceTree print resource tree to writer

Jump to

Keyboard shortcuts

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