Add pesto support for dynamic port forwarding via pasta control socket#755
Open
Honny1 wants to merge 1 commit intocontainers:mainfrom
Open
Add pesto support for dynamic port forwarding via pasta control socket#755Honny1 wants to merge 1 commit intocontainers:mainfrom
pesto support for dynamic port forwarding via pasta control socket#755Honny1 wants to merge 1 commit intocontainers:mainfrom
Conversation
11 tasks
Honny1
commented
Apr 10, 2026
ca46ecb to
83c12a5
Compare
Fixes: https://redhat.atlassian.net/browse/RUN-2214 Fixes: containers/podman#8193 Fixes: https://redhat.atlassian.net/browse/RUN-3587 Signed-off-by: Jan Rodák <hony.com@seznam.cz>
baude
reviewed
Apr 13, 2026
| } | ||
|
|
||
| args := portMappingsToPestoArgs(ports) | ||
| args = append(args, socketPath) |
Member
Author
There was a problem hiding this comment.
No, it cannot be. It should be checked by the caller. Should I add a check to be sure?
baude
reviewed
Apr 13, 2026
| // does NOT perform DNAT to the container. Netavark handles that inside the | ||
| // netns. Therefore each mapping uses HostPort as both source and destination | ||
| // (e.g. "-t 0.0.0.0/8080") so traffic arrives at the port netavark expects. | ||
| func portMappingsToPestoArgs(ports []types.PortMapping) []string { |
Member
There was a problem hiding this comment.
does this func make sense if ports is empty? i think you will get something in args that is not expected?
Member
Author
There was a problem hiding this comment.
I think this makes sense. If no ports are specified, it will set -t none -u none, meaning no ports will be forwarded.
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.
pesto_linux.go) that invokes the pesto binary to dynamically update pasta's port forwarding table via a UNIX domain socket, enabling rootless bridge containers to add/remove port mappings without restarting pasta.-c <socketPath>to enable the pesto control channel and exposePestoSocketPathinRootlessNetnsInfo.Fixes: https://redhat.atlassian.net/browse/RUN-2214
Fixes: containers/podman#8193
Fixes: https://redhat.atlassian.net/browse/RUN-3587