From 3d591bb11b9fa04f5c51ccde71c173370343306e Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Tue, 8 Nov 2022 16:28:26 +0800 Subject: [PATCH] update clustermanangementaddon api (#300) Signed-off-by: Wei Liu Signed-off-by: Wei Liu --- Makefile | 2 +- ...cluster-manager.clusterserviceversion.yaml | 2 +- .../klusterlet.clusterserviceversion.yaml | 2 +- go.mod | 2 +- go.sum | 4 +- ...gement.io_clustermanagementaddons.crd.yaml | 5 ++ ...-management.io_managedclustersets.crd.yaml | 12 +-- ...anagement.io_managedclusteraddons.crd.yaml | 2 + ...-cluster-management.io_placements.crd.yaml | 43 +++++++++- ...uster-management.io_clusterclaims.crd.yaml | 2 +- ...uster-management.io_clusterclaims.crd.yaml | 2 +- vendor/modules.txt | 4 +- ...gement.io_clustermanagementaddons.crd.yaml | 5 ++ ...anagement.io_managedclusteraddons.crd.yaml | 2 + .../v1alpha1/types_clustermanagementaddon.go | 5 ++ .../clientset/versioned/scheme/register.go | 14 ++-- .../clientset/versioned/scheme/register.go | 14 ++-- .../clientset/versioned/fake/register.go | 14 ++-- .../clientset/versioned/scheme/register.go | 14 ++-- .../work/clientset/versioned/fake/register.go | 14 ++-- .../clientset/versioned/scheme/register.go | 14 ++-- ...uster-management.io_clusterclaims.crd.yaml | 2 +- ...uster-management.io_clusterclaims.crd.yaml | 2 +- .../api/cluster/v1alpha1/types.go | 7 +- .../v1alpha1/types_addonplacementscore.go | 4 +- .../zz_generated.swagger_doc_generated.go | 2 +- ...-management.io_managedclustersets.crd.yaml | 2 +- ...-cluster-management.io_placements.crd.yaml | 43 +++++++++- .../v1beta1/types_managedclusterset.go | 8 +- .../api/cluster/v1beta1/types_placement.go | 81 +++++++++++++++++-- .../v1beta1/types_placementdecision.go | 2 +- .../cluster/v1beta1/zz_generated.deepcopy.go | 38 +++++++++ .../zz_generated.swagger_doc_generated.go | 28 ++++++- ...-management.io_managedclustersets.crd.yaml | 4 +- .../v1beta2/types_managedclusterset.go | 8 +- .../zz_generated.swagger_doc_generated.go | 2 +- 36 files changed, 319 insertions(+), 92 deletions(-) diff --git a/Makefile b/Makefile index 3110cd0f9..c3cf7d594 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ IMAGE_TAG?=latest IMAGE_NAME?=$(IMAGE_REGISTRY)/registration-operator:$(IMAGE_TAG) # CSV_VERSION is used to generate new CSV manifests -CSV_VERSION?=0.9.0 +CSV_VERSION?=0.10.0 # WORK_IMAGE can be set in the env to override calculated value WORK_TAG?=latest diff --git a/deploy/cluster-manager/olm-catalog/cluster-manager/manifests/cluster-manager.clusterserviceversion.yaml b/deploy/cluster-manager/olm-catalog/cluster-manager/manifests/cluster-manager.clusterserviceversion.yaml index f22377ba1..c25855a12 100644 --- a/deploy/cluster-manager/olm-catalog/cluster-manager/manifests/cluster-manager.clusterserviceversion.yaml +++ b/deploy/cluster-manager/olm-catalog/cluster-manager/manifests/cluster-manager.clusterserviceversion.yaml @@ -63,7 +63,7 @@ metadata: operators.operatorframework.io/project_layout: go repository: https://github.com/open-cluster-management-io/registration-operator support: Red Hat, Inc. - name: cluster-manager.v0.9.0 + name: cluster-manager.v0.10.0 namespace: placeholder spec: apiservicedefinitions: {} diff --git a/deploy/klusterlet/olm-catalog/klusterlet/manifests/klusterlet.clusterserviceversion.yaml b/deploy/klusterlet/olm-catalog/klusterlet/manifests/klusterlet.clusterserviceversion.yaml index c99f1eb53..e0b8db118 100644 --- a/deploy/klusterlet/olm-catalog/klusterlet/manifests/klusterlet.clusterserviceversion.yaml +++ b/deploy/klusterlet/olm-catalog/klusterlet/manifests/klusterlet.clusterserviceversion.yaml @@ -44,7 +44,7 @@ metadata: operators.operatorframework.io/project_layout: go repository: https://github.com/open-cluster-management-io/registration-operator support: Red Hat, Inc. - name: klusterlet.v0.9.0 + name: klusterlet.v0.10.0 namespace: placeholder spec: apiservicedefinitions: {} diff --git a/go.mod b/go.mod index 7fc5bc94c..ae03d7ab3 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( k8s.io/component-base v0.24.3 k8s.io/klog/v2 v2.70.0 k8s.io/kube-aggregator v0.24.3 - open-cluster-management.io/api v0.9.1-0.20221031031432-8b08a2ec335b + open-cluster-management.io/api v0.9.1-0.20221107101616-fde10e6996f6 sigs.k8s.io/controller-runtime v0.12.3 sigs.k8s.io/kube-storage-version-migrator v0.0.5 ) diff --git a/go.sum b/go.sum index b608eedf6..11def13fe 100644 --- a/go.sum +++ b/go.sum @@ -1234,8 +1234,8 @@ k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -open-cluster-management.io/api v0.9.1-0.20221031031432-8b08a2ec335b h1:ETkAxS9D/I3/DNYPO+FPVoz9BndQw2NJ1nQu6Aw3zXg= -open-cluster-management.io/api v0.9.1-0.20221031031432-8b08a2ec335b/go.mod h1:+OEARSAl2jIhuLItUcS30UgLA3khmA9ihygLVxzEn+U= +open-cluster-management.io/api v0.9.1-0.20221107101616-fde10e6996f6 h1:jXx0C2GKScyZSxyyvswxmgspQgx7SnBic80EM57EdOw= +open-cluster-management.io/api v0.9.1-0.20221107101616-fde10e6996f6/go.mod h1:9KkJPh/zpDevXj2P+zkvSVjC2pq2PQ1JDNLLEes8TEc= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/manifests/cluster-manager/hub/0000_00_addon.open-cluster-management.io_clustermanagementaddons.crd.yaml b/manifests/cluster-manager/hub/0000_00_addon.open-cluster-management.io_clustermanagementaddons.crd.yaml index 08bdb4056..0367afb8e 100644 --- a/manifests/cluster-manager/hub/0000_00_addon.open-cluster-management.io_clustermanagementaddons.crd.yaml +++ b/manifests/cluster-manager/hub/0000_00_addon.open-cluster-management.io_clustermanagementaddons.crd.yaml @@ -86,10 +86,15 @@ spec: group: description: group of the add-on configuration. type: string + default: "" resource: description: resource of the add-on configuration. type: string minLength: 1 + x-kubernetes-list-map-keys: + - group + - resource + x-kubernetes-list-type: map status: description: status represents the current status of cluster management add-on. type: object diff --git a/manifests/cluster-manager/hub/0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml b/manifests/cluster-manager/hub/0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml index f992fee70..893ec0639 100644 --- a/manifests/cluster-manager/hub/0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml +++ b/manifests/cluster-manager/hub/0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml @@ -43,9 +43,9 @@ spec: openAPIV3Schema: description: "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 + 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 \n 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 @@ -227,9 +227,9 @@ spec: openAPIV3Schema: description: "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 + 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 \n 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 diff --git a/manifests/cluster-manager/hub/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml b/manifests/cluster-manager/hub/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml index 9d12081b7..d8842c6db 100644 --- a/manifests/cluster-manager/hub/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml +++ b/manifests/cluster-manager/hub/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml @@ -54,6 +54,7 @@ spec: group: description: group of the add-on configuration. type: string + default: "" name: description: name of the add-on configuration. type: string @@ -156,6 +157,7 @@ spec: group: description: group of the add-on configuration. type: string + default: "" lastObservedGeneration: description: lastObservedGeneration is the observed generation of the add-on configuration. type: integer diff --git a/manifests/cluster-manager/hub/0000_02_clusters.open-cluster-management.io_placements.crd.yaml b/manifests/cluster-manager/hub/0000_02_clusters.open-cluster-management.io_placements.crd.yaml index 4c22187b6..2342ed799 100644 --- a/manifests/cluster-manager/hub/0000_02_clusters.open-cluster-management.io_placements.crd.yaml +++ b/manifests/cluster-manager/hub/0000_02_clusters.open-cluster-management.io_placements.crd.yaml @@ -25,7 +25,7 @@ spec: name: v1beta1 schema: openAPIV3Schema: - description: "Placement defines a rule to select a set of ManagedClusters from the ManagedClusterSets bound to the placement namespace. \n 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. \n 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`. \n 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. \n 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." + description: "Placement defines a rule to select a set of ManagedClusters from the ManagedClusterSets bound to the placement namespace. \n 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. \n 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`. \n 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. \n 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." type: object required: - spec @@ -149,7 +149,7 @@ spec: description: ScoreName defines the score name inside AddOnPlacementScore. AddOnPlacementScore contains a list of score name and score value, ScoreName specify the score to be used by the prioritizer. type: string builtIn: - description: 'BuiltIn defines the name of a BuiltIn prioritizer. Below are the valid BuiltIn prioritizer 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.' + description: 'BuiltIn defines the name of a BuiltIn prioritizer. Below are the valid BuiltIn prioritizer 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. 4) Spread: spread the workload evenly to topologies.' type: string type: description: Type defines the type of the prioritizer score. Type is either "BuiltIn", "AddOn" or "", where "" is "BuiltIn" by default. When the type is "BuiltIn", need to specify a BuiltIn prioritizer name in BuiltIn. When the type is "AddOn", need to configure the score source in AddOn. @@ -169,6 +169,45 @@ spec: description: 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. type: string default: Additive + spreadPolicy: + description: SpreadPolicy defines how placement decisions should be distributed among a set of ManagedClusters. + type: object + properties: + spreadConstraints: + description: SpreadConstraints defines how the placement decision should be distributed among a set of ManagedClusters. The importance of the SpreadConstraintsTerms follows the natural order of their index in the slice. The scheduler first consider SpreadConstraintsTerms with smaller index then those with larger index to distribute the placement decision. + type: array + maxItems: 8 + items: + description: SpreadConstraintsTerm defines a terminology to spread placement decisions. + type: object + required: + - topologyKey + - topologyKeyType + properties: + maxSkew: + description: MaxSkew represents the degree to which the workload may be unevenly distributed. Skew is the maximum difference between the number of selected ManagedClusters in a topology and the global minimum. The global minimum is the minimum number of selected ManagedClusters for the topologies within the same TopologyKey. The minimum possible value of MaxSkew is 1, and the default value is 1. + type: integer + format: int32 + default: 1 + minimum: 1 + topologyKey: + description: TopologyKey is either a label key or a cluster claim name of ManagedClusters. + type: string + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + topologyKeyType: + description: TopologyKeyType indicates the type of TopologyKey. It could be Label or Claim. + type: string + enum: + - Label + - Claim + whenUnsatisfiable: + description: WhenUnsatisfiable represents the action of the scheduler when MaxSkew cannot be satisfied. It could be DoNotSchedule or ScheduleAnyway. The default value is ScheduleAnyway. DoNotSchedule instructs the scheduler not to schedule more ManagedClusters when MaxSkew is not satisfied. ScheduleAnyway instructs the scheduler to keep scheduling even if MaxSkew is not satisfied. + type: string + default: ScheduleAnyway + enum: + - DoNotSchedule + - ScheduleAnyway tolerations: description: Tolerations are applied to placements, and allow (but do not require) the managed clusters with certain taints to be selected by placements with matching tolerations. type: array diff --git a/manifests/klusterlet/managed/0000_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml b/manifests/klusterlet/managed/0000_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml index 0f5b20f73..16f883993 100644 --- a/manifests/klusterlet/managed/0000_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml +++ b/manifests/klusterlet/managed/0000_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml @@ -15,7 +15,7 @@ spec: - name: v1alpha1 schema: openAPIV3Schema: - description: 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. + description: "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. \n ClusterClaims created on a managed cluster will be collected and saved into the status of the corresponding ManagedCluster on hub." type: object properties: apiVersion: diff --git a/manifests/klusterlet/managed/0001_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml b/manifests/klusterlet/managed/0001_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml index 2df656861..bba98c653 100644 --- a/manifests/klusterlet/managed/0001_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml +++ b/manifests/klusterlet/managed/0001_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml @@ -13,7 +13,7 @@ spec: preserveUnknownFields: false validation: openAPIV3Schema: - description: 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. + description: "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. \n ClusterClaims created on a managed cluster will be collected and saved into the status of the corresponding ManagedCluster on hub." type: object properties: apiVersion: diff --git a/vendor/modules.txt b/vendor/modules.txt index 0f6d9370d..41626f025 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1190,8 +1190,8 @@ k8s.io/utils/path k8s.io/utils/pointer k8s.io/utils/strings/slices k8s.io/utils/trace -# open-cluster-management.io/api v0.9.1-0.20221031031432-8b08a2ec335b -## explicit; go 1.18 +# open-cluster-management.io/api v0.9.1-0.20221107101616-fde10e6996f6 +## explicit; go 1.19 open-cluster-management.io/api/addon/v1alpha1 open-cluster-management.io/api/client/addon/clientset/versioned open-cluster-management.io/api/client/addon/clientset/versioned/scheme diff --git a/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_00_addon.open-cluster-management.io_clustermanagementaddons.crd.yaml b/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_00_addon.open-cluster-management.io_clustermanagementaddons.crd.yaml index 08bdb4056..0367afb8e 100644 --- a/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_00_addon.open-cluster-management.io_clustermanagementaddons.crd.yaml +++ b/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_00_addon.open-cluster-management.io_clustermanagementaddons.crd.yaml @@ -86,10 +86,15 @@ spec: group: description: group of the add-on configuration. type: string + default: "" resource: description: resource of the add-on configuration. type: string minLength: 1 + x-kubernetes-list-map-keys: + - group + - resource + x-kubernetes-list-type: map status: description: status represents the current status of cluster management add-on. type: object diff --git a/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml b/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml index 9d12081b7..d8842c6db 100644 --- a/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml +++ b/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml @@ -54,6 +54,7 @@ spec: group: description: group of the add-on configuration. type: string + default: "" name: description: name of the add-on configuration. type: string @@ -156,6 +157,7 @@ spec: group: description: group of the add-on configuration. type: string + default: "" lastObservedGeneration: description: lastObservedGeneration is the observed generation of the add-on configuration. type: integer diff --git a/vendor/open-cluster-management.io/api/addon/v1alpha1/types_clustermanagementaddon.go b/vendor/open-cluster-management.io/api/addon/v1alpha1/types_clustermanagementaddon.go index 9479a2de8..525748ac0 100644 --- a/vendor/open-cluster-management.io/api/addon/v1alpha1/types_clustermanagementaddon.go +++ b/vendor/open-cluster-management.io/api/addon/v1alpha1/types_clustermanagementaddon.go @@ -48,6 +48,9 @@ type ClusterManagementAddOnSpec struct { // An empty list means the add-on does not require configurations. // The default is an empty list // +optional + // +listType=map + // +listMapKey=group + // +listMapKey=resource SupportedConfigs []ConfigMeta `json:"supportedConfigs,omitempty"` } @@ -93,6 +96,8 @@ type ConfigCoordinates struct { // ConfigGroupResource represents the GroupResource of the add-on configuration type ConfigGroupResource struct { // group of the add-on configuration. + // +optional + // +kubebuilder:default="" Group string `json:"group"` // resource of the add-on configuration. diff --git a/vendor/open-cluster-management.io/api/client/addon/clientset/versioned/scheme/register.go b/vendor/open-cluster-management.io/api/client/addon/clientset/versioned/scheme/register.go index 3807d8631..9dd616b51 100644 --- a/vendor/open-cluster-management.io/api/client/addon/clientset/versioned/scheme/register.go +++ b/vendor/open-cluster-management.io/api/client/addon/clientset/versioned/scheme/register.go @@ -21,14 +21,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/vendor/open-cluster-management.io/api/client/cluster/clientset/versioned/scheme/register.go b/vendor/open-cluster-management.io/api/client/cluster/clientset/versioned/scheme/register.go index d52290cc6..57c11727f 100644 --- a/vendor/open-cluster-management.io/api/client/cluster/clientset/versioned/scheme/register.go +++ b/vendor/open-cluster-management.io/api/client/cluster/clientset/versioned/scheme/register.go @@ -27,14 +27,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/vendor/open-cluster-management.io/api/client/operator/clientset/versioned/fake/register.go b/vendor/open-cluster-management.io/api/client/operator/clientset/versioned/fake/register.go index 74056abc5..8f0bfba47 100644 --- a/vendor/open-cluster-management.io/api/client/operator/clientset/versioned/fake/register.go +++ b/vendor/open-cluster-management.io/api/client/operator/clientset/versioned/fake/register.go @@ -21,14 +21,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/vendor/open-cluster-management.io/api/client/operator/clientset/versioned/scheme/register.go b/vendor/open-cluster-management.io/api/client/operator/clientset/versioned/scheme/register.go index fdcc43188..1eeb27bcd 100644 --- a/vendor/open-cluster-management.io/api/client/operator/clientset/versioned/scheme/register.go +++ b/vendor/open-cluster-management.io/api/client/operator/clientset/versioned/scheme/register.go @@ -21,14 +21,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/vendor/open-cluster-management.io/api/client/work/clientset/versioned/fake/register.go b/vendor/open-cluster-management.io/api/client/work/clientset/versioned/fake/register.go index b811faba5..41f73e602 100644 --- a/vendor/open-cluster-management.io/api/client/work/clientset/versioned/fake/register.go +++ b/vendor/open-cluster-management.io/api/client/work/clientset/versioned/fake/register.go @@ -21,14 +21,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/vendor/open-cluster-management.io/api/client/work/clientset/versioned/scheme/register.go b/vendor/open-cluster-management.io/api/client/work/clientset/versioned/scheme/register.go index 85a759144..91e9934e8 100644 --- a/vendor/open-cluster-management.io/api/client/work/clientset/versioned/scheme/register.go +++ b/vendor/open-cluster-management.io/api/client/work/clientset/versioned/scheme/register.go @@ -21,14 +21,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/vendor/open-cluster-management.io/api/cluster/v1alpha1/0000_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml b/vendor/open-cluster-management.io/api/cluster/v1alpha1/0000_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml index 0f5b20f73..16f883993 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1alpha1/0000_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml +++ b/vendor/open-cluster-management.io/api/cluster/v1alpha1/0000_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml @@ -15,7 +15,7 @@ spec: - name: v1alpha1 schema: openAPIV3Schema: - description: 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. + description: "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. \n ClusterClaims created on a managed cluster will be collected and saved into the status of the corresponding ManagedCluster on hub." type: object properties: apiVersion: diff --git a/vendor/open-cluster-management.io/api/cluster/v1alpha1/0001_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml b/vendor/open-cluster-management.io/api/cluster/v1alpha1/0001_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml index 2df656861..bba98c653 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1alpha1/0001_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml +++ b/vendor/open-cluster-management.io/api/cluster/v1alpha1/0001_02_clusters.open-cluster-management.io_clusterclaims.crd.yaml @@ -13,7 +13,7 @@ spec: preserveUnknownFields: false validation: openAPIV3Schema: - description: 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. + description: "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. \n ClusterClaims created on a managed cluster will be collected and saved into the status of the corresponding ManagedCluster on hub." type: object properties: apiVersion: diff --git a/vendor/open-cluster-management.io/api/cluster/v1alpha1/types.go b/vendor/open-cluster-management.io/api/cluster/v1alpha1/types.go index 044127d20..6cb57bc3b 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1alpha1/types.go +++ b/vendor/open-cluster-management.io/api/cluster/v1alpha1/types.go @@ -11,9 +11,10 @@ import ( // 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. +// 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. type ClusterClaim struct { diff --git a/vendor/open-cluster-management.io/api/cluster/v1alpha1/types_addonplacementscore.go b/vendor/open-cluster-management.io/api/cluster/v1alpha1/types_addonplacementscore.go index 039750c33..1ce73580b 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1alpha1/types_addonplacementscore.go +++ b/vendor/open-cluster-management.io/api/cluster/v1alpha1/types_addonplacementscore.go @@ -20,7 +20,7 @@ type AddOnPlacementScore struct { Status AddOnPlacementScoreStatus `json:"status,omitempty"` } -//AddOnPlacementScoreStatus represents the current status of AddOnPlacementScore. +// AddOnPlacementScoreStatus represents the current status of AddOnPlacementScore. type AddOnPlacementScoreStatus struct { // Conditions contain the different condition statuses for this AddOnPlacementScore. // +patchMergeKey=type @@ -45,7 +45,7 @@ type AddOnPlacementScoreStatus struct { ValidUntil *metav1.Time `json:"validUntil"` } -//AddOnPlacementScoreItem represents the score name and value. +// AddOnPlacementScoreItem represents the score name and value. type AddOnPlacementScoreItem struct { // Name is the name of the score // +kubebuilder:validation:Required diff --git a/vendor/open-cluster-management.io/api/cluster/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/open-cluster-management.io/api/cluster/v1alpha1/zz_generated.swagger_doc_generated.go index f1c81946d..864fc58e7 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/vendor/open-cluster-management.io/api/cluster/v1alpha1/zz_generated.swagger_doc_generated.go @@ -12,7 +12,7 @@ package v1alpha1 // AUTO-GENERATED FUNCTIONS START HERE var map_ClusterClaim = map[string]string{ - "": "ClusterClaim represents cluster information that a managed cluster claims ClusterClaims with well known names include,\n 1. id.k8s.io, it contains a unique identifier for the cluster.\n 2. clusterset.k8s.io, it contains an identifier that relates the cluster\n to the ClusterSet in which it belongs.\nClusterClaims created on a managed cluster will be collected and saved into the status of the corresponding ManagedCluster on hub.", + "": "ClusterClaim represents cluster information that a managed cluster claims ClusterClaims with well known names include,\n 1. id.k8s.io, it contains a unique identifier for the cluster.\n 2. clusterset.k8s.io, it contains an identifier that relates the cluster\n to the ClusterSet in which it belongs.\n\nClusterClaims created on a managed cluster will be collected and saved into the status of the corresponding ManagedCluster on hub.", "spec": "Spec defines the attributes of the ClusterClaim.", } diff --git a/vendor/open-cluster-management.io/api/cluster/v1beta1/0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml b/vendor/open-cluster-management.io/api/cluster/v1beta1/0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml index a543045ff..134e26a69 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1beta1/0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml +++ b/vendor/open-cluster-management.io/api/cluster/v1beta1/0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml @@ -25,7 +25,7 @@ spec: name: v1beta1 schema: openAPIV3Schema: - description: "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 \n 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." + description: "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 \n 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." type: object properties: apiVersion: diff --git a/vendor/open-cluster-management.io/api/cluster/v1beta1/0000_02_clusters.open-cluster-management.io_placements.crd.yaml b/vendor/open-cluster-management.io/api/cluster/v1beta1/0000_02_clusters.open-cluster-management.io_placements.crd.yaml index 4c22187b6..2342ed799 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1beta1/0000_02_clusters.open-cluster-management.io_placements.crd.yaml +++ b/vendor/open-cluster-management.io/api/cluster/v1beta1/0000_02_clusters.open-cluster-management.io_placements.crd.yaml @@ -25,7 +25,7 @@ spec: name: v1beta1 schema: openAPIV3Schema: - description: "Placement defines a rule to select a set of ManagedClusters from the ManagedClusterSets bound to the placement namespace. \n 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. \n 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`. \n 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. \n 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." + description: "Placement defines a rule to select a set of ManagedClusters from the ManagedClusterSets bound to the placement namespace. \n 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. \n 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`. \n 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. \n 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." type: object required: - spec @@ -149,7 +149,7 @@ spec: description: ScoreName defines the score name inside AddOnPlacementScore. AddOnPlacementScore contains a list of score name and score value, ScoreName specify the score to be used by the prioritizer. type: string builtIn: - description: 'BuiltIn defines the name of a BuiltIn prioritizer. Below are the valid BuiltIn prioritizer 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.' + description: 'BuiltIn defines the name of a BuiltIn prioritizer. Below are the valid BuiltIn prioritizer 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. 4) Spread: spread the workload evenly to topologies.' type: string type: description: Type defines the type of the prioritizer score. Type is either "BuiltIn", "AddOn" or "", where "" is "BuiltIn" by default. When the type is "BuiltIn", need to specify a BuiltIn prioritizer name in BuiltIn. When the type is "AddOn", need to configure the score source in AddOn. @@ -169,6 +169,45 @@ spec: description: 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. type: string default: Additive + spreadPolicy: + description: SpreadPolicy defines how placement decisions should be distributed among a set of ManagedClusters. + type: object + properties: + spreadConstraints: + description: SpreadConstraints defines how the placement decision should be distributed among a set of ManagedClusters. The importance of the SpreadConstraintsTerms follows the natural order of their index in the slice. The scheduler first consider SpreadConstraintsTerms with smaller index then those with larger index to distribute the placement decision. + type: array + maxItems: 8 + items: + description: SpreadConstraintsTerm defines a terminology to spread placement decisions. + type: object + required: + - topologyKey + - topologyKeyType + properties: + maxSkew: + description: MaxSkew represents the degree to which the workload may be unevenly distributed. Skew is the maximum difference between the number of selected ManagedClusters in a topology and the global minimum. The global minimum is the minimum number of selected ManagedClusters for the topologies within the same TopologyKey. The minimum possible value of MaxSkew is 1, and the default value is 1. + type: integer + format: int32 + default: 1 + minimum: 1 + topologyKey: + description: TopologyKey is either a label key or a cluster claim name of ManagedClusters. + type: string + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$ + topologyKeyType: + description: TopologyKeyType indicates the type of TopologyKey. It could be Label or Claim. + type: string + enum: + - Label + - Claim + whenUnsatisfiable: + description: WhenUnsatisfiable represents the action of the scheduler when MaxSkew cannot be satisfied. It could be DoNotSchedule or ScheduleAnyway. The default value is ScheduleAnyway. DoNotSchedule instructs the scheduler not to schedule more ManagedClusters when MaxSkew is not satisfied. ScheduleAnyway instructs the scheduler to keep scheduling even if MaxSkew is not satisfied. + type: string + default: ScheduleAnyway + enum: + - DoNotSchedule + - ScheduleAnyway tolerations: description: Tolerations are applied to placements, and allow (but do not require) the managed clusters with certain taints to be selected by placements with matching tolerations. type: array diff --git a/vendor/open-cluster-management.io/api/cluster/v1beta1/types_managedclusterset.go b/vendor/open-cluster-management.io/api/cluster/v1beta1/types_managedclusterset.go index 4bdfd4ab5..2bc43f9e0 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1beta1/types_managedclusterset.go +++ b/vendor/open-cluster-management.io/api/cluster/v1beta1/types_managedclusterset.go @@ -4,7 +4,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -//LegacyClusterSetLabel LabelKey +// LegacyClusterSetLabel LabelKey const ClusterSetLabel = "cluster.open-cluster-management.io/clusterset" // +genclient @@ -18,9 +18,9 @@ const ClusterSetLabel = "cluster.open-cluster-management.io/clusterset" // 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 +// 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. diff --git a/vendor/open-cluster-management.io/api/cluster/v1beta1/types_placement.go b/vendor/open-cluster-management.io/api/cluster/v1beta1/types_placement.go index b4ec052c3..9f4aabd6e 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1beta1/types_placement.go +++ b/vendor/open-cluster-management.io/api/cluster/v1beta1/types_placement.go @@ -18,12 +18,12 @@ import ( // // 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. +// 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 @@ -85,6 +85,11 @@ type PlacementSpec struct { // +optional PrioritizerPolicy PrioritizerPolicy `json:"prioritizerPolicy"` + // SpreadPolicy defines how placement decisions should be distributed among a + // set of ManagedClusters. + // +optional + SpreadPolicy SpreadPolicy `json:"spreadPolicy,omitempty"` + // Tolerations are applied to placements, and allow (but do not require) the managed clusters with // certain taints to be selected by placements with matching tolerations. // +optional @@ -185,6 +190,7 @@ type ScoreCoordinate struct { // 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. + // 4) Spread: spread the workload evenly to topologies. // +optional BuiltIn string `json:"builtIn,omitempty"` @@ -215,6 +221,69 @@ type AddOnScore struct { ScoreName string `json:"scoreName"` } +// SpreadPolicy defines how the placement decision should be spread among the ManagedClusters. +type SpreadPolicy struct { + // SpreadConstraints defines how the placement decision should be distributed among a set of ManagedClusters. + // The importance of the SpreadConstraintsTerms follows the natural order of their index in the slice. + // The scheduler first consider SpreadConstraintsTerms with smaller index then those with larger index + // to distribute the placement decision. + // +optional + // +kubebuilder:validation:MaxItems=8 + SpreadConstraints []SpreadConstraintsTerm `json:"spreadConstraints,omitempty"` +} + +// SpreadConstraintsTerm defines a terminology to spread placement decisions. +type SpreadConstraintsTerm struct { + // TopologyKey is either a label key or a cluster claim name of ManagedClusters. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` + // +kubebuilder:validation:MaxLength=316 + TopologyKey string `json:"topologyKey"` + + // TopologyKeyType indicates the type of TopologyKey. It could be Label or Claim. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=Label;Claim + TopologyKeyType TopologyKeyType `json:"topologyKeyType"` + + // MaxSkew represents the degree to which the workload may be unevenly distributed. + // Skew is the maximum difference between the number of selected ManagedClusters in a topology and the global minimum. + // The global minimum is the minimum number of selected ManagedClusters for the topologies within the same TopologyKey. + // The minimum possible value of MaxSkew is 1, and the default value is 1. + // +optional + // +kubebuilder:validation:Minimum=1 + // +kubebuilder:default=1 + MaxSkew int32 `json:"maxSkew"` + + // WhenUnsatisfiable represents the action of the scheduler when MaxSkew cannot be satisfied. + // It could be DoNotSchedule or ScheduleAnyway. The default value is ScheduleAnyway. + // DoNotSchedule instructs the scheduler not to schedule more ManagedClusters when MaxSkew is not satisfied. + // ScheduleAnyway instructs the scheduler to keep scheduling even if MaxSkew is not satisfied. + // +optional + // +kubebuilder:validation:Enum=DoNotSchedule;ScheduleAnyway + // +kubebuilder:default=ScheduleAnyway + WhenUnsatisfiable UnsatisfiableMaxSkewAction `json:"whenUnsatisfiable"` +} + +// TopologyKeyType represents the type of TopologyKey. +type TopologyKeyType string + +const ( + // Valid TopologyKeyType value is Claim, Label. + TopologyKeyTypeClaim TopologyKeyType = "Claim" + TopologyKeyTypeLabel TopologyKeyType = "Label" +) + +// UnsatisfiableMaxSkewAction represents the action when MaxSkew cannot be satisfied. +type UnsatisfiableMaxSkewAction string + +const ( + // Valid UnsatisfiableMaxSkewAction value is DoNotSchedule, ScheduleAnyway. + DoNotSchedule UnsatisfiableMaxSkewAction = "DoNotSchedule" + ScheduleAnyway UnsatisfiableMaxSkewAction = "ScheduleAnyway" +) + // Toleration represents the toleration object that can be attached to a placement. // The placement this Toleration is attached to tolerates any taint that matches // the triple using the matching operator . diff --git a/vendor/open-cluster-management.io/api/cluster/v1beta1/types_placementdecision.go b/vendor/open-cluster-management.io/api/cluster/v1beta1/types_placementdecision.go index 208268432..e9072c8d6 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1beta1/types_placementdecision.go +++ b/vendor/open-cluster-management.io/api/cluster/v1beta1/types_placementdecision.go @@ -26,7 +26,7 @@ type PlacementDecision struct { Status PlacementDecisionStatus `json:"status,omitempty"` } -//The placementDecsion label name holding the placement name +// The placementDecsion label name holding the placement name const ( PlacementLabel string = "cluster.open-cluster-management.io/placement" ) diff --git a/vendor/open-cluster-management.io/api/cluster/v1beta1/zz_generated.deepcopy.go b/vendor/open-cluster-management.io/api/cluster/v1beta1/zz_generated.deepcopy.go index 0b1209d19..f7a6f2f68 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1beta1/zz_generated.deepcopy.go +++ b/vendor/open-cluster-management.io/api/cluster/v1beta1/zz_generated.deepcopy.go @@ -485,6 +485,7 @@ func (in *PlacementSpec) DeepCopyInto(out *PlacementSpec) { } } in.PrioritizerPolicy.DeepCopyInto(&out.PrioritizerPolicy) + in.SpreadPolicy.DeepCopyInto(&out.SpreadPolicy) if in.Tolerations != nil { in, out := &in.Tolerations, &out.Tolerations *out = make([]Toleration, len(*in)) @@ -593,6 +594,43 @@ func (in *ScoreCoordinate) DeepCopy() *ScoreCoordinate { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpreadConstraintsTerm) DeepCopyInto(out *SpreadConstraintsTerm) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpreadConstraintsTerm. +func (in *SpreadConstraintsTerm) DeepCopy() *SpreadConstraintsTerm { + if in == nil { + return nil + } + out := new(SpreadConstraintsTerm) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpreadPolicy) DeepCopyInto(out *SpreadPolicy) { + *out = *in + if in.SpreadConstraints != nil { + in, out := &in.SpreadConstraints, &out.SpreadConstraints + *out = make([]SpreadConstraintsTerm, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpreadPolicy. +func (in *SpreadPolicy) DeepCopy() *SpreadPolicy { + if in == nil { + return nil + } + out := new(SpreadPolicy) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Toleration) DeepCopyInto(out *Toleration) { *out = *in diff --git a/vendor/open-cluster-management.io/api/cluster/v1beta1/zz_generated.swagger_doc_generated.go b/vendor/open-cluster-management.io/api/cluster/v1beta1/zz_generated.swagger_doc_generated.go index 3b359308f..b8c70231c 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1beta1/zz_generated.swagger_doc_generated.go +++ b/vendor/open-cluster-management.io/api/cluster/v1beta1/zz_generated.swagger_doc_generated.go @@ -22,7 +22,7 @@ func (ManagedClusterSelector) SwaggerDoc() map[string]string { } var map_ManagedClusterSet = map[string]string{ - "": "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:\n 1. The workload can run on any ManagedCluster in the ManagedClusterSet\n 2. The workload cannot run on any ManagedCluster outside the ManagedClusterSet\n 3. The service exposed by the workload can be shared in any ManagedCluster in the ManagedClusterSet\n\nIn 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.", + "": "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:\n 1. The workload can run on any ManagedCluster in the ManagedClusterSet\n 2. The workload cannot run on any ManagedCluster outside the ManagedClusterSet\n 3. The service exposed by the workload can be shared in any ManagedCluster in the ManagedClusterSet\n\nIn 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.", "spec": "Spec defines the attributes of the ManagedClusterSet", "status": "Status represents the current status of the ManagedClusterSet", } @@ -136,7 +136,7 @@ func (ClusterSelector) SwaggerDoc() map[string]string { } var map_Placement = map[string]string{ - "": "Placement defines a rule to select a set of ManagedClusters from the ManagedClusterSets bound to the placement namespace.\n\nHere 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\n of potential ManagedClusters;\n5) Then Placements subselect from that working set using label/claim selection.\n\nNo 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`.\n\nA slice of PlacementDecisions with label cluster.open-cluster-management.io/placement={placement name} will be created to represent the ManagedClusters selected by this placement.\n\nIf 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.", + "": "Placement defines a rule to select a set of ManagedClusters from the ManagedClusterSets bound to the placement namespace.\n\nHere is how the placement policy combines with other selection methods to determine a matching list of ManagedClusters:\n 1. Kubernetes clusters are registered with hub as cluster-scoped ManagedClusters;\n 2. ManagedClusters are organized into cluster-scoped ManagedClusterSets;\n 3. ManagedClusterSets are bound to workload namespaces;\n 4. Namespace-scoped Placements specify a slice of ManagedClusterSets which select a working set\n of potential ManagedClusters;\n 5. Then Placements subselect from that working set using label/claim selection.\n\nNo 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`.\n\nA slice of PlacementDecisions with label cluster.open-cluster-management.io/placement={placement name} will be created to represent the ManagedClusters selected by this placement.\n\nIf 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.", "spec": "Spec defines the attributes of Placement.", "status": "Status represents the current status of the Placement", } @@ -161,6 +161,7 @@ var map_PlacementSpec = map[string]string{ "numberOfClusters": "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,\n and Predicates) will be selected;\n2) Otherwise if the nubmer of ManagedClusters meet the placement requirements is larger than\n NumberOfClusters, a random subset with desired number of ManagedClusters will be selected;\n3) If the nubmer of ManagedClusters meet the placement requirements is equal to NumberOfClusters,\n all of them will be selected;\n4) If the nubmer of ManagedClusters meet the placement requirements is less than NumberOfClusters,\n all of them will be selected, and the status of condition `PlacementConditionSatisfied` will be\n set to false;", "predicates": "Predicates represent a slice of predicates to select ManagedClusters. The predicates are ORed.", "prioritizerPolicy": "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.", + "spreadPolicy": "SpreadPolicy defines how placement decisions should be distributed among a set of ManagedClusters.", "tolerations": "Tolerations are applied to placements, and allow (but do not require) the managed clusters with certain taints to be selected by placements with matching tolerations.", } @@ -199,7 +200,7 @@ func (PrioritizerPolicy) SwaggerDoc() map[string]string { var map_ScoreCoordinate = map[string]string{ "": "ScoreCoordinate represents the configuration of the score type and score source", "type": "Type defines the type of the prioritizer score. Type is either \"BuiltIn\", \"AddOn\" or \"\", where \"\" is \"BuiltIn\" by default. When the type is \"BuiltIn\", need to specify a BuiltIn prioritizer name in BuiltIn. When the type is \"AddOn\", need to configure the score source in AddOn.", - "builtIn": "BuiltIn defines the name of a BuiltIn prioritizer. Below are the valid BuiltIn prioritizer 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.", + "builtIn": "BuiltIn defines the name of a BuiltIn prioritizer. Below are the valid BuiltIn prioritizer 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. 4) Spread: spread the workload evenly to topologies.", "addOn": "When type is \"AddOn\", AddOn defines the resource name and score name.", } @@ -207,6 +208,27 @@ func (ScoreCoordinate) SwaggerDoc() map[string]string { return map_ScoreCoordinate } +var map_SpreadConstraintsTerm = map[string]string{ + "": "SpreadConstraintsTerm defines a terminology to spread placement decisions.", + "topologyKey": "TopologyKey is either a label key or a cluster claim name of ManagedClusters.", + "topologyKeyType": "TopologyKeyType indicates the type of TopologyKey. It could be Label or Claim.", + "maxSkew": "MaxSkew represents the degree to which the workload may be unevenly distributed. Skew is the maximum difference between the number of selected ManagedClusters in a topology and the global minimum. The global minimum is the minimum number of selected ManagedClusters for the topologies within the same TopologyKey. The minimum possible value of MaxSkew is 1, and the default value is 1.", + "whenUnsatisfiable": "WhenUnsatisfiable represents the action of the scheduler when MaxSkew cannot be satisfied. It could be DoNotSchedule or ScheduleAnyway. The default value is ScheduleAnyway. DoNotSchedule instructs the scheduler not to schedule more ManagedClusters when MaxSkew is not satisfied. ScheduleAnyway instructs the scheduler to keep scheduling even if MaxSkew is not satisfied.", +} + +func (SpreadConstraintsTerm) SwaggerDoc() map[string]string { + return map_SpreadConstraintsTerm +} + +var map_SpreadPolicy = map[string]string{ + "": "SpreadPolicy defines how the placement decision should be spread among the ManagedClusters.", + "spreadConstraints": "SpreadConstraints defines how the placement decision should be distributed among a set of ManagedClusters. The importance of the SpreadConstraintsTerms follows the natural order of their index in the slice. The scheduler first consider SpreadConstraintsTerms with smaller index then those with larger index to distribute the placement decision.", +} + +func (SpreadPolicy) SwaggerDoc() map[string]string { + return map_SpreadPolicy +} + var map_Toleration = map[string]string{ "": "Toleration represents the toleration object that can be attached to a placement. The placement this Toleration is attached to tolerates any taint that matches the triple using the matching operator .", "key": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", diff --git a/vendor/open-cluster-management.io/api/cluster/v1beta2/0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml b/vendor/open-cluster-management.io/api/cluster/v1beta2/0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml index 8eeb1233f..3f601df4d 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1beta2/0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml +++ b/vendor/open-cluster-management.io/api/cluster/v1beta2/0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml @@ -31,7 +31,7 @@ spec: status: {} "schema": "openAPIV3Schema": - description: "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 \n 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." + description: "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 \n 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." type: object properties: apiVersion: @@ -154,7 +154,7 @@ spec: status: {} "schema": "openAPIV3Schema": - description: "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 \n 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." + description: "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 \n 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." type: object properties: apiVersion: diff --git a/vendor/open-cluster-management.io/api/cluster/v1beta2/types_managedclusterset.go b/vendor/open-cluster-management.io/api/cluster/v1beta2/types_managedclusterset.go index ce8e93bc0..ff43f9b79 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1beta2/types_managedclusterset.go +++ b/vendor/open-cluster-management.io/api/cluster/v1beta2/types_managedclusterset.go @@ -4,7 +4,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -//ExclusiveClusterSetLabel LabelKey +// ExclusiveClusterSetLabel LabelKey const ClusterSetLabel = "cluster.open-cluster-management.io/clusterset" // +genclient @@ -18,9 +18,9 @@ const ClusterSetLabel = "cluster.open-cluster-management.io/clusterset" // 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 +// 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. diff --git a/vendor/open-cluster-management.io/api/cluster/v1beta2/zz_generated.swagger_doc_generated.go b/vendor/open-cluster-management.io/api/cluster/v1beta2/zz_generated.swagger_doc_generated.go index e5bdb6868..33ff38168 100644 --- a/vendor/open-cluster-management.io/api/cluster/v1beta2/zz_generated.swagger_doc_generated.go +++ b/vendor/open-cluster-management.io/api/cluster/v1beta2/zz_generated.swagger_doc_generated.go @@ -22,7 +22,7 @@ func (ManagedClusterSelector) SwaggerDoc() map[string]string { } var map_ManagedClusterSet = map[string]string{ - "": "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:\n 1. The workload can run on any ManagedCluster in the ManagedClusterSet\n 2. The workload cannot run on any ManagedCluster outside the ManagedClusterSet\n 3. The service exposed by the workload can be shared in any ManagedCluster in the ManagedClusterSet\n\nIn 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.", + "": "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:\n 1. The workload can run on any ManagedCluster in the ManagedClusterSet\n 2. The workload cannot run on any ManagedCluster outside the ManagedClusterSet\n 3. The service exposed by the workload can be shared in any ManagedCluster in the ManagedClusterSet\n\nIn 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.", "spec": "Spec defines the attributes of the ManagedClusterSet", "status": "Status represents the current status of the ManagedClusterSet", }