fix: normalize Cluster label to lowercase - #2713
Open
Baran-Aksoy wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues liées
Issues numéro: #2712
Quel est le comportement actuel ?
Le champ
labeld'unClusterest validé avec une regex insensible à la casse (/^[a-z0-9-]+$/i), donc la Console accepte des majuscules dans le nom d'un cluster sans avertissement. Celabelest ensuite réutilisé tel quel comme nom de ressource Kubernetes dans le chartdso-argocd-zone(VaultStaticSecret), qui doit respecter la RFC 1123 (minuscules uniquement).Résultat : le sync ArgoCD échoue silencieusement avec une erreur peu explicite, bien après la création du cluster, sans lien évident avec la cause pour l'utilisateur.
Quel est le nouveau comportement ?
Ajout d'un
.transform(value => value.toLowerCase())surCleanedClusterSchema.label(packages/shared/src/schemas/cluster.ts) — le nom saisi est normalisé en minuscules à la validation, avant d'être stocké/réutilisé.Cette PR introduit-elle un breaking change ?
Non
Autres informations
Il est aussi possible d'inciter l'utisateur à enregistrer avec tout en miniscule. Faite moi savoir si cette option est plus interessante.