Skip to content

Conversation

@caseydavenport
Copy link
Member

@caseydavenport caseydavenport commented Jan 7, 2026

Description

This PR makes it easier to switch to nftables mode on a live system, by having each node capable of auto-detecting whether to use iptables or nftables based on the local kube-proxy.

Related issues/PRs

Todos

  • Tests
  • Documentation
  • Release note

Release Note

Support auto-detection of nftables or iptables based on kube-proxy configuration. 

Reminder for the reviewer

Make sure that this PR has the correct labels and milestone set.

Every PR needs one docs-* label.

  • docs-pr-required: This change requires a change to the documentation that has not been completed yet.
  • docs-completed: This change has all necessary documentation completed.
  • docs-not-required: This change has no user-facing impact and requires no docs.

Every PR needs one release-note-* label.

  • release-note-required: This PR has user-facing changes. Most PRs should have this label.
  • release-note-not-required: This PR has no user-facing changes.

Other optional labels:

  • cherry-pick-candidate: This PR should be cherry-picked to an earlier release. For bug fixes only.
  • needs-operator-pr: This PR is related to install and requires a corresponding change to the operator.

Copilot AI review requested due to automatic review settings January 7, 2026 19:34
@caseydavenport caseydavenport requested a review from a team as a code owner January 7, 2026 19:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds auto-detection of nftables mode for Felix by detecting whether kube-proxy is running in nftables mode. The key changes include:

  • Adds "Auto" as a new NFTablesMode option alongside "Enabled" and "Disabled"
  • Changes the default from "Disabled" to "Auto"
  • Implements kube-proxy nftables mode detection by checking for the kube-proxy nftables table
  • Refactors rule rendering to separate the boolean nft flag from the string configuration value

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
api/pkg/apis/projectcalico/v3/felixconfig.go Adds NFTablesModeAuto constant and updates kubebuilder validation enum
api/pkg/openapi/generated.openapi.go Updates OpenAPI schema description to reflect new "Auto" default
manifests/*.yaml Updates all CRD manifests to include "Auto" enum value and change default to "Auto"
libcalico-go/config/crd/crd.projectcalico.org_felixconfigurations.yaml Updates FelixConfiguration CRD with new enum and default
felix/rules/rule_defs.go Changes NFTables config field from bool to string, adds nft bool field to renderer, updates NewRenderer signature
felix/rules/policy.go Replaces r.NFTables with r.nft for chain name generation
felix/rules/endpoints.go Replaces r.NFTables with r.nft throughout endpoint rendering
felix/rules/dispatch.go Replaces r.NFTables with r.nft in dispatch chain logic
felix/dataplane/driver.go Passes NFTablesMode string value instead of boolean
felix/dataplane/linux/int_dataplane.go Implements kubeProxyNftablesFn for detection, useNftables decision function, and checkKubeProxyNftablesMode for runtime detection
felix/docs/config-params.md Updates documentation to show "Auto" option and new default (incomplete)
felix/docs/config-params.json Updates JSON schema to include "Auto" enum value
.semaphore/semaphore.yml Generated CI file updated with new file path patterns

@caseydavenport caseydavenport force-pushed the casey-nft-auto-detect branch 4 times, most recently from ed37371 to 93d50f6 Compare January 7, 2026 23:55
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