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
- type ResourceDetailRetriever
- type ResourceTreePrintOptions
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 ¶ added in v1.2.3
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 ¶
type ResourceDetailRetriever ¶ added in v1.3.1
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.ClusterMapper // 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