You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the network_mode: 'service:xyz' is not supported, but network_mode: 'container:xyz' is.
The difference between the two:
* container: shares the networking stack and IP address of an existing container
* service: connects to the network of an existing service to enable communication, but containers maintain separate IP addresses and networking stacks
The service: network mode is useful for inter-container communication within a service. The container: mode can be used to join the networking namespace of an infrastructure container like a proxy or router to share its networking stack.
So service: keeps containers more isolated and portable, while container: ties them more directly to another container's network configuration.
I used the following patch to build the PKGBUILD with support for service:xyz and that seems to work.
diff --color --unified --recursive --text package.orig/podlet-0.2.2/src/cli/container/quadlet.rs package.new/podlet-0.2.2/src/cli/container/quadlet.rs
--- package.orig/podlet-0.2.2/src/cli/container/quadlet.rs 2023-12-16 00:32:56.000000000 +0100
+++ package.new/podlet-0.2.2/src/cli/container/quadlet.rs 2023-12-17 17:08:41.788103927 +0100
@@ -449,6 +449,7 @@
.map(|mode| match mode.as_str() {
"bridge" | "host" | "none" => Ok(mode),
s if s.starts_with("container") => Ok(mode),
+ s if s.starts_with("service") => Ok(mode),
_ => Err(eyre::eyre!("network_mode `{mode}` is unsupported")),
})
.transpose()?
which can be applied by adding the following to the PKGBUILD
As discussed in #39, I think the best way to handle the servicenetwork_mode is to provide a better error message suggesting the use of the containernetwork_mode and linking to the podman docs. Other suggestions are welcome.
- Support all `podman run --network` values for service `network_mode`
- Improve error message for unsupported values, link to the podman docs
Fixes: #38
Hi, thanks for your hard work on this!
I noticed that the
network_mode: 'service:xyz'
is not supported, butnetwork_mode: 'container:xyz'
is.The difference between the two:
The service: network mode is useful for inter-container communication within a service. The container: mode can be used to join the networking namespace of an infrastructure container like a proxy or router to share its networking stack.
So service: keeps containers more isolated and portable, while container: ties them more directly to another container's network configuration.
I used the following patch to build the PKGBUILD with support for
service:xyz
and that seems to work.which can be applied by adding the following to the PKGBUILD
I'll try to create a PR later
The text was updated successfully, but these errors were encountered: