Pod name validation pgs#105
Merged
Merged
Conversation
renormalize
reviewed
Jul 11, 2025
renormalize
left a comment
Contributor
There was a problem hiding this comment.
Thanks @Ronkahn21 for the PR!
Most things look good, I just have a few nits here and there.
Tests all look great as well!
unmarshall
requested changes
Jul 11, 2025
986de2e to
bc54e66
Compare
- Implement validation for pod name length constraints (45 chars max) - Add separate validation for PodClique templates not in scaling groups - Ensure total pod names stay under 64 characters for annotation support - Add comprehensive test coverage for validation scenarios - Handle nil pointer cases and improve error messages Signed-off-by: Ron Kahn <rkahn@nvidia.com>
bc54e66 to
58fb776
Compare
Signed-off-by: Ron Kahn <rkahn@nvidia.com>
Signed-off-by: Ron Kahn <rkahn@nvidia.com>
renormalize
approved these changes
Jul 14, 2025
renormalize
left a comment
Contributor
There was a problem hiding this comment.
Just one nit that I've added. Will merge the PR into main once it is addressed. Thanks!
Comment on lines
+110
to
+111
| // Get all clique names that belong to scaling groups | ||
| scalingGroupCliqueNames := v.getScalingGroupCliqueNames() |
Contributor
There was a problem hiding this comment.
Can this be moved into v.validatePodCliqueTemplateSpec or validatePodCliqueNameConstraints, since the latter is the only place that this information is used? It would also make the function signature of validatePodCliqueTemplateSpec cleaner if it is.
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.
Summary
Changes
validatePodCliqueTemplatesfor PodCliques NOT in scaling groups (45-char limit: pgs-name + pclq-name)validateScalingGroupPodCliqueNamesfor PodCliques IN scaling groups (45-char limit: pgs-name + pcsg-name + pclq-name)Technical Details
Pod names follow different formats:
<pgs-name>-<pgs-index>-<pcsg-name>-<pcsg-index>-<pclq-name>-<random><pgs-name>-<pgs-index>-<pclq-name>-<random>The validation ensures: