You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[What's the relationship between the ClusterProfile API and Cluster Inventory?](#whats-the-relationship-between-the-clusterprofile-api-and-cluster-inventory)
93
+
-[What's the relationship between a cluster inventory and clusterSet?](#whats-the-relationship-between-a-cluster-inventory-and-clusterset)
94
+
-[How should the API be consumed?](#how-should-the-api-be-consumed)
95
+
-[How should we organize ClusterProfile objects on a hub cluster?](#how-should-we-organize-clusterprofile-objects-on-a-hub-cluster)
96
+
-[Uniqueness of the ClusterProfile object](#uniqueness-of-the-clusterprofile-object)
92
97
-[Risks and Mitigations](#risks-and-mitigations)
93
98
-[Design Details](#design-details)
94
99
-[Cluster Name](#cluster-name)
@@ -193,7 +198,8 @@ updates.
193
198
Currently, there is a lack of a standardized approach to define a
194
199
cluster inventory. However, with the growing number of users managing
195
200
multiple clusters and deploying applications across them, projects like
196
-
Open Cluster Management (OCM), Karmada, Clusternet, and Fleet Manager
[Clusternet](https://clusternet.io/), [Kubernetes Fleet Manager](https://github.com/Azure/fleet) or [Karmada](https://karmada.io/)
197
203
have emerged. This document introduces a proposal for a new universal
198
204
ClusterProfile API. The objective is to establish a shared interface
199
205
for cluster inventory, defining a standard for status reporting while
@@ -299,23 +305,21 @@ the API proposed by this KEP aims to
299
305
clusters under management.
300
306
301
307
### Terminology
308
+
-**Cluster Inventory**: A conceptual term referring to a collection of clusters.
302
309
303
-
-**Cluster Manager**: An entity that creates the ClusterProfile API
304
-
object per member cluster, and keeps their status up-to-date. Each
305
-
cluster manager SHOULD be identified with a unique name. Each cluster
306
-
profile resource SHOULD be managed by only one cluster manager. Examples
307
-
of cluster manager are projects like OCM, Karmada, Clusternet or Azure
308
-
fleet manager.
310
+
-**Member Cluster**: A kubernetes cluster that is part of a cluster inventory.
311
+
312
+
-**Cluster Manager**: An entity that creates the ClusterProfile API object per member cluster,
313
+
and keeps their status up-to-date. Each cluster manager MUST be identified with a unique name.
314
+
Each ClusterProfile resource SHOULD be managed by only one cluster manager. A cluster manager SHOULD
315
+
have sufficient permission to access the member cluster to fetch the information so it can update the status
316
+
of the ClusterProfile API resource. Examples of cluster manager are projects like [OCM](https://open-cluster-management.io/),
317
+
[Clusternet](https://clusternet.io/), [Kubernetes Fleet Manager](https://github.com/Azure/fleet) or [Karmada](https://karmada.io/).
309
318
310
319
-**ClusterProfile API Consumer**: the person running the cluster managers
311
320
or the person developing extensions for cluster managers for the purpose of
312
321
workload distribution, operation management etc.
313
322
314
-
-**Member Cluster**: A kubernetes cluster that is managed by the cluster
315
-
manager. A cluster manager SHOULD have sufficient permission to access
316
-
the member cluster to fetch the information so it can update the status
317
-
of the ClusterProfile API resource.
318
-
319
323
### User Stories (Optional)
320
324
321
325
<!--
@@ -379,14 +383,39 @@ command or function to work in the same way in another tool. This can
379
383
further enhance the usability and adoption of different cluster
380
384
manager.
381
385
382
-
### Notes/Constraints/Caveats (Optional)
386
+
### Notes/Constraints/Caveats
387
+
#### What's the relationship between the ClusterProfile API and Cluster Inventory?
388
+
The ClusterProfile API represents a single member cluster in a cluster inventory.
389
+
390
+
#### What's the relationship between a cluster inventory and clusterSet?
391
+
A cluster inventory may or may not represent a ClusterSet. A cluster inventory is considered a [clusterSet](https://github.com/kubernetes/enhancements/tree/master/keps/sig-multicluster/1645-multi-cluster-services-api#terminology)
392
+
if all its member clusters adhere to the [namespace sameness](https://github.com/kubernetes/community/blob/master/sig-multicluster/namespace-sameness-position-statement.md) principle.
393
+
In other terms, a clusterSet is a special type of cluster inventory while the reverse is not true.
394
+
Note that a cluster can only be in one ClusterSet while there is not such restriction for a cluster inventory.
395
+
396
+
#### How should the API be consumed?
397
+
We recommend that all ClusterProfile objects within the same cluster inventory reside on
398
+
a dedicated hub Kubernetes cluster. This approach allows consumers to have a single integration
399
+
point to access all the information within a cluster inventory. Additionally, a multi-cluster aware
400
+
controller can be run on the hub cluster to offer high-level functionalities over this inventory of clusters.
401
+
402
+
#### How should we organize ClusterProfile objects on a hub cluster?
403
+
While there are no strict requirements, we recommend making the ClusterProfile API a namespace-scoped object.
404
+
This approach allows users to leverage Kubernetes' native namespace-based RBAC if they wish to restrict access to
405
+
certain clusters within the inventory.
406
+
407
+
However, if a cluster inventory represents a ClusterSet, all its ClusterProfile objects MUST be part of the same clusterSet
408
+
and namespace must be used as the grouping mechanism. In addition, the namespace must have a label with the key "clusterset.multicluster.x-k8s.io"
409
+
and the value as the name of the clusterSet. It's important to note that this means users would lose the ability to apply Kubernetes'
410
+
native namespace-based RBAC within a clusterSet since Kubernetes does not support nested namespaces.
411
+
412
+
#### Uniqueness of the ClusterProfile object
413
+
While there are no strict requirements, we recommend that there is only one ClusterProfile object representing any member cluster
414
+
on a hub cluster.
415
+
416
+
However, a ClusterProfile object can only be in one ClusterSet since the namespace sameness property is transitive, therefore
417
+
it can only be in the namespace of that clusterSet if it is in a ClusterSet.
383
418
384
-
<!--
385
-
What are the caveats to the proposal?
386
-
What are some important details that didn't come across above?
387
-
Go in to as much detail as necessary here.
388
-
This might be a good place to talk about core concepts and how they relate.
0 commit comments