Skip to content

fix(operator): Normalize GMS ResourceClaimTemplate names - #9829

Merged
julienmancuso merged 1 commit into
mainfrom
jsm/fix-6198276
May 21, 2026
Merged

fix(operator): Normalize GMS ResourceClaimTemplate names#9829
julienmancuso merged 1 commit into
mainfrom
jsm/fix-6198276

Conversation

@julienmancuso

@julienmancuso julienmancuso commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Normalize inter-pod GMS ResourceClaimTemplate names with the existing Kubernetes resource-name helper.

Dynamo logical component/service names can be CamelCase, for example VllmWorker, but Grove uses the generated GMS ResourceClaimTemplate/resourceSharing name when creating PCSG-level ResourceClaim objects. Kubernetes validates ResourceClaim.metadata.name as a lowercase DNS-1123 subdomain, so the previous VllmWorker-gpu-rank-0 name caused Grove reconciliation to fail.

This change routes the GMS RCT name through NormalizeKubeResourceName, so the template and matching resourceSharing reference are both generated as vllmworker-gpu-rank-0.

Validation

  • Added coverage for CamelCase service names in gmsRCTName
  • Added DNS-1123 validation for generated GMS ResourceClaimTemplate names
  • Added DNS-1123 validation for generated GMS resourceSharing names
  • Ran go test ./internal/dynamo -run 'TestGms' -count=1
  • Ran go test ./internal/dynamo -count=1

Closes DYN-3083


Open in Devin Review

Summary by CodeRabbit

  • Bug Fixes
    • Fixed resource claim template naming to follow DNS-1123 subdomain validation standards. Service identifiers are now properly normalized before template name generation, improving Kubernetes compliance. This ensures resource names are valid and consistent across cluster deployments, with added validation checks confirming naming standards are met.

Review Change Stack

@julienmancuso
julienmancuso requested a review from a team as a code owner May 21, 2026 16:42
@github-actions github-actions Bot added fix deployment::k8s Relates to dynamo deployment in kubernetes labels May 21, 2026
@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This PR normalizes Kubernetes service names in GMS (GPU Memory Sharing) ResourceClaimTemplate naming. The gmsRCTName function now applies NormalizeKubeResourceName to sanitize input service names before building resource names, ensuring compliance with DNS1123 subdomain constraints. Tests are updated to validate the normalized naming behavior.

Changes

GMS Resource Name Normalization

Layer / File(s) Summary
Name normalization in gmsRCTName
deploy/operator/internal/dynamo/failover.go
gmsRCTName applies NormalizeKubeResourceName to the input serviceName before building the deterministic ResourceClaimTemplate name prefix.
Test updates for normalized naming
deploy/operator/internal/dynamo/failover_test.go
Tests import Kubernetes validation utilities and are updated to expect normalized service names (vllmworker-gpu-rank-0 instead of svc-gpu-rank-0) across gmsRCTName, gmsResourceClaimTemplateConfigs, and gmsResourceSharingEntries function calls, with DNS1123-subdomain validation assertions added.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: normalizing GMS ResourceClaimTemplate names to comply with Kubernetes DNS-1123 subdomain requirements.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description comprehensively covers the problem, solution, validation approach, and includes clear details about files changed and the related issue.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@julienmancuso
julienmancuso merged commit 6eac489 into main May 21, 2026
67 checks passed
@julienmancuso
julienmancuso deleted the jsm/fix-6198276 branch May 21, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployment::k8s Relates to dynamo deployment in kubernetes fix size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants