Skip to content

Add labels to cluster installation for external-dns ingress handling#1101

Merged
stafot merged 2 commits intomasterfrom
CLD-9019
Mar 28, 2025
Merged

Add labels to cluster installation for external-dns ingress handling#1101
stafot merged 2 commits intomasterfrom
CLD-9019

Conversation

@stafot
Copy link
Copy Markdown
Contributor

@stafot stafot commented Mar 20, 2025

Summary

CLD-9019: Add labels to cluster installation for external-dns ingress handling

Ticket Link

https://mattermost.atlassian.net/browse/CLD-9019

Release Note

Add labels to cluster installation for external-dns ingress handling

@mm-cloud-bot mm-cloud-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Mar 20, 2025
@stafot stafot marked this pull request as draft March 20, 2025 13:52
@stafot stafot requested a review from gabrieljackson March 20, 2025 15:10
@stafot stafot added 2: Dev Review Requires review by a developer 2: Infra Review Requires review by a SRE labels Mar 20, 2025
@stafot stafot requested a review from toninis March 20, 2025 15:10
@stafot stafot marked this pull request as ready for review March 20, 2025 15:10
return map[string]string{
"installation-id": installation.ID,
"cluster-installation-id": clusterInstallation.ID,
"dns": strings.TrimSuffix(clusterInstallation.ClusterID, "-public"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ClusterIDs should only ever be our standard 26 char IDs. Is there a reason we expect this suffix to exist?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gabrieljackson Added this suffix mostly for sanity reasons to know that these ingreses will be handled by our public external DNS we will have a different one for the private DNSes we are using but for this we don't need any provisioner code changes as it affects only argo utilities

@stafot stafot marked this pull request as draft March 21, 2025 17:15
…ling

Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com>
@stafot stafot marked this pull request as ready for review March 22, 2025 08:12
Comment on lines +1087 to +1089
if cluster != nil && cluster.Name != "" {
labels["dns"] = cluster.Name + "-public"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cluster name is a value we can change at any time and was originally meant as a way to give a cluster a short description that is helpful to us. I just want to check that this is indeed the value we will want to use for external DNS as we will need to be careful to not change it once set.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gabrieljackson the problem that leads me to adopt this solution is that argoCD doesn't have the provisioner cluster id but has provisioner cluster name as info that can use in labelling @andrleite can provide more context if needed to why I was forced to this solution which was not preferred by me too

@stafot stafot added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a developer 2: Infra Review Requires review by a SRE labels Mar 28, 2025
@stafot stafot merged commit d5a6407 into master Mar 28, 2025
5 checks passed
@stafot stafot deleted the CLD-9019 branch March 28, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4: Reviews Complete All reviewers have approved the pull request release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants