Skip to content

fix(binder): sanitize configmap volume names for dotted pod names#1728

Open
julsemaan wants to merge 2 commits into
kai-scheduler:mainfrom
julsemaan:fix/sharing-volume-dots
Open

fix(binder): sanitize configmap volume names for dotted pod names#1728
julsemaan wants to merge 2 commits into
kai-scheduler:mainfrom
julsemaan:fix/sharing-volume-dots

Conversation

@julsemaan

@julsemaan julsemaan commented Jun 19, 2026

Copy link
Copy Markdown

Description

When pods contain a dot in their name, the configmap created for gpu sharing also contains a dot.
Although the configmap name can contain a dot, the volumes in the pods cannot which generates invalid pods when KAI mutates them on admission to add the configmap as a volume to the pod

Example error this is fixing:

  Warning  FailedCreate      3m17s (x9 over 3m55s)  replicaset-controller  (combined from similar events): Error creating: Pod "vllm.openai-primary-575c9967bd-k9tc7" is invalid: spec.volumes[3].name: Invalid value: "vllm.openai-primary-575c9967bd-js7fbg8-shared-gpu-0-vol": must not contain dots

The solution is to replace all chars that are not valid DNS chars by - which will include dots and all other potential invalid chars

Related Issues

Fixes #1729

Checklist

Note: Ensure your PR title follows the Conventional Commits format (e.g., feat(scheduler): add new feature)

  • Self-reviewed
  • Added/updated tests (if needed)
  • Updated documentation (if needed) - no docs changes needed from what I saw as this is an internal change

Breaking Changes

I am not sure yet if this should be considered a breaking change, please advise

Additional Notes

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b76c96c3-4722-4883-b55a-1b68742421be

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@julsemaan julsemaan force-pushed the fix/sharing-volume-dots branch from 9885f57 to a2e2596 Compare June 19, 2026 19:41
@enoodle

enoodle commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

@julsemaan Thsnk you or the fix can you please add to the PR description of the solution?

@enoodle

enoodle commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@julsemaan julsemaan force-pushed the fix/sharing-volume-dots branch 2 times, most recently from 25681df to aeb9ef2 Compare June 19, 2026 19:53
@julsemaan

Copy link
Copy Markdown
Author

@julsemaan Thsnk you or the fix can you please add to the PR description of the solution?

@enoodle, thanks for triggering the review.

I fixed:

  • DCO
  • Changelog
  • PR description

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

Total coverage: 51.2% -> 51.0% (delta -0.20%)

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/kai-scheduler/KAI-scheduler/pkg/admission/webhook/v1alpha2/gpusharing 90.00% (ø)
github.com/kai-scheduler/KAI-scheduler/pkg/binder/common 16.16% (+2.76%) 👍
github.com/kai-scheduler/KAI-scheduler/pkg/binder/common/gpusharingconfigmap 71.95% (+25.04%) 🌟

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/kai-scheduler/KAI-scheduler/pkg/binder/common/gpusharingconfigmap/config_map.go 71.95% (+25.04%) 82 (+1) 59 (+21) 23 (-20) 🌟
github.com/kai-scheduler/KAI-scheduler/pkg/binder/common/volumes.go 78.57% (+11.90%) 14 (+2) 11 (+3) 3 (-1) 🎉

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/kai-scheduler/KAI-scheduler/pkg/admission/webhook/v1alpha2/gpusharing/gpu_sharing_test.go
  • github.com/kai-scheduler/KAI-scheduler/pkg/binder/common/gpusharingconfigmap/config_map_name_test.go
  • github.com/kai-scheduler/KAI-scheduler/pkg/binder/common/volumes_test.go

@enoodle

enoodle commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

@julsemaan Can you update the changelog file please?

Signed-off-by: Julien Semaan <jsemaan@kubex.ai>
@julsemaan julsemaan force-pushed the fix/sharing-volume-dots branch from aeb9ef2 to 536313d Compare June 22, 2026 11:53
@julsemaan

Copy link
Copy Markdown
Author

@enoodle, I forgot to force push 🙃, should be fine now

@julsemaan

Copy link
Copy Markdown
Author

@enoodle, it looks like FOSSA failed due to some network error, could you get it to run again 🙏

@julsemaan

Copy link
Copy Markdown
Author

@enoodle, looks like only approvals are missing and we are good to merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with pods containing a dot when GPU sharing is enabled

2 participants