Skip to content

fix(compose): support explicit network names - #223

Open
x3ccd4828 wants to merge 1 commit into
containers:mainfrom
x3ccd4828:fix/compose-network-name
Open

fix(compose): support explicit network names#223
x3ccd4828 wants to merge 1 commit into
containers:mainfrom
x3ccd4828:fix/compose-network-name

Conversation

@x3ccd4828

Copy link
Copy Markdown

Summary

  • accept the Compose name field on top-level network definitions
  • emit the explicit name as NetworkName= in the generated Quadlet network unit
  • add regression coverage for the conversion

Why

Compose allows a network resource key and the created network's name to differ:

networks:
  backend:
    name: explicit-network-name

Podlet 0.3.2 currently rejects this input because the Quadlet network conversion classifies name as unsupported. Mapping it to NetworkName= preserves the resource key for the generated backend.network file and its container references while creating the Podman network with the requested explicit name.

This implements the behavior described in #21.

Validation

  • cargo fmt --verbose --check
  • cargo clippy -- -Dwarnings
  • cargo test --verbose (78 passed)
  • end-to-end Compose conversion confirmed Network=backend.network and NetworkName=explicit-network-name

@x3ccd4828
x3ccd4828 force-pushed the fix/compose-network-name branch 2 times, most recently from 1d1df01 to ea2a9f9 Compare July 28, 2026 19:56
@x3ccd4828
x3ccd4828 marked this pull request as ready for review July 28, 2026 19:57
Signed-off-by: Cristian Filipescu <filipescu.cristian@gmail.com>
@x3ccd4828
x3ccd4828 force-pushed the fix/compose-network-name branch from ea2a9f9 to a621d55 Compare July 28, 2026 19:59
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.

1 participant