Skip to content

Commit 0204d7e

Browse files
authored
Merge pull request #22 from zhiying-lin/profile-doc
Add clusterProfile docs
2 parents e4d326b + 25d4bdd commit 0204d7e

File tree

5 files changed

+68
-2
lines changed

5 files changed

+68
-2
lines changed

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ nav:
3939
About API Overview: concepts/about-api.md
4040
Multicluster Services API Overview: concepts/multicluster-services-api.md
4141
Work API Overview: concepts/work-api.md
42+
ClusterProfile API Overview: concepts/cluster-profile-api.md
4243
- Guides:
4344
- Index: guides/index.md
4445
- Implementation Guidelines: guides/guidelines.md
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# ClusterProfile API Overview
2+
3+
This document provides an overview of the [ClusterProfile API](https://github.com/kubernetes-sigs/cluster-inventory-api?tab=readme-ov-file#cluster-profile-api).
4+
5+
![Alt](../images/cluster-profile-api.png "ClusterProfile API")
6+
7+
A Cluster Profile is a namespace-level resource and essentially represents an individual member of the Cluster Inventory
8+
that details properties and status of a cluster. This API proposes a standardized interface that defines how cluster information should be presented
9+
and interacted with across different platforms and implementations.
10+
11+
You can read more details about the API in the [KEP-4322](https://github.com/kubernetes/enhancements/blob/master/keps/sig-multicluster/4322-cluster-inventory/README.md).
12+
13+
## Terminology
14+
15+
- **Cluster Inventory**: A conceptual term referring to a collection of clusters. A cluster inventory may or may not represent
16+
a [ClusterSet](../api-types/cluster-set.md). A cluster inventory is considered a clusterSet if all its member clusters adhere to the
17+
[namespace sameness](https://github.com/kubernetes/community/blob/master/sig-multicluster/namespace-sameness-position-statement.md) principle.
18+
19+
- **Cluster Manager**: An entity that creates the ClusterProfile API object per member cluster,
20+
and keeps their status up-to-date. Each cluster manager MUST be identified with a unique name.
21+
Each ClusterProfile resource SHOULD be managed by only one cluster manager. A cluster manager SHOULD
22+
have sufficient permission to access the member cluster to fetch the information so it can update the status
23+
of the ClusterProfile API resource.
24+
25+
- **ClusterProfile API Consumer**: the person running the cluster managers
26+
or the person developing extensions for cluster managers for the purpose of
27+
workload distribution, operation management etc.
28+
29+
## API Example
30+
31+
[CRD definition](https://github.com/kubernetes-sigs/cluster-inventory-api/blob/main/config/crd/bases/multicluster.x-k8s.io_clusterprofiles.yaml)
32+
33+
```yaml
34+
apiVersion: multicluster.x-k8s.io/v1alpha1
35+
kind: ClusterProfile
36+
metadata:
37+
name: some-cluster-name
38+
namespace: fleet-system
39+
labels:
40+
x-k8s.io/cluster-manager: some-cluster-manager
41+
spec:
42+
displayName: some-cluster
43+
clusterManager:
44+
name: some-cluster-manager
45+
status:
46+
version:
47+
kubernetes: 1.28.0
48+
properties:
49+
- name: clusterset.k8s.io
50+
value: some-clusterset
51+
- name: location
52+
value: apac
53+
conditions:
54+
- type: ControlPlaneHealthy
55+
status: True
56+
lastTransitionTime: "2023-05-08T07:56:55Z"
57+
message: ""
58+
- type: Joined
59+
status: True
60+
lastTransitionTime: "2023-05-08T07:58:55Z"
61+
message: ""
62+
```

site-src/contributing/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Bug reports should be filed as Github Issues on their respective subproject repo
1414
* [Open an issue for a bug with the About API][about-api-issues]
1515
* [Open an issue for a bug with the MCS API][mcs-api-issues]
1616
* [Open an issue for a bug with the Work API][work-api-issues]
17+
* [Open an issue for a bug with the ClusterProfile API][clusterprofile-api-issues]
1718

1819
**NOTE**: If you're reporting a bug that applies to a specific implementation of
1920
a SIG-MC sponsored API and not the API specification itself, please check our
@@ -22,6 +23,7 @@ you can get help with your specific implementation.
2223
[about-api-issues]: https://github.com/kubernetes-sigs/about-api/issues
2324
[mcs-api-issues]: https://github.com/kubernetes-sigs/mcs-api/issues
2425
[work-api-issues]: https://github.com/kubernetes-sigs/work-api/issues
26+
[clusterprofile-api-issues]: https://github.com/kubernetes-sigs/cluster-inventory-api/issues
2527
[implementations]: ../guides/index.md
2628

2729
## Communications
185 KB
Loading

site-src/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,18 @@ The following charter defines the scope and governance of the [Multicluster Spec
5050

5151
## Approach
5252

53-
To meet the goals listed above, the SIG-Multicluster team has worked to define three different APIs:
53+
To meet the goals listed above, the SIG-Multicluster team has worked to define four different APIs:
5454

5555
* [About API][about-api-reference]: allows to uniquely identify clusters within a set of clusters ([clusterset][clusterset-definition])
5656
* [Multicluster Services API][mc-api-reference]: allows to expose services across clusters which are part of a given [clusterset][clusterset-definition].
5757
* [Work API][work-api-reference]: allows to define the workloads to be deployed across clusters which are part of a given [clusterset][clusterset-definition].
58-
* [ClusterInventory API](https://github.com/kubernetes/enhancements/pull/4323/): simplifies the discovery and management of clusters, offering a comprehensive status overview for both applications and human operators. Work in progress.
58+
* [ClusterProfile API][clusterprofile-reference]: simplifies the discovery and management of clusters, offering a comprehensive status overview for both applications and human operators.
5959

6060
[about-api-reference]: ./concepts/about-api.md
6161
[mc-api-reference]: ./concepts/multicluster-services-api.md
6262
[work-api-reference]: ./concepts/work-api.md
6363
[clusterset-definition]: ./api-types/cluster-set.md
64+
[clusterprofile-reference]: ./concepts/cluster-profile-api.md
6465

6566
To leave room for implementation, SIG-Multicluster does not focus on the implementation of the mechanisms that rely on those APIs. For example, no reference implementation is provided for a cluster registry or for service discovery itself.
6667

0 commit comments

Comments
 (0)