Skip to content

Allow to configure bridge-marker health port - #2833

Open
AKamyshnikova wants to merge 1 commit into
kubevirt:mainfrom
AKamyshnikova:br-marker-hp
Open

AKamyshnikova wants to merge 1 commit into
kubevirt:mainfrom
AKamyshnikova:br-marker-hp

Conversation

@AKamyshnikova

Copy link
Copy Markdown

Unittests added with Claude

Fixes: #2832

What this PR does / why we need it:
Adds a bridgeMarkerHealthPort field to the linuxBridge section of NetworkAddonsConfig, allowing users to override the default health probe port (8081) of the bridge-marker container. This is needed in environments where the default port conflicts with other workloads or is restricted by network policies. The port value is validated to be a valid integer in range [1, 65535]. When not set, the existing default is preserved for full backwards compatibility.

Special notes for your reviewer:
The bridge-marker container already supports the -health-probe-port flag (commit merged 9fe89af95800813048b6d4c3babd1fedd442dec8)— this change only exposes it through the operator API. Both the container port declaration and the CLI argument are templated from the same value to keep them in sync.

Release note:

Added optional `bridgeMarkerHealthPort` field to the `linuxBridge` spec, allowing users to configure a custom health probe port for the bridge-marker container. Defaults to `8081` if not set.

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Jun 23, 2026
@kubevirt-bot
kubevirt-bot requested review from phoracek and qinqon June 23, 2026 11:31
@kubevirt-bot

Copy link
Copy Markdown
Collaborator

[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 oshoval 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

@kubevirt-bot

Copy link
Copy Markdown
Collaborator

Hi @AKamyshnikova. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. and removed dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Jun 23, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a configurable health probe port for the linux-bridge marker container, defaulting to port 8081. This is implemented by adding a new BridgeMarkerHealthPort field to the LinuxBridge configuration, updating the CRD schema, and adding validation and rendering logic. The review feedback suggests changing the type of BridgeMarkerHealthPort from string to *int32 to align with standard Kubernetes API conventions, which would simplify the validation logic and CRD schema definition.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread pkg/apis/networkaddonsoperator/shared/networkaddonsconfig_types.go Outdated
Comment thread pkg/components/components.go
Comment thread pkg/network/cni/cni.go
Comment thread pkg/network/linux-bridge.go
Comment thread pkg/network/linux-bridge.go Outdated
Unittests added with Claude

Change-Id: I62bf66a5c7be923d848424559ad169c1e3aa788b
Signed-off-by: Ann Taraday <akamyshnikova@mirantis.com>
@sonarqubecloud

Copy link
Copy Markdown

@AKamyshnikova

Copy link
Copy Markdown
Author

@phoracek Hi! Could you take a look at this PR? This is a logical continuation for changes in bridge-marker.

@phoracek

Copy link
Copy Markdown
Member

@RamLavi @qinqon @oshoval would one of you please take this?

@oshoval

oshoval commented Jun 25, 2026 •

Copy link
Copy Markdown
Collaborator

Thanks for the PR, looks good overall
Please create a tag on https://github.com/kubevirt/bridge-marker
it will auto bump, and then we can continue, bumping shouldn't be done manually please

@oshoval

oshoval commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

i wonder if there is some port that we can use, which is pretty free, as default

@AKamyshnikova

AKamyshnikova commented Jun 26, 2026 •

Copy link
Copy Markdown
Author

@oshoval Got it! I will wait for bridge-marker tag.
@phoracek Could you create bridge-marker release already or is there a schedule?

@kubevirt-prow kubevirt-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 7, 2026
@kubevirt-prow

kubevirt-prow Bot commented Jul 7, 2026

Copy link
Copy Markdown

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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

Labels

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow configuring bridge-marker health probe port via NetworkAddonsConfig

4 participants