Commit Graph

2244 Commits

Author SHA1 Message Date
Daman Arora
6971779d0d pkg/proxy/conntrack: refactor log levels for conntrack cleanup
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-02-07 15:35:26 +05:30
Kubernetes Prow Robot
45d0fddaf1 Merge pull request #128971 from aojea/servicecidr_ga
KEP-1880 Multiple Service CIDRs: Graduate to GA
2025-01-22 11:12:44 -08:00
Kubernetes Prow Robot
3a4c2a0bbb Merge pull request #129271 from aroradaman/dual_stack_healthz
Dual stack healthz server
2025-01-20 07:32:42 -08:00
Antonio Ojea
e340a07ccf update kube-proxy 2025-01-20 13:01:53 +00:00
Daman Arora
271b8cf1c1 kube-proxy healthz handler ip family aware
Signed-off-by: Daman Arora <aroradaman@gmail.com>
Co-authored-by: Antonio Ojea <aojea@google.com>
2025-01-15 23:41:08 +05:30
olderTaoist
561c1d235a full sync per one hour with BFR 2025-01-14 09:24:38 +08:00
Daman Arora
3274dc40ed pkg/proxy/healthcheck: consolidate IsHealthy and isHealthy
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-01-11 15:20:31 +05:30
Daman Arora
1c1fc73616 pkg/proxy/healthcheck: enhance testing
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-01-11 15:20:31 +05:30
Daman Arora
64aac665fd pkg/proxy/healthcheck: bug fix for last updated time
The lastUpdated time returned by healthz call should be the latest
lastUpdated time among the proxiers. Prior to this commit, if proxy
is unhealthy, the returned lastUpdated time was lastUpdated time
of the unhealthy proxier.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-01-10 21:28:39 +05:30
Daman Arora
0645f0e50e pkg/proxy/healthcheck: file rename
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-01-08 17:40:42 +05:30
Daman Arora
d6c575532a pkg/proxy/healthcheck: rename 'proxier' to 'proxy'
KubeProxy operates with a single health server and two proxies,
one for each IP family. The use of the term 'proxier' in the
types and functions within pkg/proxy/healthcheck can be
misleading, as it may suggest the existence of two health
servers, one for each IP family.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2025-01-08 17:26:47 +05:30
changmin
19aef482fa fix incorrect variable reference in handleUpdateEndpointSlice 2024-12-17 15:06:04 +08:00
Dan Winship
f5969adb14 Clean up NewServiceChangeTracker/NewEndpointsChangeTracker args
Remove the now-unused event recorders, and put the remaining args into
a sensible order, and consistent between the two.
2024-12-14 12:12:42 -05:00
Dan Winship
79d1c078bb Make change trackers just ignore the "wrong" IP family
Dual-stack clusters exist; ServiceChangeTracker does not need to log
messages (even at V(4)) when it sees dual-stack Services, and
EndpointsChangeTracker does not need to emit Events(!) when it sees
EndpointSlices of the wrong AddressType.

(Though in most cases the EndpointsChangeTracker Events would not get
emitted anyway, since the MetaProxier would ensure that only the v4
tracker saw v4 slices, and only the v6 tracker saw v6 slices.)

Also remove a nil check labeled "This should never happen" which, in
fact, we know *didn't* happen, since the function has already
dereferenced the value before it checking it against nil.
2024-12-14 12:12:35 -05:00
Dan Winship
2c348bf186 Use a constructor properly in change tracker unit tests
newFakeProxier was inlining the details of NewEndpointsChangeTracker
so it could override trackerStartTime, but it would be better and more
future-proof to just call NewEndpointsChangeTracker normally and then
edit that one field.

(Also remove an unused FakeProxier field.)
2024-12-14 12:12:31 -05:00
Nadia Pinaeva
90e64a57c6 kube-proxy,nftables: add debug logging for failed transaction.
Use a rate limiter to avoid large output with a high rate.

Signed-off-by: Nadia Pinaeva <n.m.pinaeva@gmail.com>
2024-12-13 15:53:19 +01:00
Antonio Ojea
f93e6f3d3a kube-proxy implement dual stack metrics
Signed-off-by: Daman Arora <aroradaman@gmail.com>
Co-authored-by: Antonio Ojea <aojea@google.com>
2024-12-12 16:13:30 +05:30
Kubernetes Prow Robot
e8615e2712 Merge pull request #129054 from pohly/remove-import-name
remove import doc comments
2024-12-12 09:58:35 +01:00
Kubernetes Prow Robot
aa931aa635 Merge pull request #128929 from orange30/master
fix: kube-proxy EndpointSliceCache memory is leaked
2024-12-12 04:13:45 +00:00
Kubernetes Prow Robot
9c892ce3a3 Merge pull request #128833 from my-git9/deadcode-proxytil
proxy/util: remove unused function
2024-12-12 04:12:39 +00:00
Patrick Ohly
8a908e0c0b remove import doc comments
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:

- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.

This commit was generated with
   sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')

Everything was included, except for
   package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".
2024-12-02 16:59:34 +01:00
zhikuodu
3195883831 UnitTest: kube-proxy EndpointSliceCache cleared correctly
Signed-off-by: zhikuodu <duzhk@qq.com>
2024-11-26 10:36:02 +08:00
zhikuodu
78b440a74a Fixed: kube-proxy EndpointSliceCache memory is leaked
Signed-off-by: zhikuodu <duzhk@qq.com>
2024-11-26 10:21:33 +08:00
xin.li
36f9ee958e proxy/util: remove unused function
Signed-off-by: xin.li <xin.li@daocloud.io>
2024-11-18 19:40:52 +08:00
Dan Winship
49080bf02a Document the existence of nftables as a kube-proxy mode. 2024-11-12 09:51:52 -05:00
Daman Arora
6657d220d3 proxy: cleanup UpdateServiceMapResult
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-10-28 20:10:46 +05:30
Daman Arora
c398af07fa proxy: refactor UpdateEndpointsMapResult
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-10-28 20:10:34 +05:30
Daman Arora
1ad8880c0f proxy/conntrack: reconciler
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-10-28 20:08:53 +05:30
Daman Arora
ba3940c2e0 proxy/conntrack: interface update
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-10-28 20:08:53 +05:30
Daman Arora
0aa9dc84ab kube-proxy: use netutils.MultiListen for healthz and metrics server
Signed-off-by: Daman Arora <aroradaman@gmail.com>
(cherry picked from commit 7ce36f9bca)
2024-10-21 20:52:41 +05:30
Paco Xu
0e10a3a28c Revert "re: kube-proxy: internal config: refactor HealthzAddress and MetricsAddress " 2024-10-21 11:36:59 +08:00
Kubernetes Prow Robot
4d32d7e5ad Merge pull request #127930 from aroradaman/kube-proxy-refactor-healthz-metrics-address
re: kube-proxy: internal config: refactor HealthzAddress and MetricsAddress
2024-10-17 16:03:11 +01:00
Kubernetes Prow Robot
429edc5f25 Merge pull request #128060 from antoninbas/fix-typos-in-pkg/proxy/ipvs/ipset/ipset_test.go
Fix typos in pkg/proxy/ipvs/ipset/ipset_test.go
2024-10-14 22:02:21 +01:00
Antonin Bas
0350e5ae69 Fix typos in pkg/proxy/ipvs/ipset/ipset_test.go
There were a couple of typos in test error logs

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
2024-10-14 11:06:36 -07:00
Prince Pereira
3448455083 Replacing hcsshim library with new hnslib library. 2024-10-14 10:44:30 -07:00
Daman Arora
e63260082a kube-proxy: internal config: refactor Healthz and Metrics Address
Refactor Healthz with Metrics Address for internal configuration of
kube-proxy adhering to the v1alpha2 version specifications as detailed
in https://kep.k8s.io/784.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-10-14 22:56:23 +05:30
Daman Arora
48f1356b2f pkg/proxy: refactor NodePortAddresses to NodeAddressHandler
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-10-14 21:49:29 +05:30
Daman Arora
4f732a233d pkg/proxy/utils: file rename
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-10-14 21:31:39 +05:30
Aohan Yang
da5738d9aa Set feature gate emulation version during test 2024-10-10 19:26:31 +08:00
Daman Arora
7ce36f9bca kube-proxy: use netutils.MultiListen for healthz and metrics server
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-10-08 17:48:11 +05:30
Antonio Ojea
7c4c7b14b2 Revert "kube-proxy: internal config: refactor HealthzAddress and MetricsAddress " 2024-10-02 15:08:35 +02:00
Kubernetes Prow Robot
8539497010 Merge pull request #127780 from danwinship/deleted-udp-endpoints-fix
Fix deleted UDP endpoint detection
2024-10-01 22:06:02 +01:00
Kubernetes Prow Robot
98657377dc Merge pull request #126889 from aroradaman/kube-proxy-refactor-healthz-metrics-address
kube-proxy: internal config: refactor HealthzAddress and MetricsAddress
2024-10-01 14:45:49 +01:00
Dan Winship
65de5de81f Fix deleted UDP endpoint detection 2024-09-30 14:17:51 -04:00
Kubernetes Prow Robot
909f9b912e Merge pull request #127692 from mmorel-35/testifylint/expected-actual@k8s.io/kubernetes
fix: enable expected-actual rule from testifylint in module `k8s.io/kubernetes`
2024-09-28 05:54:01 +01:00
Matthieu MOREL
f736cca0e5 fix: enable expected-actual rule from testifylint in module k8s.io/kubernetes
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-27 07:56:31 +02:00
Matthieu MOREL
b7248077a9 fix: enable formatter rule from testifylint in module k8s.io/kubernetes
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-26 08:19:54 +02:00
Matthieu MOREL
27b98be303 fix: enable nil-compare and error-nil rules from testifylint in module k8s.io/kubernetes
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-25 06:02:47 +02:00
Daman Arora
3fe9ecd5af kube-proxy: internal config: refactor Healthz and Metrics Address
Refactor Healthz with Metrics Address for internal configuration of
kube-proxy adhering to the v1alpha2 version specifications as detailed
in https://kep.k8s.io/784.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-09-23 23:16:30 +05:30
Daman Arora
a3ad527ffd pkg/proxy: refactor npa.GetNodeIPs
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-09-23 23:04:42 +05:30