Support publishing additional container ports in thv run#3892
Open
Sanskarzz wants to merge 4 commits intostacklok:mainfrom
Open
Support publishing additional container ports in thv run#3892Sanskarzz wants to merge 4 commits intostacklok:mainfrom
Sanskarzz wants to merge 4 commits intostacklok:mainfrom
Conversation
Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3892 +/- ##
==========================================
- Coverage 66.80% 66.76% -0.04%
==========================================
Files 444 444
Lines 44503 44550 +47
==========================================
+ Hits 29730 29744 +14
- Misses 12445 12474 +29
- Partials 2328 2332 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
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.
Fix: #3812
Summary
This PR adds support for the
--publish / -pflag to thethv runcommand, enabling users to expose arbitrary container ports to the host, similar todocker run -p. It also fixes a bug in the Docker runtime client where explicitly requested host ports were being overwritten by random ports.Key Changes
--publishflag tothv run.networking.ParsePortSpecfor robust port specification parsing.runtime.Setupto handle multiple port bindings efficiently.pkg/container/docker/client.goto respect existingHostPortassignments ingeneratePortBindings.