Documentation ¶
Overview ¶
Package overrider defines common utils for working with override.
Index ¶
- func FetchAllMatchingOverridesForResourceSnapshot(ctx context.Context, c client.Client, manager informer.Manager, crp string, ...) ([]*placementv1alpha1.ClusterResourceOverrideSnapshot, ...)
- func IsClusterMatched(cluster *clusterv1beta1.MemberCluster, rule placementv1alpha1.OverrideRule) (bool, error)
- func PickFromResourceMatchedOverridesForTargetCluster(ctx context.Context, c client.Client, targetCluster string, ...) ([]string, []placementv1beta1.NamespacedName, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchAllMatchingOverridesForResourceSnapshot ¶ added in v0.12.0
func FetchAllMatchingOverridesForResourceSnapshot( ctx context.Context, c client.Client, manager informer.Manager, crp string, masterResourceSnapshot *placementv1beta1.ClusterResourceSnapshot, ) ([]*placementv1alpha1.ClusterResourceOverrideSnapshot, []*placementv1alpha1.ResourceOverrideSnapshot, error)
FetchAllMatchingOverridesForResourceSnapshot fetches all the matching overrides which are attached to the selected resources. TODO: to improve the performance, we can add the index on the placement field of the override snapshots.
func IsClusterMatched ¶
func IsClusterMatched(cluster *clusterv1beta1.MemberCluster, rule placementv1alpha1.OverrideRule) (bool, error)
IsClusterMatched checks if the cluster is matched with the override rules.
func PickFromResourceMatchedOverridesForTargetCluster ¶ added in v0.12.0
func PickFromResourceMatchedOverridesForTargetCluster( ctx context.Context, c client.Client, targetCluster string, croList []*placementv1alpha1.ClusterResourceOverrideSnapshot, roList []*placementv1alpha1.ResourceOverrideSnapshot, ) ([]string, []placementv1beta1.NamespacedName, error)
PickFromResourceMatchedOverridesForTargetCluster filter the overrides that are matched with resources to the target cluster.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.