Skip to content

Static IP, IPv6 and MAC addresses with Podman >=4.0.0 #445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 18, 2025

Conversation

tgross
Copy link
Member

@tgross tgross commented Jun 17, 2025

This PR addresses rebases #359 and addresses review comments. We'd left the PR open for quite some time and don't want to make the original author come back to fix it now, and permissions on the author's fork don't allow me to push to it. I've retained the original commit and authorship of @zandeez, of course. Original PR description below:


Resolve #293 and #358 adding ipv6_address, ipv4_address, static_ips and static_mac options for podman tasks.

Podman API version checks whether to set the properties directly or whether to use the new PerNetworkOptions framework.

ipv6_address and ipv4_address are provided for backwards compatibility, and for compatibility with docker. For Podman 4.0.0 these are merged into static_ips and sent as a PerNetorkOptions entry for the default network. Added API version
check, static mac support, new array-based option for static IPs to match the podman API

Fixes: #293
Fixes: #358

@tgross tgross force-pushed the f-support-static-ip branch from 0cc7b18 to a3b99c1 Compare June 17, 2025 14:54
@tgross tgross requested a review from mismithhisler June 17, 2025 15:03
@tgross tgross marked this pull request as ready for review June 17, 2025 15:03
@tgross tgross requested a review from a team as a code owner June 17, 2025 15:03
Resolve #293 and #358 adding ipv6_address, ipv4_address, static_ips and
static_mac options for podman tasks.

Podman API version checks whether to set the properties directly or whether to
use the new PerNetworkOptions framework.

ipv6_address and ipv4_address are provided for backwards compatibility, and for
compatibility with docker. For Podman 4.0.0 these are merged into static_ips and
sent as a PerNetorkOptions entry for the default network.  Added API version
check, static mac support, new array-based option for static IPs to match the
podman API

Fixes: #293
Fixes: #358
@tgross tgross force-pushed the f-support-static-ip branch from a3b99c1 to 10e0a2b Compare June 17, 2025 19:19
@tgross tgross force-pushed the f-support-static-ip branch from 10e0a2b to 6bbb6c7 Compare June 17, 2025 19:23
Copy link
Member

@mismithhisler mismithhisler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tgross tgross merged commit ba0dcc5 into main Jun 18, 2025
10 of 12 checks passed
@tgross tgross deleted the f-support-static-ip branch June 18, 2025 13:15
@zandeez
Copy link

zandeez commented Jun 19, 2025

Evening, thanks for getting this PR through. I haven't looked properly at the comments on my PR but not being overly familiar with go definitely appreciate the work done to get this feature over the line. ☺️

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.

Feature: Add Static IP Address Support Feature: Add mac_address parameter
3 participants