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

ClusterReport/ClusterSummary name #118

Open
gianlucam76 opened this issue Jan 18, 2023 · 0 comments
Open

ClusterReport/ClusterSummary name #118

gianlucam76 opened this issue Jan 18, 2023 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@gianlucam76
Copy link
Member

gianlucam76 commented Jan 18, 2023

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.

@gianlucam76 gianlucam76 added the help wanted Extra attention is needed label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant