Skip to content

Commit f6f24af

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

File tree

1 file changed

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

1 file changed

+140
-2
lines changed

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

Lines changed: 140 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,12 +524,150 @@ 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+
All clusterProfile API MUST have this property. It is a list of the url that can reach the api-server of the k8s cluster
541+
* It could contain IP addresses too
542+
543+
Here is an example of a cluster-endpoints.k8s.io ClusterProperty
544+
```yaml
545+
apiVersion: about.k8s.io/v1
546+
kind: ClusterProperty
547+
metadata:
548+
name: cluster-endpoints.k8s.io
549+
labels:
550+
multicluster.x-k8s.io/clusterProfile: “true”
551+
spec:
552+
value: ["100.3.3.4:5683","qs-oar7gr9p.azmk8s.io:443"]
553+
```
554+
Here is the corresponding ClusterProfile API
555+
```yaml
556+
properties:
557+
- name: cluster-endpoints.k8s.io
558+
value: ["100.3.3.4:5683","qs-oar7gr9p.azmk8s.io:443"]
559+
```
560+
561+
##### location.topology.k8s.io
562+
It contains the location of the k8s cluster
563+
* It could be a country, region, zone, or any other location information
564+
* It is immutable
565+
566+
Here is an example of a location.topology.k8s.io ClusterProperty
567+
```yaml
568+
apiVersion: about.k8s.io/v1
569+
kind: ClusterProperty
570+
metadata:
571+
name: location.topology.k8s.io
572+
labels:
573+
multicluster.x-k8s.io/clusterProfile: “true”
574+
Spec:
575+
value: cloud.google/us-east1
576+
```
577+
Here is the corresponding ClusterProfile API
578+
```yaml
579+
properties:
580+
- name: location.topology.k8s.io
581+
value: cloud.google/us-east1
582+
```
583+
584+
##### count.node.k8s.io
585+
It contains the total number of nodes in the k8s clusters
586+
* The value is dynamic but not changing fast.
587+
588+
Here is an example of a count.node.k8s.io ClusterProperty
589+
```yaml
590+
apiVersion: about.k8s.io/v1
591+
kind: ClusterProperty
592+
metadata:
593+
name: count.node.k8s.io
594+
labels:
595+
multicluster.x-k8s.io/clusterProfile: “true”
596+
Spec:
597+
value: 120
598+
```
599+
Here is the corresponding ClusterProfile API
600+
```yaml
601+
properties:
602+
- name: count.node.k8s.io
603+
value: 120
604+
```
605+
606+
##### type.node.k8s.io
607+
It contains the list of type of node in the k8s clusters
608+
* The list is dynamic but does not change much unless there is a node auto provisioner.
609+
610+
Here is an example of a type.node.k8s.io ClusterProperty
611+
```yaml
612+
apiVersion: about.k8s.io/v1
613+
kind: ClusterProperty
614+
metadata:
615+
name: type.node.k8s.io
616+
labels:
617+
multicluster.x-k8s.io/clusterProfile: “true”
618+
Spec:
619+
value: ["g6.xlarge","Standard_NC48ads_H100","m3-ultramem-32","largeCPU","smallMem"]
620+
```
621+
Here is the corresponding ClusterProfile API
622+
```yaml
623+
properties:
624+
- name: type.node.k8s.io
625+
value: ["g6.xlarge","Standard_NC48ads_H100","m3-ultramem-32","largeCPU","smallMem"]
626+
```
627+
##### metrics-endpoints.k8s.io
628+
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
629+
* It could contain IP addresses too
630+
* The list is dynamic but should not change much.
631+
632+
Here is an example of a metrics-endpoints.k8s.io ClusterProperty
633+
```yaml
634+
apiVersion: about.k8s.io/v1
635+
kind: ClusterProperty
636+
metadata:
637+
name: metrics-endpoints.k8s.io
638+
labels:
639+
multicluster.x-k8s.io/clusterProfile: “true”
640+
Spec:
641+
value: [{"Prometheus":"100.3.3.4:9990"}, {"Grafana":"example.grafana.io:9990"}]
642+
```
643+
Here is the corresponding ClusterProfile API
644+
```yaml
645+
properties:
646+
- name: metrics-endpoints.k8s.io
647+
value: [{"Prometheus":"100.3.3.4:9990"}, {"Grafana":"example.grafana.io:9990"}]
648+
```
649+
650+
##### group.customResource.k8s.io
651+
It contains an array of custom resources definitions (CRDs) group that this cluster supports.
652+
* The list is dynamic but should not change much.
653+
654+
Here is an example of a group.customResource.k8s.io ClusterProperty
655+
```yaml
656+
apiVersion: about.k8s.io/v1
657+
kind: ClusterProperty
658+
metadata:
659+
name: group.customResource.k8s.io
660+
labels:
661+
multicluster.x-k8s.io/clusterProfile: “true”
662+
Spec:
663+
value: ["argoproj.io","kubeflow.org","istio.io","volcano.sh"]
664+
```
665+
Here is the corresponding ClusterProfile API
666+
```yaml
667+
properties:
668+
- name: group.customResource.k8s.io
669+
value: ["argoproj.io","kubeflow.org","istio.io","volcano.sh"]
670+
```
533671
#### Conditions
534672
535673
Record cluster’s healthiness condition and easy to extend, conforming to

0 commit comments

Comments
 (0)