Commit Graph

2351 Commits

Author SHA1 Message Date
galal-hussein
404ca964fe Ignore nfacct init error in kube-proxy
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2026-06-12 11:54:18 -03:00
Kubernetes Prow Robot
ddbb265c8c Merge pull request #138636 from aojea/automated-cherry-pick-of-#138571-upstream-release-1.35
Automated cherry pick of #138571: kube-proxy: don't do full periodic syncs on large cluster mode
2026-05-06 06:34:20 +05:30
Antonio Ojea
faa8112856 kube-proxy: don't do full periodic syncs on large cluster mode
Periodic full-syncs are just reconcile loops just in case somehow
the dataplane has drifted, however, they have an important cost on large
clusters.

We can avoid to perform full-sync if kube-proxy is in the "largecluster"
mode, we are already doing some optimization, so it is reasonable to
avoid the penalty of a full sync for a "just in case" operation.

Signed-off-by: Antonio Ojea <aojea@google.com>
2026-04-28 07:49:50 +00:00
Prince Pereira
943d941943 Delete remote endpoint if it has same ip as local endpoint in the system. 2026-04-26 09:54:46 +00:00
Prince Pereira
d550d458d3 Delete remote endpoint if it has same ip as local endpoint in the system. 2026-04-26 09:54:46 +00:00
Alessio Attilio
93de120edf pkg/proxy/nftables: fix kube-proxy crash with newer nftables versions
Fixes kube-proxy's nftables mode to work on systems with nft 1.1.3.
2026-03-17 08:05:07 -04:00
Prince Pereira
6d23c3f540 Fix for preferred dualstack and required dualstack in winkernel proxier. 2026-01-21 05:39:42 +00:00
Dan Winship
646e656a56 Switch ipvs and winkernel back to more regular forced syncs 2026-01-08 22:24:17 -05:00
Prince Pereira
a49bc6f2fb kube-proxy/winkernel: fix stale RemoteEndpoints due to premature clearing of terminatedEndpoints map. 2025-11-05 16:23:43 +00:00
Dan Winship
715228f478 Remove LoadBalancerIPMode feature gate 2025-10-24 09:12:03 -04:00
Kubernetes Prow Robot
6652c9fadf Merge pull request #134457 from danwinship/prefersamenode
KEP-3015: update PreferSameTrafficDistribution to GA
2025-10-23 14:41:33 -07:00
novahe
9d48e7d2d4 fix missing involvedObject.apiVersion in event 2025-10-22 20:13:36 +08:00
Dan Winship
02926c9563 Update PreferSameTrafficDistribution to GA 2025-10-14 08:20:43 -04:00
Kubernetes Prow Robot
9f40c6f62c Merge pull request #134137 from aditigupta96/refactor-core-waitfornamedcachesync
refactor: Use WaitForNamedCacheSyncWithContext in core components
2025-09-23 01:32:16 -07:00
Aditi Gupta
f44279647b refactor: Use WaitForNamedCacheSyncWithContext in core components
Signed-off-by: Aditi Gupta <aditigpta@google.com>
2025-09-18 11:34:28 -07:00
Dan Winship
f8bfcfc885 Drop utiliptables.NewDualStack()
The semantics (sometimes it returns an error that is really just a
warning) are too confusing, and it turns out that we really only need
it in one place (platformCheckSupported()); after that we've already
figured out what IP families are supported, so we could just use
utiliptables.NewBestEffort() instead, knowing we want exactly what it
returns.

So we can just expand the semantics of the old NewDualStack() inline
in the one place we care, without hiding any of it behind a
too-complicated return value.
2025-09-17 20:14:28 -04:00
Kubernetes Prow Robot
053267ad36 Merge pull request #134024 from jack4it/jack4it/iifname
fix: use iifname for input interface name matches
2025-09-16 15:28:17 -07:00
Jack Ma
b81e87c02f fix: use iifname for input interface name matches
add tests to cover nftables; also fix NewDetectLocalByBridgeInterface
2025-09-12 09:39:08 -07:00
Prince Pereira
c5882e38ff Fix ClusterIP load balancer disappearing when InternalTrafficPolicy: Local is set. 2025-09-08 22:30:36 -07:00
Kubernetes Prow Robot
1431873b84 Merge pull request #133603 from linux-on-ibm-z/kub-1.32.x-nfacct-testcase-fix
Fix nfacct test cases on s390x
2025-08-27 20:23:44 -07:00
saisindhuri91
3f5b678e98 Update nfacct_linux_test.go
Signed-off-by: saisindhuri91 <Sai.Sindhuri.Avulamanda@ibm.com>
2025-08-21 21:31:33 +05:30
Benjamin Elder
d3ba41467d set default log flush frequency in kube-proxy config validation tests 2025-08-14 18:16:15 -07:00
Dawei Wei
a806e069e2 Remove WinDSR feature gate unit test 2025-07-23 17:40:53 +00:00
Kubernetes Prow Robot
ce9ba81802 Merge pull request #133059 from danwinship/node-manager
kube-proxy node manager (take 2)
2025-07-21 20:36:27 -07:00
Dan Winship
facbb66142 Temporarily revert restart-on-node-IP-change behavior of proxy NodeManager 2025-07-21 17:00:45 -04:00
Daman Arora
e2d37f3cd7 kube-proxy: merge OnNodeAdd and OnNodeUpdate into OnNodeChange
For kube-proxy, node addition and node update is semantically
considered as similar event, we have exactly same handler
logic for these two events resulting in duplicate code and
unit tests.
This merges the `NodeHandler` interface methods OnNodeAdd and
OnNodeUpdate into OnNodeChange along with the implementation
of the interface.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-07-21 17:00:44 -04:00
Daman Arora
0dc51b16f9 kube-proxy: merge NodeEligibleHandler with NodeManager
ProxyHealthServer now consumes NodeManager to get the latest
updated node object for determining node eligibility.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
Co-authored-by: Dan Winship <danwinship@redhat.com>
2025-07-21 17:00:44 -04:00
Daman Arora
d4892fef76 kube-proxy: merge NodePodCIDRHandler with NodeManager
NodeManager, if configured with to watch for PodCIDR watch, watches
for changes in PodCIDRs and crashes kube-proxy if a change is
detected in PodCIDRs.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
Co-authored-by: Dan Winship <danwinship@redhat.com>
2025-07-21 17:00:44 -04:00
Daman Arora
373fb487f6 kube-proxy: add NodeManager to manage life-cycle based on NodeIPs
NodeManager initialises node informers, waits for cache sync and polls for
node object to retrieve NodeIPs, handle node events and crashes kube-proxy
when change in NodeIPs is detected.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
Co-authored-by: Dan Winship <danwinship@redhat.com>
2025-07-21 17:00:44 -04:00
Daman Arora
d21ca8674c kube-proxy: add NodeTopologyConfig for tracking topology labels
This simplifies how the proxier receives update for change in node
labels. Instead of passing the complete Node object we just pass
the proxy relevant topology labels extracted from the complete list
of labels, and the downstream event handlers will only be notified
when there are changes in topology labels.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-07-21 17:00:44 -04:00
Dan Winship
8acda3631f Belatedly add tests of proxy NodeConfig and ServiceCIDRConfig 2025-07-21 17:00:42 -04:00
roc
bfa33b18a0 fix(kube-proxy) avoid add zero-masked loadBalancerSourceRanges to ipset
Signed-off-by: roc <roc@imroc.cc>
2025-07-18 09:55:39 +08:00
Daman Arora
bc5088cbf3 Revert "Kube proxy node manager" 2025-07-15 19:34:05 +05:30
Daman Arora
46e2c22fd7 kube-proxy: merge OnNodeAdd and OnNodeUpdate into OnNodeChange
For kube-proxy, node addition and node update is semantically
considered as similar event, we have exactly same handler
logic for these two events resulting in duplicate code and
unit tests.
This merges the `NodeHandler` interface methods OnNodeAdd and
OnNodeUpdate into OnNodeChange along with the implementation
of the interface.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-07-11 23:06:44 +05:30
Daman Arora
fa9e466945 kube-proxy: merge NodeEligibleHandler with NodeManager
ProxyHealthServer now consumes NodeManager to get the latest
updated node object for determining node eligibility.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-07-11 23:06:44 +05:30
Daman Arora
c6735d9b3b kube-proxy: merge NodePodCIDRHandler with NodeManager
NodeManager, if configured with to watch for PodCIDR watch, watches
for changes in PodCIDRs and crashes kube-proxy if a change is
detected in PodCIDRs.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-07-11 23:06:44 +05:30
Daman Arora
c43104cbea kube-proxy: add NodeManager to manage life-cycle based on NodeIPs
NodeManager initialises node informers, waits for cache sync and polls for
node object to retrieve NodeIPs, handle node events and crashes kube-proxy
when change in NodeIPs is detected.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-07-11 21:48:52 +05:30
Daman Arora
af7abde0e5 kube-proxy: add NodeTopologyConfig for tracking topology labels
This simplifies how the proxier receives update for change in node
labels. Instead of passing the complete Node object we just pass
the proxy relevant topology labels extracted from the complete list
of labels, and the downstream event handlers will only be notified
when there are changes in topology labels.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-07-11 21:05:19 +05:30
Kubernetes Prow Robot
d269d10bfc Merge pull request #132647 from princepereira/ppereira-incorrect-internalport
Ensure Loadbalancer internal port is set to container port from endpointslice if the targetPort is not specified in service info creation.
2025-07-10 18:41:27 -07:00
Kubernetes Prow Robot
9538d53353 Merge pull request #132456 from aroradaman/nftables-etp-fix
nftables short-circuit local traffic to external addresses
2025-07-09 17:53:27 -07:00
Miles Bryant
1cec0acebf Short circuit CategorizeEndpoints when there are no endpoints
PR feedback
2025-07-08 11:14:08 +01:00
Miles Bryant
1ac5f661ed Don't log irrelevant zone hints message on no endpoints
Update pkg/proxy/topology.go

Co-authored-by: Dan Winship <danwinship@redhat.com>

Add unit test case
2025-07-04 11:10:55 +01:00
Kubernetes Prow Robot
c3b06a5366 Merge pull request #131615 from danwinship/proxy-bfr
update BoundedFrequencyRunner for kube-proxy
2025-07-01 09:21:24 -07:00
Antonio Ojea
459188ce25 Port BoundedFrequencyRunner from flowcontrol.RateLimiter to clock.Clock
Co-authored-by: Dan Winship <danwinship@redhat.com>
2025-07-01 08:54:14 -04:00
Dan Winship
eae17c21b0 Change how BoundedFrequencyRunner retries work
Rather than having a RetryAfter function, do a retry (at a fixed
interval) if the work function returns an error.

Co-authored-by: Antonio Ojea <aojea@google.com>
2025-07-01 08:54:14 -04:00
Dan Winship
c16ee887ef Remove burst syncs from BoundedFrequencyRunner
Burst syncs are theoretically useful for dealing with a single change
that results in multiple Run() calls (eg, a Service and EndpointSlice
both changing), but 2 isn't enough to cover all cases, and a better
way of dealing with this problem is to just use a smaller
minSyncPeriod.

Co-authored-by: Antonio Ojea <aojea@google.com>
2025-07-01 08:54:14 -04:00
Dan Winship
0298e04ea0 Updates to BoundedFrequencyRunner
- Use structured logging.
- Use t.Helper() in unit tests.
- Improve some comments.
- Remove an unnecessary check/panic.

Co-authored-by: Antonio Ojea <aojea@google.com>
2025-07-01 08:54:14 -04:00
Antonio Ojea
6da9d363f3 Copy BoundedFrequencyRunner to kube-proxy 2025-07-01 08:53:54 -04:00
Prince Pereira
d4e49b2eed Ensure Loadbalancer internal port is set to container port from endpointslice if the targetPort is not specified in service info creation. 2025-07-01 02:25:37 -07:00
Daman Arora
7e3945808d nftables: remove filter-output-post-dnat chain
With filter-output chain already operating with priority
post DNAT, we can merge both the chains together.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-06-23 18:12:13 +05:30