Skip to content

Commit 6f64800

Browse files
authored
Merge pull request kubernetes#4620 from ryanzhang-oss/kep4322-definition
KEP-4322: Add cluster inventory definition
2 parents 7836e05 + 02ec2c2 commit 6f64800

File tree

1 file changed

+46
-20
lines changed
  • keps/sig-multicluster/4322-cluster-inventory

1 file changed

+46
-20
lines changed

keps/sig-multicluster/4322-cluster-inventory/README.md

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,12 @@ tags, and then generate with `hack/update-toc.sh`.
8888
- [Story 1: Multicluster Workload Distribution](#story-1-multicluster-workload-distribution)
8989
- [Story 2: Operations and Management](#story-2-operations-and-management)
9090
- [Story 3: Transparent to Consumers](#story-3-transparent-to-consumers)
91-
- [Notes/Constraints/Caveats (Optional)](#notesconstraintscaveats-optional)
91+
- [Notes/Constraints/Caveats](#notesconstraintscaveats)
92+
- [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)
9297
- [Risks and Mitigations](#risks-and-mitigations)
9398
- [Design Details](#design-details)
9499
- [Cluster Name](#cluster-name)
@@ -193,7 +198,8 @@ updates.
193198
Currently, there is a lack of a standardized approach to define a
194199
cluster inventory. However, with the growing number of users managing
195200
multiple clusters and deploying applications across them, projects like
196-
Open Cluster Management (OCM), Karmada, Clusternet, and Fleet Manager
201+
[Open Cluster Management (OCM)](https://open-cluster-management.io/),
202+
[Clusternet](https://clusternet.io/), [Kubernetes Fleet Manager](https://github.com/Azure/fleet) or [Karmada](https://karmada.io/)
197203
have emerged. This document introduces a proposal for a new universal
198204
ClusterProfile API. The objective is to establish a shared interface
199205
for cluster inventory, defining a standard for status reporting while
@@ -299,23 +305,20 @@ the API proposed by this KEP aims to
299305
clusters under management.
300306

301307
### Terminology
308+
- **Cluster Inventory**: A conceptual term referring to a collection of clusters.
302309

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.
309317

310318
- **ClusterProfile API Consumer**: the person running the cluster managers
311319
or the person developing extensions for cluster managers for the purpose of
312320
workload distribution, operation management etc.
313321

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-
319322
### User Stories (Optional)
320323

321324
<!--
@@ -379,14 +382,37 @@ command or function to work in the same way in another tool. This can
379382
further enhance the usability and adoption of different cluster
380383
manager.
381384

382-
### Notes/Constraints/Caveats (Optional)
385+
### Notes/Constraints/Caveats
386+
#### What's the relationship between the ClusterProfile API and Cluster Inventory?
387+
The ClusterProfile API represents a single member cluster in a cluster inventory.
388+
389+
#### What's the relationship between a cluster inventory and clusterSet?
390+
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)
391+
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.
392+
Note that a cluster can only be in one ClusterSet while there is not such restriction for a cluster inventory.
393+
394+
#### How should the API be consumed?
395+
We recommend that all ClusterProfile objects within the same cluster inventory reside on
396+
a dedicated Kubernetes cluster (aka. the hub cluster). This approach allows consumers to have a single integration
397+
point to access all the information within a cluster inventory. Additionally, a multi-cluster aware
398+
controller can be run on the dedicated cluster to offer high-level functionalities over this inventory of clusters.
399+
400+
#### How should we organize ClusterProfile objects on a hub cluster?
401+
While there are no strict requirements, we recommend making the ClusterProfile API a namespace-scoped object.
402+
This approach allows users to leverage Kubernetes' native namespace-based RBAC if they wish to restrict access to
403+
certain clusters within the inventory.
404+
405+
However, if a cluster inventory represents a ClusterSet, all its ClusterProfile objects MUST be part of the same clusterSet
406+
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"
407+
and the value as the name of the clusterSet.
408+
409+
#### Uniqueness of the ClusterProfile object
410+
While there are no strict requirements, we recommend that there is only one ClusterProfile object representing any member cluster
411+
on a hub cluster.
412+
413+
However, a ClusterProfile object can only be in one ClusterSet since the namespace sameness property is transitive, therefore
414+
it can only be in the namespace of that clusterSet if it is in a ClusterSet.
383415

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.
389-
-->
390416

391417
### Risks and Mitigations
392418

0 commit comments

Comments
 (0)