Skip to content

Commit 340745d

Browse files
ryanzhang-ossRyan Zhang
authored andcommitted
add cluster inventory definition
1 parent 178e7cb commit 340745d

File tree

1 file changed

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

1 file changed

+49
-20
lines changed

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

Lines changed: 49 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,21 @@ 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. 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/).
309318

310319
- **ClusterProfile API Consumer**: the person running the cluster managers
311320
or the person developing extensions for cluster managers for the purpose of
312321
workload distribution, operation management etc.
313322

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-
319323
### User Stories (Optional)
320324

321325
<!--
@@ -379,14 +383,39 @@ command or function to work in the same way in another tool. This can
379383
further enhance the usability and adoption of different cluster
380384
manager.
381385

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

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-
-->
390419

391420
### Risks and Mitigations
392421

0 commit comments

Comments
 (0)