Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Name is the name of the plugin used in the plugin registry and configurations.
Name = "APIInstalled"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIInstalled ¶
type APIInstalled struct{}
APIInstalled is a plugin that checks if the API(CRD) of the resource is installed in the target cluster.
func (*APIInstalled) Filter ¶
func (p *APIInstalled) Filter(ctx context.Context, placement *policyv1alpha1.Placement, resource *workv1alpha2.ObjectReference, cluster *clusterv1alpha1.Cluster) *framework.Result
Filter checks if the API(CRD) of the resource is installed in the target cluster.
func (*APIInstalled) Score ¶
func (p *APIInstalled) Score(ctx context.Context, placement *policyv1alpha1.Placement, cluster *clusterv1alpha1.Cluster) (float64, *framework.Result)
Score calculates the score on the candidate cluster.
Click to show internal directories.
Click to hide internal directories.