Skip to content

Ensure google/nftables is only referenced on Linux - #45

Closed
skitt wants to merge 1 commit into
kubernetes-sigs:masterfrom
skitt:linux-only-nftables
Closed

skitt wants to merge 1 commit into
kubernetes-sigs:masterfrom
skitt:linux-only-nftables

Conversation

@skitt

@skitt skitt commented Jul 22, 2026

Copy link
Copy Markdown
Member

netlink is only supported on Linux, and google/nftables fails to even build on non-Linux platforms. To allow knftables-dependent projects to build on other platforms, this isolates the google/nftables package so that it's only needed in Linux builds.

@kubernetes-prow
kubernetes-prow Bot requested review from aojea and danwinship July 22, 2026 12:16
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 22, 2026

@soltysh soltysh 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.

/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 22, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: skitt, soltysh
Once this PR has been reviewed and has the lgtm label, please assign danwinship 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

netlink is only supported on Linux, and google/nftables fails to even
build on non-Linux platforms. To allow knftables-dependent projects to
build on other platforms, this isolates the google/nftables package so
that it's only needed in Linux builds.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
@skitt
skitt force-pushed the linux-only-nftables branch from c36b940 to d9cfe90 Compare July 22, 2026 12:36
@kubernetes-prow kubernetes-prow Bot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 22, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@danwinship

Copy link
Copy Markdown
Collaborator

The entire repo is linux-only. I'd like to avoid splitting out //go:build linux sub-files.

Does marking pkg/proxy/nftables/proxier.go in k/k as //go:build linux fix the problem?

@danwinship

danwinship commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

oh, presumably not, since it's already labeled that way...

@danwinship

Copy link
Copy Markdown
Collaborator

/close
wrong fix

@kubernetes-prow kubernetes-prow Bot closed this Jul 22, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

@danwinship: Closed this PR.

Details

In response to this:

/close
wrong fix

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.

@skitt
skitt deleted the linux-only-nftables branch July 22, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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