Open
Description
Currently ClusterReport name is
func getClusterReportName(clusterProfileName, clusterName string, clusterType libsveltosv1alpha1.ClusterType) string {
// TODO: shorten this value
return clusterProfileName + "--" + strings.ToLower(string(clusterType)) + "--" + clusterName
}
and ClusterSummary name is
func GetClusterSummaryName(clusterProfileName, clusterName string, isSveltosCluster bool) string {
prefix := "capi"
if isSveltosCluster {
prefix = "sveltos"
}
return fmt.Sprintf("%s-%s-%s", clusterProfileName, prefix, clusterName)
}
which might end up exceeding maximum name length.
Describe the solution you'd like
Implement a solution to shorten that making sure no collision ever happens (when pod starts we can fetch all existing ClusterSummary/ClusterReports).
Also, given a clusterProfile and a cluster name, there needs to be a way to get corresponding ClusterReport (which can likely be achieved using labels) and ClusterSummary.