Skip to content

馃悰 Do not set HostPorts when DisableHostNetwork is true - #833

Open
dtantsur wants to merge 1 commit into
metal3-io:mainfrom
dtantsur:no-hostport
Open

馃悰 Do not set HostPorts when DisableHostNetwork is true#833
dtantsur wants to merge 1 commit into
metal3-io:mainfrom
dtantsur:no-hostport

Conversation

@dtantsur

Copy link
Copy Markdown
Member

Refresh existing unit tests to be more meaningful and also cover Ports.

Signed-off-by: Dmitry Tantsur dtantsur@protonmail.com

Refresh existing unit tests to be more meaningful and also cover Ports.

Signed-off-by: Dmitry Tantsur <dtantsur@protonmail.com>
@metal3-io-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tuminoid for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dtantsur
dtantsur requested a balanced review from Copilot August 31, 2026 15:33
@metal3-io-bot metal3-io-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Prevents HostPort assignment when host networking is disabled while preserving container ports and defaults.

Changes:

  • Centralizes conditional HostPort construction.
  • Adds fallback port defaults.
  • Expands unit tests for TLS, custom ports, and disabled host networking.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/ironic/containers.go Updates port construction and fallback defaults.
pkg/ironic/containers_test.go Expands pod port and environment tests.

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants