cloud-bulldozer / go-commons

Code repository with all go common packages and libraries
Apache License 2.0
4 stars 9 forks source link

[RFE] Metadata collection #3

Closed rsevilla87 closed 1 year ago

rsevilla87 commented 1 year ago

As a next step to standardize our (golang based) tooling we should enable this project to collect OCP cluster metadata. So different go based tools such as k8s-netperf, kube-burner, ocm-api-load... can use it and index use the same format of cluster metadata.

We can use kube-burner's cluster metadata collection as a starting point.

https://github.com/cloud-bulldozer/kube-burner/blob/4a79917a0dcfb33063b2c965f47631f10f09dd6c/pkg/workloads/helpers.go#L60-L79

type clusterMetadata struct {
    MetricName       string                 `json:"metricName,omitempty"`
    UUID             string                 `json:"uuid"`
    Platform         string                 `json:"platform"`
    OCPVersion       string                 `json:"ocpVersion"`
    K8SVersion       string                 `json:"k8sVersion"`
    MasterNodesType  string                 `json:"masterNodesType"`
    WorkerNodesType  string                 `json:"workerNodesType"`
    InfraNodesType   string                 `json:"infraNodesType"`
    WorkerNodesCount int                    `json:"workerNodesCount"`
    InfraNodesCount  int                    `json:"infraNodesCount"`
    TotalNodes       int                    `json:"totalNodes"`
    SDNType          string                 `json:"sdnType"`
    Benchmark        string                 `json:"benchmark"`
    Timestamp        time.Time              `json:"timestamp"`
    EndDate          time.Time              `json:"endDate"`
    ClusterName      string                 `json:"clusterName"`
    Passed           bool                   `json:"passed"`
    Metadata         map[string]interface{} `json:"metadata,omitempty"`
}