|
| 1 | +# ClusterProfile API Overview |
| 2 | + |
| 3 | +This document provides an overview of the ClusterProfile (fka ClusterInventory) API. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +A Cluster Profile is essentially an individual member of the Cluster Inventory that details the properties and status of a cluster. |
| 8 | +This API proposes a universal, 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. |
| 16 | + |
| 17 | +- **Cluster Manager**: An entity that creates the ClusterProfile API object per member cluster, |
| 18 | + and keeps their status up-to-date. Each cluster manager MUST be identified with a unique name. |
| 19 | + Each ClusterProfile resource SHOULD be managed by only one cluster manager. A cluster manager SHOULD |
| 20 | + have sufficient permission to access the member cluster to fetch the information so it can update the status |
| 21 | + of the ClusterProfile API resource. |
| 22 | + |
| 23 | +- **ClusterProfile API Consumer**: the person running the cluster managers |
| 24 | + or the person developing extensions for cluster managers for the purpose of |
| 25 | + workload distribution, operation management etc. |
| 26 | + |
| 27 | +## API Example |
| 28 | + |
| 29 | +```yaml |
| 30 | +apiVersion: multicluster.x-k8s.io/v1alpha1 |
| 31 | +kind: ClusterProfile |
| 32 | +metadata: |
| 33 | + name: generated-cluster-name |
| 34 | + labels: |
| 35 | + x-k8s.io/cluster-manager: some-cluster-manager |
| 36 | +spec: |
| 37 | + displayName: some-cluster |
| 38 | + clusterManager: |
| 39 | + name: some-cluster-manager |
| 40 | +status: |
| 41 | + version: |
| 42 | + kubernetes: 1.28.0 |
| 43 | + properties: |
| 44 | + - name: clusterset.k8s.io |
| 45 | + value: some-clusterset |
| 46 | + - name: location |
| 47 | + value: apac |
| 48 | + conditions: |
| 49 | + - type: ControlPlaneHealthy |
| 50 | + status: True |
| 51 | + lastTransitionTime: "2023-05-08T07:56:55Z" |
| 52 | + message: "" |
| 53 | + - type: Joined |
| 54 | + status: True |
| 55 | + lastTransitionTime: "2023-05-08T07:58:55Z" |
| 56 | + message: "" |
| 57 | +``` |
0 commit comments