Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopting a Standardized ClusterInventory API from SIG Multi-Cluster #721

Open
dixudx opened this issue Aug 3, 2023 · 1 comment
Open
Labels
kind/feature New feature or request

Comments

@dixudx
Copy link
Member

dixudx commented Aug 3, 2023

What would you like to be added:

kind/feature

Why is this needed:

Currently Clusternet is using a self-defined CRD ManagedCluster to declare a cluster, including cluster ID, labels, access point, status, etc. This CRD is used for cluster managements and multiple cluster scheduling.

While this kind of cluster definitions can be seen and needed in multiple projects. They have much in common, but they are not interactable. It makes harder for Clusternet itself to be compatible with other Kubernetes tools and services, such as Argo, Flux, etc. Also other projects are not easy to directly integrate with Clusternet via a common and standardized API.

Once sig multi-cluster has reached an agreement on below ClusterInventory API, Clusternet would like to adopt and migrate to it.

apiVersion: multicluster.x-k8s.io/v1alpha1
kind: ClusterInventory
metadata:
 name: some-cluster
spec:
 accessObjectRefs: # optional object points to the resource that declares how to access the cluster
 - group: someGroup
   resource: someResource
   name: someName
   namespace: someNamespace
   type: KUBECONFIG
 taints:
   - key: key1
     value: value1
     effect: NoSchedule
     addTime: xxx
 healthinessProbe:
   heartbeatIntervalSeconds: 60
status:
 version:
   kubernetes: 1.26.1
 resources: # total resources of a cluster
   capacity:
     cpu: 12
     memory: 12Gi
   allocatable:
     cpu: 10
     memory: 16Gi
 properties:
   - name: clusterset.k8s.io
     value: some-clusterset
 conditions:
   - type: Healthy
     status: True
     lastTransitionTime: "2023-05-08T07:58:55Z"
     message: ""

Since this ClusterInventory API has much in common with our current ManagedCluster, there won't be too many inconsistencies with current working flows in Clusternet.

@dixudx dixudx added the kind/feature New feature or request label Aug 3, 2023
@lmxia
Copy link
Contributor

lmxia commented Aug 3, 2023

That‘s much reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants