v1alpha1

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 47

Documentation

Overview

+kubebuilder:validation:Optional +groupName=cluster.open-cluster-management.io

Index

Constants

View Source
const (
	// ManagedClusterSetConditionEmpty means no ManagedCluster is included in the
	// ManagedClusterSet.
	ManagedClusterSetConditionEmpty string = "ClusterSetEmpty"
)
View Source
const (
	// PlacementConditionSatisfied means Placement requirements are satisfied.
	// A placement is not satisfied only if there is empty ClusterDecision in the status.decisions
	// of PlacementDecisions.
	PlacementConditionSatisfied string = "PlacementSatisfied"
)
View Source
const (
	PlacementLabel string = "cluster.open-cluster-management.io/placement"
)

The placementDecsion label name holding the placement name

Variables

View Source
var (
	GroupName    = "cluster.open-cluster-management.io"
	GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

	// Install is a function which adds this version to a scheme
	Install = schemeBuilder.AddToScheme

	// SchemeGroupVersion generated code relies on this name
	// Deprecated
	SchemeGroupVersion = GroupVersion
	// AddToScheme exists solely to keep the old generators creating valid code
	// DEPRECATED
	AddToScheme = schemeBuilder.AddToScheme
)
View Source
var ReservedClusterClaimNames = [...]string{

	"id.k8s.io",

	"kubeversion.open-cluster-management.io",

	"platform.open-cluster-management.io",

	"product.open-cluster-management.io",
}

ReservedClusterClaimNames includes a list of reserved names for ClusterNames. When exposing ClusterClaims created on managed cluster, the registration agent gives high priority to the reserved ClusterClaims.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource generated code relies on this being here, but it logically belongs to the group DEPRECATED

Types

type ClusterClaim

type ClusterClaim struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the attributes of the ClusterClaim.
	Spec ClusterClaimSpec `json:"spec,omitempty"`
}

ClusterClaim represents cluster information that a managed cluster claims ClusterClaims with well known names include,

  1. id.k8s.io, it contains a unique identifier for the cluster.
  2. clusterset.k8s.io, it contains an identifier that relates the cluster to the ClusterSet in which it belongs.

ClusterClaims created on a managed cluster will be collected and saved into the status of the corresponding ManagedCluster on hub.

func (*ClusterClaim) DeepCopy

func (in *ClusterClaim) DeepCopy() *ClusterClaim

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClaim.

func (*ClusterClaim) DeepCopyInto

func (in *ClusterClaim) DeepCopyInto(out *ClusterClaim)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterClaim) DeepCopyObject

func (in *ClusterClaim) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (ClusterClaim) SwaggerDoc

func (ClusterClaim) SwaggerDoc() map[string]string

type ClusterClaimList

type ClusterClaimList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of ClusterClaim.
	Items []ClusterClaim `json:"items"`
}

ClusterClaimList is a collection of ClusterClaim.

func (*ClusterClaimList) DeepCopy

func (in *ClusterClaimList) DeepCopy() *ClusterClaimList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClaimList.

func (*ClusterClaimList) DeepCopyInto

func (in *ClusterClaimList) DeepCopyInto(out *ClusterClaimList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterClaimList) DeepCopyObject

func (in *ClusterClaimList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (ClusterClaimList) SwaggerDoc

func (ClusterClaimList) SwaggerDoc() map[string]string

type ClusterClaimSelector

type ClusterClaimSelector struct {
	// matchExpressions is a list of cluster claim selector requirements. The requirements are ANDed.
	// +optional
	MatchExpressions []metav1.LabelSelectorRequirement `json:"matchExpressions,omitempty"`
}

ClusterClaimSelector is a claim query over a set of ManagedClusters. An empty cluster claim selector matches all objects. A null cluster claim selector matches no objects.

func (*ClusterClaimSelector) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClaimSelector.

func (*ClusterClaimSelector) DeepCopyInto

func (in *ClusterClaimSelector) DeepCopyInto(out *ClusterClaimSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ClusterClaimSelector) SwaggerDoc

func (ClusterClaimSelector) SwaggerDoc() map[string]string

type ClusterClaimSpec

type ClusterClaimSpec struct {
	// Value is a claim-dependent string
	// +kubebuilder:validation:MaxLength=1024
	// +kubebuilder:validation:MinLength=1
	Value string `json:"value,omitempty"`
}

func (*ClusterClaimSpec) DeepCopy

func (in *ClusterClaimSpec) DeepCopy() *ClusterClaimSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClaimSpec.

func (*ClusterClaimSpec) DeepCopyInto

func (in *ClusterClaimSpec) DeepCopyInto(out *ClusterClaimSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ClusterClaimSpec) SwaggerDoc

func (ClusterClaimSpec) SwaggerDoc() map[string]string

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.
	// +kubebuilder:validation:Required
	// +required
	ClusterName string `json:"clusterName"`

	// Reason represents the reason why the ManagedCluster is selected.
	// +kubebuilder:validation:Required
	// +required
	Reason string `json:"reason"`
}

ClusterDecision represents a decision from a placement An empty ClusterDecision indicates it is not scheduled yet.

func (*ClusterDecision) DeepCopy

func (in *ClusterDecision) DeepCopy() *ClusterDecision

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDecision.

func (*ClusterDecision) DeepCopyInto

func (in *ClusterDecision) DeepCopyInto(out *ClusterDecision)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ClusterDecision) SwaggerDoc

func (ClusterDecision) SwaggerDoc() map[string]string

type ClusterPredicate

type ClusterPredicate struct {
	// RequiredClusterSelector represents a selector of ManagedClusters by label and claim. If specified,
	// 1) Any ManagedCluster, which does not match the selector, should not be selected by this ClusterPredicate;
	// 2) If a selected ManagedCluster (of this ClusterPredicate) ceases to match the selector (e.g. due to
	//    an update) of any ClusterPredicate, it will be eventually removed from the placement decisions;
	// 3) If a ManagedCluster (not selected previously) starts to match the selector, it will either
	//    be selected or at least has a chance to be selected (when NumberOfClusters is specified);
	// +optional
	RequiredClusterSelector ClusterSelector `json:"requiredClusterSelector,omitempty"`
}

ClusterPredicate represents a predicate to select ManagedClusters.

func (*ClusterPredicate) DeepCopy

func (in *ClusterPredicate) DeepCopy() *ClusterPredicate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPredicate.

func (*ClusterPredicate) DeepCopyInto

func (in *ClusterPredicate) DeepCopyInto(out *ClusterPredicate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ClusterPredicate) SwaggerDoc

func (ClusterPredicate) SwaggerDoc() map[string]string

type ClusterSelector

type ClusterSelector struct {
	// LabelSelector represents a selector of ManagedClusters by label
	// +optional
	LabelSelector metav1.LabelSelector `json:"labelSelector,omitempty"`

	// ClaimSelector represents a selector of ManagedClusters by clusterClaims in status
	// +optional
	ClaimSelector ClusterClaimSelector `json:"claimSelector,omitempty"`
}

ClusterSelector represents the AND of the containing selectors. An empty cluster selector matches all objects. A null cluster selector matches no objects.

func (*ClusterSelector) DeepCopy

func (in *ClusterSelector) DeepCopy() *ClusterSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSelector.

func (*ClusterSelector) DeepCopyInto

func (in *ClusterSelector) DeepCopyInto(out *ClusterSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ClusterSelector) SwaggerDoc

func (ClusterSelector) SwaggerDoc() map[string]string

type ManagedClusterSet

type ManagedClusterSet struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the attributes of the ManagedClusterSet
	Spec ManagedClusterSetSpec `json:"spec"`

	// Status represents the current status of the ManagedClusterSet
	// +optional
	Status ManagedClusterSetStatus `json:"status,omitempty"`
}

ManagedClusterSet defines a group of ManagedClusters that user's workload can run on. A workload can be defined to deployed on a ManagedClusterSet, which mean:

  1. The workload can run on any ManagedCluster in the ManagedClusterSet
  2. The workload cannot run on any ManagedCluster outside the ManagedClusterSet
  3. The service exposed by the workload can be shared in any ManagedCluster in the ManagedClusterSet

In order to assign a ManagedCluster to a certian ManagedClusterSet, add a label with name `cluster.open-cluster-management.io/clusterset` on the ManagedCluster to refers to the ManagedClusterSet. User is not allow to add/remove this label on a ManagedCluster unless they have a RBAC rule to CREATE on a virtual subresource of managedclustersets/join. In order to update this label, user must have the permission on both the old and new ManagedClusterSet.

func (*ManagedClusterSet) DeepCopy

func (in *ManagedClusterSet) DeepCopy() *ManagedClusterSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSet.

func (*ManagedClusterSet) DeepCopyInto

func (in *ManagedClusterSet) DeepCopyInto(out *ManagedClusterSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ManagedClusterSet) DeepCopyObject

func (in *ManagedClusterSet) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (ManagedClusterSet) SwaggerDoc

func (ManagedClusterSet) SwaggerDoc() map[string]string

type ManagedClusterSetBinding

type ManagedClusterSetBinding struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the attributes of ManagedClusterSetBinding.
	Spec ManagedClusterSetBindingSpec `json:"spec"`
}

ManagedClusterSetBinding projects a ManagedClusterSet into a certain namespace. User is able to create a ManagedClusterSetBinding in a namespace and bind it to a ManagedClusterSet if they have an RBAC rule to CREATE on the virtual subresource of managedclustersets/bind. Workloads created in the same namespace can only be distributed to ManagedClusters in ManagedClusterSets bound in this namespace by higher level controllers.

func (*ManagedClusterSetBinding) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetBinding.

func (*ManagedClusterSetBinding) DeepCopyInto

func (in *ManagedClusterSetBinding) DeepCopyInto(out *ManagedClusterSetBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ManagedClusterSetBinding) DeepCopyObject

func (in *ManagedClusterSetBinding) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (ManagedClusterSetBinding) SwaggerDoc

func (ManagedClusterSetBinding) SwaggerDoc() map[string]string

type ManagedClusterSetBindingList

type ManagedClusterSetBindingList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of ManagedClusterSetBinding.
	Items []ManagedClusterSetBinding `json:"items"`
}

ManagedClusterSetBindingList is a collection of ManagedClusterSetBinding.

func (*ManagedClusterSetBindingList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetBindingList.

func (*ManagedClusterSetBindingList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ManagedClusterSetBindingList) DeepCopyObject

func (in *ManagedClusterSetBindingList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (ManagedClusterSetBindingList) SwaggerDoc

func (ManagedClusterSetBindingList) SwaggerDoc() map[string]string

type ManagedClusterSetBindingSpec

type ManagedClusterSetBindingSpec struct {
	// ClusterSet is the name of the ManagedClusterSet to bind. It must match the
	// instance name of the ManagedClusterSetBinding and cannot change once created.
	// User is allowed to set this field if they have an RBAC rule to CREATE on the
	// virtual subresource of managedclustersets/bind.
	// +kubebuilder:validation:MinLength=1
	ClusterSet string `json:"clusterSet"`
}

ManagedClusterSetBindingSpec defines the attributes of ManagedClusterSetBinding.

func (*ManagedClusterSetBindingSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetBindingSpec.

func (*ManagedClusterSetBindingSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ManagedClusterSetBindingSpec) SwaggerDoc

func (ManagedClusterSetBindingSpec) SwaggerDoc() map[string]string

type ManagedClusterSetList

type ManagedClusterSetList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of ManagedClusterSet.
	Items []ManagedClusterSet `json:"items"`
}

ManagedClusterSetList is a collection of ManagedClusterSet.

func (*ManagedClusterSetList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetList.

func (*ManagedClusterSetList) DeepCopyInto

func (in *ManagedClusterSetList) DeepCopyInto(out *ManagedClusterSetList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ManagedClusterSetList) DeepCopyObject

func (in *ManagedClusterSetList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (ManagedClusterSetList) SwaggerDoc

func (ManagedClusterSetList) SwaggerDoc() map[string]string

type ManagedClusterSetSpec

type ManagedClusterSetSpec struct {
}

ManagedClusterSetSpec describes the attributes of the ManagedClusterSet

func (*ManagedClusterSetSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetSpec.

func (*ManagedClusterSetSpec) DeepCopyInto

func (in *ManagedClusterSetSpec) DeepCopyInto(out *ManagedClusterSetSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ManagedClusterSetSpec) SwaggerDoc

func (ManagedClusterSetSpec) SwaggerDoc() map[string]string

type ManagedClusterSetStatus

type ManagedClusterSetStatus struct {
	// Conditions contains the different condition statuses for this ManagedClusterSet.
	Conditions []metav1.Condition `json:"conditions"`
}

ManagedClusterSetStatus represents the current status of the ManagedClusterSet.

func (*ManagedClusterSetStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetStatus.

func (*ManagedClusterSetStatus) DeepCopyInto

func (in *ManagedClusterSetStatus) DeepCopyInto(out *ManagedClusterSetStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ManagedClusterSetStatus) SwaggerDoc

func (ManagedClusterSetStatus) SwaggerDoc() map[string]string

type Placement

type Placement struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the attributes of Placement.
	// +kubebuilder:validation:Required
	// +required
	Spec PlacementSpec `json:"spec"`

	// Status represents the current status of the Placement
	// +optional
	Status PlacementStatus `json:"status,omitempty"`
}

Placement defines a rule to select a set of ManagedClusters from the ManagedClusterSets bound to the placement namespace.

Here is how the placement policy combines with other selection methods to determine a matching list of ManagedClusters:

  1. Kubernetes clusters are registered with hub as cluster-scoped ManagedClusters;
  2. ManagedClusters are organized into cluster-scoped ManagedClusterSets;
  3. ManagedClusterSets are bound to workload namespaces;
  4. Namespace-scoped Placements specify a slice of ManagedClusterSets which select a working set of potential ManagedClusters;
  5. Then Placements subselect from that working set using label/claim selection.

No ManagedCluster will be selected if no ManagedClusterSet is bound to the placement namespace. User is able to bind a ManagedClusterSet to a namespace by creating a ManagedClusterSetBinding in that namespace if they have a RBAC rule to CREATE on the virtual subresource of `managedclustersets/bind`.

A slice of PlacementDecisions with label cluster.open-cluster-management.io/placement={placement name} will be created to represent the ManagedClusters selected by this placement.

If a ManagedCluster is selected and added into the PlacementDecisions, other components may apply workload on it; once it is removed from the PlacementDecisions, the workload applied on this ManagedCluster should be evicted accordingly.

func (*Placement) DeepCopy

func (in *Placement) DeepCopy() *Placement

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.

func (*Placement) DeepCopyInto

func (in *Placement) DeepCopyInto(out *Placement)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Placement) DeepCopyObject

func (in *Placement) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (Placement) SwaggerDoc

func (Placement) SwaggerDoc() map[string]string

type PlacementDecision

type PlacementDecision struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Status represents the current status of the PlacementDecision
	// +optional
	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) DeepCopy

func (in *PlacementDecision) DeepCopy() *PlacementDecision

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementDecision.

func (*PlacementDecision) DeepCopyInto

func (in *PlacementDecision) DeepCopyInto(out *PlacementDecision)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PlacementDecision) DeepCopyObject

func (in *PlacementDecision) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (PlacementDecision) SwaggerDoc

func (PlacementDecision) SwaggerDoc() map[string]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
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of PlacementDecision.
	Items []PlacementDecision `json:"items"`
}

ClusterDecisionList is a collection of PlacementDecision.

func (*PlacementDecisionList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementDecisionList.

func (*PlacementDecisionList) DeepCopyInto

func (in *PlacementDecisionList) DeepCopyInto(out *PlacementDecisionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PlacementDecisionList) DeepCopyObject

func (in *PlacementDecisionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (PlacementDecisionList) SwaggerDoc

func (PlacementDecisionList) SwaggerDoc() map[string]string

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
	// +kubebuilder:validation:Required
	// +required
	Decisions []ClusterDecision `json:"decisions"`
}

PlacementDecisionStatus represents the current status of the PlacementDecision.

func (*PlacementDecisionStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementDecisionStatus.

func (*PlacementDecisionStatus) DeepCopyInto

func (in *PlacementDecisionStatus) DeepCopyInto(out *PlacementDecisionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PlacementDecisionStatus) SwaggerDoc

func (PlacementDecisionStatus) SwaggerDoc() map[string]string

type PlacementList

type PlacementList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of Placements.
	Items []Placement `json:"items"`
}

PlacementList is a collection of Placements.

func (*PlacementList) DeepCopy

func (in *PlacementList) DeepCopy() *PlacementList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementList.

func (*PlacementList) DeepCopyInto

func (in *PlacementList) DeepCopyInto(out *PlacementList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PlacementList) DeepCopyObject

func (in *PlacementList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (PlacementList) SwaggerDoc

func (PlacementList) SwaggerDoc() map[string]string

type PlacementSpec

type PlacementSpec struct {
	// ClusterSets represent the ManagedClusterSets from which the ManagedClusters are selected.
	// If the slice is empty, ManagedClusters will be selected from the ManagedClusterSets bound to the placement
	// namespace, otherwise ManagedClusters will be selected from the intersection of this slice and the
	// ManagedClusterSets bound to the placement namespace.
	// +optional
	ClusterSets []string `json:"clusterSets,omitempty"`

	// NumberOfClusters represents the desired number of ManagedClusters to be selected which meet the
	// placement requirements.
	// 1) If not specified, all ManagedClusters which meet the placement requirements (including ClusterSets,
	//    and Predicates) will be selected;
	// 2) Otherwise if the nubmer of ManagedClusters meet the placement requirements is larger than
	//    NumberOfClusters, a random subset with desired number of ManagedClusters will be selected;
	// 3) If the nubmer of ManagedClusters meet the placement requirements is equal to NumberOfClusters,
	//    all of them will be selected;
	// 4) If the nubmer of ManagedClusters meet the placement requirements is less than NumberOfClusters,
	//    all of them will be selected, and the status of condition `PlacementConditionSatisfied` will be
	//    set to false;
	// +optional
	NumberOfClusters *int32 `json:"numberOfClusters,omitempty"`

	// Predicates represent a slice of predicates to select ManagedClusters. The predicates are ORed.
	// +optional
	Predicates []ClusterPredicate `json:"predicates,omitempty"`

	// PrioritizerPolicy defines the policy of the prioritizers.
	// If this field is unset, then default prioritizer mode and configurations are used.
	// Referring to PrioritizerPolicy to see more description about Mode and Configurations.
	// +optional
	PrioritizerPolicy PrioritizerPolicy `json:"prioritizerPolicy"`
}

PlacementSpec defines the attributes of Placement. An empty PlacementSpec selects all ManagedClusters from the ManagedClusterSets bound to the placement namespace. The containing fields are ANDed.

func (*PlacementSpec) DeepCopy

func (in *PlacementSpec) DeepCopy() *PlacementSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementSpec.

func (*PlacementSpec) DeepCopyInto

func (in *PlacementSpec) DeepCopyInto(out *PlacementSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PlacementSpec) SwaggerDoc

func (PlacementSpec) SwaggerDoc() map[string]string

type PlacementStatus

type PlacementStatus struct {
	// NumberOfSelectedClusters represents the number of selected ManagedClusters
	// +optional
	NumberOfSelectedClusters int32 `json:"numberOfSelectedClusters"`

	// Conditions contains the different condition statuses for this Placement.
	// +optional
	Conditions []metav1.Condition `json:"conditions"`
}

func (*PlacementStatus) DeepCopy

func (in *PlacementStatus) DeepCopy() *PlacementStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementStatus.

func (*PlacementStatus) DeepCopyInto

func (in *PlacementStatus) DeepCopyInto(out *PlacementStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PlacementStatus) SwaggerDoc

func (PlacementStatus) SwaggerDoc() map[string]string

type PrioritizerConfig added in v0.5.0

type PrioritizerConfig struct {
	// Name is the name of a prioritizer. Below are the valid names:
	// 1) Balance: balance the decisions among the clusters.
	// 2) Steady: ensure the existing decision is stabilized.
	// 3) ResourceAllocatableCPU & ResourceAllocatableMemory: sort clusters based on the allocatable.
	// +kubebuilder:validation:Required
	// +required
	Name string `json:"name"`

	// Weight defines the weight of prioritizer. The value must be ranged in [0,10].
	// Each prioritizer will calculate an integer score of a cluster in the range of [-100, 100].
	// The final score of a cluster will be sum(weight * prioritizer_score).
	// A higher weight indicates that the prioritizer weights more in the cluster selection,
	// while 0 weight indicate thats the prioritizer is disabled.
	// +kubebuilder:validation:Minimum:=0
	// +kubebuilder:validation:Maximum:=10
	// +kubebuilder:default:=1
	// +optional
	Weight int32 `json:"weight,omitempty"`
}

PrioritizerConfig represents the configuration of prioritizer

func (*PrioritizerConfig) DeepCopy added in v0.5.0

func (in *PrioritizerConfig) DeepCopy() *PrioritizerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrioritizerConfig.

func (*PrioritizerConfig) DeepCopyInto added in v0.5.0

func (in *PrioritizerConfig) DeepCopyInto(out *PrioritizerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PrioritizerConfig) SwaggerDoc added in v0.5.0

func (PrioritizerConfig) SwaggerDoc() map[string]string

type PrioritizerPolicy added in v0.5.0

type PrioritizerPolicy struct {
	// Mode is either Exact, Additive, "" where "" is Additive by default.
	// In Additive mode, any prioritizer not explicitly enumerated is enabled in its default Configurations,
	// in which Steady and Balance prioritizers have the weight of 1 while other prioritizers have the weight of 0.
	// Additive doesn't require configuring all prioritizers. The default Configurations may change in the future,
	// and additional prioritization will happen.
	// In Exact mode, any prioritizer not explicitly enumerated is weighted as zero.
	// Exact requires knowing the full set of prioritizers you want, but avoids behavior changes between releases.
	// +kubebuilder:default:=Additive
	// +optional
	Mode PrioritizerPolicyModeType `json:"mode,omitempty"`

	// +optional
	Configurations []PrioritizerConfig `json:"configurations,omitempty"`
}

PrioritizerPolicy represents the policy of prioritizer

func (*PrioritizerPolicy) DeepCopy added in v0.5.0

func (in *PrioritizerPolicy) DeepCopy() *PrioritizerPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrioritizerPolicy.

func (*PrioritizerPolicy) DeepCopyInto added in v0.5.0

func (in *PrioritizerPolicy) DeepCopyInto(out *PrioritizerPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PrioritizerPolicy) SwaggerDoc added in v0.5.0

func (PrioritizerPolicy) SwaggerDoc() map[string]string

type PrioritizerPolicyModeType added in v0.5.0

type PrioritizerPolicyModeType string

PrioritizerPolicyModeType represents the type of PrioritizerPolicy.Mode

const (
	// Valid PrioritizerPolicyModeType value is Exact, Additive.
	PrioritizerPolicyModeAdditive PrioritizerPolicyModeType = "Additive"
	PrioritizerPolicyModeExact    PrioritizerPolicyModeType = "Exact"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL