enhancement: Remove spec level global storage dependency when rack level storage is used#440
enhancement: Remove spec level global storage dependency when rack level storage is used#440
Conversation
…vel storage is used [KO-481]
| // | ||
| // Note: revision character validity (IsDNS1123Label) is checked in | ||
| // validateRackConfig, which runs on both CREATE and UPDATE, because an | ||
| // invalid character would silently corrupt the StatefulSet name at runtime. |
There was a problem hiding this comment.
nit: These comments and comments on the func definition are kind of same/duplicate. Let's keep only the required comments here
| return fmt.Errorf( | ||
| "cluster %q: pod name %q (computed at max rack ID %d, revision length %d, max pod ordinal %d) "+ | ||
| "exceeds the maximum DNS label length of %d characters; "+ | ||
| "shorten the cluster name or rack revision", | ||
| cluster.Name, worstCasePodName, asdbv1.MaxRackID, maxPlaceholderLen, |
There was a problem hiding this comment.
I'm not sure if adding info like worstCasePodName with "aaa", "1000000" and "255" in error response will be useful for the user. I think this will confuse the user more as none of these values are inputs for the user.
Can we rephrase in a way where a user understands exactly what needs to be done
| return fmt.Errorf( | ||
| "pod name %q exceeds the maximum DNS label length of %d characters", | ||
| longestPodName, k8svalidation.DNS1123LabelMaxLength) |
There was a problem hiding this comment.
Here the longestPodName might not be actually present in the cluster, so will be difficult for a user to understand where it's coming from.
Can we rephrase to convey something like the rackConfig/szie results in new pods names that will exceed the DNS label length
No description provided.