Documentation ¶
Index ¶
- Constants
- Variables
- func AddResourceTrackerCacheIndex(cache cache.Cache) error
- func CreateComponentRevisionResourceTracker(ctx context.Context, cli client.Client, app *v1beta1.Application) (*v1beta1.ResourceTracker, error)
- func CreateCurrentResourceTracker(ctx context.Context, cli client.Client, app *v1beta1.Application) (*v1beta1.ResourceTracker, error)
- func CreateRootResourceTracker(ctx context.Context, cli client.Client, app *v1beta1.Application) (*v1beta1.ResourceTracker, error)
- func DeletedManifestInResourceTracker(ctx context.Context, cli client.Client, rt *v1beta1.ResourceTracker, ...) error
- func ExtendResourceTrackerListOption(list client.ObjectList, opts []client.ListOption) []client.ListOption
- func ListApplicationResourceTrackers(ctx context.Context, cli client.Client, app *v1beta1.Application) (rootRT *v1beta1.ResourceTracker, currentRT *v1beta1.ResourceTracker, ...)
- func RecordManifestsInResourceTracker(ctx context.Context, cli client.Client, rt *v1beta1.ResourceTracker, ...) error
- func SortResourceTrackersByVersion(rts []*v1beta1.ResourceTracker, descending bool) []*v1beta1.ResourceTracker
Constants ¶
const (
// Finalizer for resourcetracker to clean up recorded resources
Finalizer = "resourcetracker.core.oam.dev/finalizer"
)
Variables ¶
var ( // OptimizeListOp optimize ResourceTracker List Op by adding index OptimizeListOp = true )
Functions ¶
func AddResourceTrackerCacheIndex ¶
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.