Skip to content

Commit 5390b8a

Browse files
committed
add the clusterProfile property
1 parent 489c055 commit 5390b8a

File tree

1 file changed

+152
-2
lines changed
  • keps/sig-multicluster/4322-cluster-inventory

1 file changed

+152
-2
lines changed

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

Lines changed: 152 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,12 +524,162 @@ minimum kubelet version, maximum kubelet version, and enabled featureset version
524524

525525
#### Properties
526526

527-
Name/value pairs to represent properties of the clusters. It could be a
528-
collection of ClusterProperty resources, but could also be info based on
527+
Name/value pairs to represent properties of the clusters. One possible usage of properties is
528+
to help another controller to make workload orchestration decisions. They could be
529+
a set of [About-API](https://github.com/kubernetes/enhancements/tree/master/keps/sig-multicluster/2149-clusterid)
530+
ClusterProperty resources collected from the member clusters, but could also be info based on
529531
other implementations. The name of the cluster property can be predefined
530532
name from ClusterProperty resources and is allowed to be customized by
531533
different cluster managers.
532534

535+
For all the about-api ClusterProperty that clusterProfile would honor, it MUST have a label with key “multicluster.x-k8s.io/clusterProfile” and value of “true”.
536+
537+
Here are a few ClusterProperty that the clusterProfile API would also support.
538+
539+
##### cluster-endpoints.k8s.io
540+
It is a list of the url that can reach the api-server of the k8s cluster
541+
* All clusterProfile API implementation MUST have this property.
542+
* It could contain IP addresses too
543+
544+
Here is an example of a cluster-endpoints.k8s.io ClusterProperty
545+
```yaml
546+
apiVersion: about.k8s.io/v1
547+
kind: ClusterProperty
548+
metadata:
549+
name: cluster-endpoints.k8s.io
550+
labels:
551+
multicluster.x-k8s.io/clusterProfile: “true”
552+
spec:
553+
value: ["100.3.3.4:5683","qs-oar7gr9p.azmk8s.io:443"]
554+
```
555+
Here is the corresponding ClusterProfile API
556+
```yaml
557+
properties:
558+
- name: cluster-endpoints.k8s.io
559+
value: ["100.3.3.4:5683","qs-oar7gr9p.azmk8s.io:443"]
560+
```
561+
562+
##### location.topology.k8s.io
563+
It contains the location of the k8s cluster
564+
* It could be a country, region, zone, or any other location information
565+
* It is immutable
566+
567+
Here is an example of a location.topology.k8s.io ClusterProperty
568+
```yaml
569+
apiVersion: about.k8s.io/v1
570+
kind: ClusterProperty
571+
metadata:
572+
name: location.topology.k8s.io
573+
labels:
574+
multicluster.x-k8s.io/clusterProfile: “true”
575+
Spec:
576+
value: cloud.google/us-east1
577+
```
578+
Here is the corresponding ClusterProfile API
579+
```yaml
580+
properties:
581+
- name: location.topology.k8s.io
582+
value: cloud.google/us-east1
583+
```
584+
585+
##### count.node.k8s.io
586+
It contains the total number of nodes in the k8s clusters
587+
* The value is dynamic but not changing fast.
588+
589+
Here is an example of a count.node.k8s.io ClusterProperty
590+
```yaml
591+
apiVersion: about.k8s.io/v1
592+
kind: ClusterProperty
593+
metadata:
594+
name: count.node.k8s.io
595+
labels:
596+
multicluster.x-k8s.io/clusterProfile: “true”
597+
Spec:
598+
value: 120
599+
```
600+
Here is the corresponding ClusterProfile API
601+
```yaml
602+
properties:
603+
- name: count.node.k8s.io
604+
value: 120
605+
```
606+
607+
##### type.node.k8s.io
608+
It contains the list of type of node in the k8s clusters
609+
* The list is dynamic but does not change much unless there is a node auto provisioner.
610+
611+
Here is an example of a type.node.k8s.io ClusterProperty
612+
```yaml
613+
apiVersion: about.k8s.io/v1
614+
kind: ClusterProperty
615+
metadata:
616+
name: type.node.k8s.io
617+
labels:
618+
multicluster.x-k8s.io/clusterProfile: “true”
619+
Spec:
620+
value: ["g6.xlarge","Standard_NC48ads_H100","m3-ultramem-32","largeCPU","smallMem"]
621+
```
622+
Here is the corresponding ClusterProfile API
623+
```yaml
624+
properties:
625+
- name: type.node.k8s.io
626+
value: ["g6.xlarge","Standard_NC48ads_H100","m3-ultramem-32","largeCPU","smallMem"]
627+
```
628+
##### metrics-endpoints.k8s.io
629+
It contains an array of the type, url pair that one can query the metrics (for example, a Prometheus or Grafana endpoint for PromQL) of the cluster
630+
* It could contain IP addresses too
631+
* The list is dynamic but should not change much.
632+
633+
Here is an example of a metrics-endpoints.k8s.io ClusterProperty
634+
```yaml
635+
apiVersion: about.k8s.io/v1
636+
kind: ClusterProperty
637+
metadata:
638+
name: metrics-endpoints.k8s.io
639+
labels:
640+
multicluster.x-k8s.io/clusterProfile: “true”
641+
Spec:
642+
value: [{"Prometheus":"100.3.3.4:9990"}, {"Grafana":"example.grafana.io:9990"}]
643+
```
644+
Here is the corresponding ClusterProfile API
645+
```yaml
646+
properties:
647+
- name: metrics-endpoints.k8s.io
648+
value: [{"Prometheus":"100.3.3.4:9990"}, {"Grafana":"example.grafana.io:9990"}]
649+
```
650+
651+
##### group.customResource.k8s.io
652+
It contains an array of custom resources definitions (CRDs) group that this cluster supports.
653+
* The list is dynamic but should not change much.
654+
655+
Here is an example of a group.customResource.k8s.io ClusterProperty
656+
```yaml
657+
apiVersion: about.k8s.io/v1
658+
kind: ClusterProperty
659+
metadata:
660+
name: group.customResource.k8s.io
661+
labels:
662+
multicluster.x-k8s.io/clusterProfile: “true”
663+
Spec:
664+
value: ["argoproj.io","kubeflow.org","istio.io","volcano.sh"]
665+
```
666+
Here is the corresponding ClusterProfile API
667+
```yaml
668+
properties:
669+
- name: group.customResource.k8s.io
670+
value: ["argoproj.io","kubeflow.org","istio.io","volcano.sh"]
671+
```
672+
673+
###### Property Ladder
674+
This KEP does not mean to contain an exhaustive list of all the cluster properties the community will support. Thus, we want to lay out the process
675+
that a new property can be added to the list in the future. Here is what we propose
676+
1. A property is first implemented as an extension property which means there is no guarantee that the property will be supported by any cluster managers.
677+
2. The sponsor of the property brings up a discussion agenda with the use case and motivation of upgrading the extension property to a **standard** property in one of the multi-cluster SIG meetings.
678+
* The community can vote on the case and if it has over 66% of the vote, it becomes a standard property thus become part of the ClusterProfile API KEP.
679+
3. After a property becomes a standard for over 6 months, the SIG leads can have another vote to see if there is consensus to move a property to the **core** group
680+
which means every cluster manager that implements the ClusterProfile API must implement this property.
681+
682+
533683
#### Conditions
534684
535685
Record cluster’s healthiness condition and easy to extend, conforming to

0 commit comments

Comments
 (0)