Merge pull request #130401 from ryota-sakamoto/fix-nftables-skip-kernel-check

Fix kernel version check condition in nftables proxier
This commit is contained in:
Kubernetes Prow Robot 2025-02-27 18:50:36 -08:00 committed by GitHub
commit 60d0d67fef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -320,7 +320,7 @@ func getNFTablesInterface(ipFamily v1.IPFamily) (knftables.Interface, error) {
//
// However, we allow the user to bypass this check by setting
// `KUBE_PROXY_NFTABLES_SKIP_KERNEL_VERSION_CHECK` to anything non-empty.
if os.Getenv("KUBE_PROXY_NFTABLES_SKIP_KERNEL_VERSION_CHECK") != "" {
if os.Getenv("KUBE_PROXY_NFTABLES_SKIP_KERNEL_VERSION_CHECK") == "" {
kernelVersion, err := utilkernel.GetVersion()
if err != nil {
return nil, fmt.Errorf("could not check kernel version: %w", err)