Documentation
¶
Index ¶
Constants ¶
const (
PlacementLabel string = "cluster.open-cluster-management.io/placement"
)
The placementDecsion label name holding the placement name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterDecision ¶
type ClusterDecision struct { // ClusterName is the name of the ManagedCluster. If it is not empty, its value should be unique cross all // placement decisions for the Placement. ClusterName string `json:"clusterName"` // Reason represents the reason why the ManagedCluster is selected. Reason string `json:"reason"` }
ClusterDecision represents a decision from a placement An empty ClusterDecision indicates it is not scheduled yet.
type PlacementDecision ¶
type PlacementDecision struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Status represents the current status of the PlacementDecision Status PlacementDecisionStatus `json:"status,omitempty"` }
PlacementDecision indicates a decision from a placement PlacementDecision should has a label cluster.open-cluster-management.io/placement={placement name} to reference a certain placement.
If a placement has spec.numberOfClusters specified, the total number of decisions contained in status.decisions of PlacementDecisions should always be NumberOfClusters; otherwise, the total number of decisions should be the number of ManagedClusters which match the placement requirements.
Some of the decisions might be empty when there are no enough ManagedClusters meet the placement requirements.
func (*PlacementDecision) GetAnnotation ¶
func (p *PlacementDecision) GetAnnotation() map[string]string
func (*PlacementDecision) GetLabel ¶
func (p *PlacementDecision) GetLabel() map[string]string
func (*PlacementDecision) GetName ¶
func (p *PlacementDecision) GetName() string
func (*PlacementDecision) GetNamespace ¶
func (p *PlacementDecision) GetNamespace() string
type PlacementDecisionList ¶
type PlacementDecisionList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds metav1.ListMeta `json:"metadata,omitempty"` // Items is a list of PlacementDecision. Items []PlacementDecision `json:"items"` }
ClusterDecisionList is a collection of PlacementDecision.
type PlacementDecisionStatus ¶
type PlacementDecisionStatus struct { // Decisions is a slice of decisions according to a placement // The number of decisions should not be larger than 100 Decisions []ClusterDecision `json:"decisions"` }
PlacementDecisionStatus represents the current status of the PlacementDecision.