Commit Graph

1573 Commits

Author SHA1 Message Date
Khaled Henidak (Kal)
a53e2eaeab
move IPv6DualStack feature to stable. (#104691)
* kube-proxy

* endpoints controller

* app: kube-controller-manager

* app: cloud-controller-manager

* kubelet

* app: api-server

* node utils + registry/strategy

* api: validation (comment removal)

* api:pod strategy (util pkg)

* api: docs

* core: integration testing

* kubeadm: change feature gate to GA

* service registry and rest stack

* move feature to GA

* generated
2021-09-24 16:30:22 -07:00
Khaled (Kal) Henidak
59dd238fd4 mute unnecessary logs 2021-09-23 20:52:18 +00:00
jyz0309
e9abf3dfc6 remove spew
Signed-off-by: jyz0309 <45495947@qq.com>

remove spew

Signed-off-by: jyz0309 <45495947@qq.com>

remove LogJson

Signed-off-by: jyz0309 <45495947@qq.com>

change name

Signed-off-by: jyz0309 <45495947@qq.com>

remove spew

Signed-off-by: jyz0309 <45495947@qq.com>
2021-09-23 17:20:34 +08:00
jyz0309
c0e0fae775 fix error
Signed-off-by: jyz0309 <45495947@qq.com>

use InfoS handle json

Signed-off-by: jyz0309 <45495947@qq.com>

remove import

Signed-off-by: jyz0309 <45495947@qq.com>

fix comment

Signed-off-by: jyz0309 <45495947@qq.com>
2021-09-23 17:15:18 +08:00
jyz0309
a0fd52b6e1 fix log error
Signed-off-by: jyz0309 <45495947@qq.com>

fix conflict

Signed-off-by: jyz0309 <45495947@qq.com>

format code

Signed-off-by: jyz0309 <45495947@qq.com>
2021-09-23 17:15:18 +08:00
Daniel Canter
ce52f70c66 Replace custom dualstack support logic in Windows Kube-proxy
Due to an incorrect version range definition in hcsshim for dualstack
support, the Windows kubeproxy had to define it's own version range logic
to check if dualstack was supported on the host. This was remedied in hcsshim
(https://github.com/microsoft/hcsshim/pull/1003) and this work has been vendored into
K8s as well (https://github.com/kubernetes/kubernetes/pull/104880). This
change simply makes use of the now correct version range to check if dualstack
is supported, and gets rid of the old custom logic.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2021-09-22 13:07:38 -07:00
Kubernetes Prow Robot
acbeaf8b8e
Merge pull request #104944 from jyz0309/migrate-log
Migrate `cmd/proxy/{config, healthcheck, winkernel}` to structured logging
2021-09-20 15:02:37 -07:00
Pritish Samal
060f5b88d0
Migrate pkg/proxy/util to structured logging (#104908)
* Migrate to Structured Logs in `pkg/proxy/util`

* Minor fixes

* change key to cidr and remove namespace arg

* Update key from cidr to CIDR

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>

* Update key cidr to CIDR

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>

* Update key ip to IP

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>

* Update key ip to IP

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>

* Interchange svcNamespace and svcName

* Change first letter of all messages to capital

* Change key names in endpoints.go

* Change all keynames to lower bumby caps convention

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>
2021-09-20 13:54:35 -07:00
Kubernetes Prow Robot
353f0a5eab
Merge pull request #105095 from wojtek-t/migrate_clock_3
Unify towards k8s.io/utils/clock - part 3
2021-09-20 12:46:45 -07:00
jyz0309
5d32be4126 fix type check
Signed-off-by: jyz0309 <45495947@qq.com>
2021-09-20 19:42:15 +08:00
jyz0309
6344d6b26d rebuild msg and rename namespace
Signed-off-by: jyz0309 <45495947@qq.com>
2021-09-20 19:04:21 +08:00
Shivanshu Raj Shrivastava
bbd809cbd0
Fixing incorrectly migrated structured logs (#105122)
* added keys for structured logging

* used KObj
2021-09-19 12:28:08 -07:00
wojtekt
d9b08c611d Migrate to k8s.io/utils/clock 2021-09-17 15:19:08 +02:00
Kubernetes Prow Robot
cb2ea4bf7c
Merge pull request #101161 from rikatz/move-sysctl-util
Move node and networking related helpers from pkg/util to component helpers
2021-09-17 02:11:00 -07:00
Ricardo Pchevuzinske Katz
37d11bcdaf Move node and networking related helpers from pkg/util to component helpers
Signed-off-by: Ricardo Katz <rkatz@vmware.com>
2021-09-16 17:00:19 -03:00
Shivanshu Raj Shrivastava
f06ce08d63
Migrated pkg/proxy/winuserspace to structured logging (#105035)
* migrated roundrobin.go

* migrated proxysocket.go

* used KRef in service
2021-09-16 11:36:02 -07:00
jyz0309
615c69643b migrate to struct log for proxy
Signed-off-by: jyz0309 <45495947@qq.com>

remove useless str

Signed-off-by: jyz0309 <45495947@qq.com>

fix comment

Signed-off-by: jyz0309 <45495947@qq.com>

fix comment

Signed-off-by: jyz0309 <45495947@qq.com>
2021-09-16 18:01:22 +08:00
Alkaid
5449ce7c5c
Migrate cmd/proxy/app and pkg/proxy/meta_proxier to structured logging (#104928)
* migrate log

Signed-off-by: jyz0309 <45495947@qq.com>

* remove useless change

Signed-off-by: jyz0309 <45495947@qq.com>

fix comment

Signed-off-by: jyz0309 <45495947@qq.com>

fix comment

Signed-off-by: jyz0309 <45495947@qq.com>

* use nil to instead err

Signed-off-by: jyz0309 <45495947@qq.com>

* fix comment

Signed-off-by: jyz0309 <45495947@qq.com>

* remove useless change

Signed-off-by: jyz0309 <45495947@qq.com>

* resolve conflict

Signed-off-by: jyz0309 <45495947@qq.com>

* resolve conflict

Signed-off-by: jyz0309 <45495947@qq.com>

* fix comment

Signed-off-by: jyz0309 <45495947@qq.com>

* fix comment

Signed-off-by: jyz0309 <45495947@qq.com>

* fix comment

Signed-off-by: jyz0309 <45495947@qq.com>
2021-09-14 20:50:40 -07:00
Kubernetes Prow Robot
648559b63e
Merge pull request #104742 from khenidak/health-check-port
change health-check port to listen to node port addresses
2021-09-13 15:43:52 -07:00
Kubernetes Prow Robot
31befb684c
Merge pull request #104801 from danwinship/drop-endpoints-handler
Drop broken/no-op proxyconfig.EndpointsHandler implementations
2021-09-13 12:16:02 -07:00
Khaled (Kal) Henidak
acdf50fbed change proxiers to pass nodePortAddresses 2021-09-13 18:27:07 +00:00
Khaled (Kal) Henidak
784c31cca1 change health checkport to listen to node port addresses 2021-09-13 18:27:06 +00:00
Shivanshu Raj Shrivastava
4916b6cd74
Migrated pkg/proxy/userspace to structured logging (#104931)
* migrated roundrobin.go

* migrated proxysocket.go

* fixed typo

* code formatting
2021-09-13 10:46:18 -07:00
Dan Winship
7f6fbc4482 Drop broken/no-op proxyconfig.EndpointsHandler implementations
Because the proxy.Provider interface included
proxyconfig.EndpointsHandler, all the backends needed to
implement its methods. But iptables, ipvs, and winkernel implemented
them as no-ops, and metaproxier had an implementation that wouldn't
actually work (because it couldn't handle Services with no active
Endpoints).

Since Endpoints processing in kube-proxy is deprecated (and can't be
re-enabled unless you're using a backend that doesn't support
EndpointSlice), remove proxyconfig.EndpointsHandler from the
definition of proxy.Provider and drop all the useless implementations.
2021-09-13 09:32:38 -04:00
Kubernetes Prow Robot
a402f1753c
Merge pull request #104756 from tnqn/ipvs-sctp-masquerade
Fix client IP preservation for NodePort service with protocol SCTP
2021-09-09 15:34:56 -07:00
Quan Tian
9ee3ae748b Fix client IP preservation for NodePort service with protocol SCTP
The iptables rule that matches kubeNodePortLocalSetSCTP must be inserted
before the one matches kubeNodePortSetSCTP, otherwise all SCTP traffic
would be masqueraded regardless of whether its ExternalTrafficPolicy is
Local or not.

To cover the case in tests, the patch adds rule order validation to
checkIptables.
2021-09-06 18:54:35 +08:00
Kubernetes Prow Robot
d3621ae008
Merge pull request #101303 from wangyx1992/capatial-log-proxy
cleanup: fix errors in wrapped format and log capitalization in proxy
2021-09-03 10:01:50 -07:00
Kubernetes Prow Robot
571a3f6f2f
Merge pull request #103896 from july2993/read
Remove wrong comment
2021-09-02 21:27:49 -07:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
Lars Ekman
25453708ea Remove pkg/utils/slice from kube-proxy 2021-08-19 06:48:27 +02:00
Kubernetes Prow Robot
a779c58b16
Merge pull request #104330 from liggitt/defaulter-package
Change defaulter-gen input to package import path
2021-08-17 11:42:18 -07:00
Kubernetes Prow Robot
cbb5ea8210
Merge pull request #101399 from wangyx1992/error-punctuation
cleanup: fix errors ending with punctuation in proxy
2021-08-16 00:51:46 -07:00
Jordan Liggitt
87a4e082ac Change defaulter-gen input to package path 2021-08-14 11:00:18 -04:00
Antonio Ojea
a2a22903bc delete stale UDP conntrack entries for loadbalancer IPs 2021-07-29 17:35:07 +02:00
Jiahao Huang
ee1bec1e6a Remove wrong comment
It does not assume proxier.mu is held because it locks it at the first
line.
2021-07-25 14:19:11 +08:00
Kubernetes Prow Robot
76b0906136
Merge pull request #101047 from jsturtevant/issue-100966-dualstack-windows
[sig-windows] update winkernel to only use dualstack if the node and config supports it
2021-07-15 20:30:09 -07:00
James Sturtevant
d5d9327351 Only use dualstack if the node and config supports it 2021-07-08 11:39:20 -07:00
Lars Ekman
b6b3a69284 Don't set sysctl net.ipv4.vs.conn_reuse_mode for kernels >=5.9 2021-07-08 09:41:12 +02:00
Kubernetes Prow Robot
8fb777efb0
Merge pull request #103451 from swetharepakula/ga-proxy-gates
Graduate EndpointSliceProxying and WindowsEndpointSliceProxying Gates
2021-07-07 18:09:13 -07:00
Swetha Repakula
0a42f7b989 Graduate EndpointSliceProxying and WindowsEndpointSliceProxying Gates 2021-07-07 13:33:30 -07:00
Akihiro Suda
192790c52f
kube-proxy: allow running in userns
Ignore an error during setting RLIMIT_NOFILE.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-07 14:23:31 +09:00
Andrew Sy Kim
28f3f36505
Promote the ServiceInternalTrafficPolicy field to Beta and on by default (#103462)
* pkg/features: promote the ServiceInternalTrafficPolicy field to Beta and on by default

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

* pkg/api/service/testing: update Service test fixture functions to set internalTrafficPolicy=Cluster by default

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

* pkg/apis/core/validation: add more Service validation tests for internalTrafficPolicy

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

* pkg/registry/core/service/storage: fix failing Service REST storage tests to use internalTrafficPolicy: Cluster

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

* pkg/registry/core/service/storage: add two test cases for Service REST TestServiceRegistryInternalTrafficPolicyClusterThenLocal and TestServiceRegistryInternalTrafficPolicyLocalThenCluster

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

* pkg/registry/core/service: update strategy unit tests to expect default
internalTrafficPolicy=Cluster

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

* pkg/proxy/ipvs: fix unit test Test_EndpointSliceReadyAndTerminatingLocal to use internalTrafficPolicy=Cluster

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

* pkg/apis/core: update fuzzers to set Service internalTrafficPolicy field

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

* pkg/api/service/testing: refactor Service test fixtures to use Tweak funcs

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2021-07-06 06:16:30 -07:00
Kubernetes Prow Robot
96dff7d0c7
Merge pull request #102832 from Yuan-Junliang/migrateProxyEventAPI
Migrate kube-proxy event to use v1 Event API
2021-07-05 17:44:17 -07:00
Kubernetes Prow Robot
7cd40e1885
Merge pull request #103116 from chenyw1990/reducekubeproxycpu
reduce cpu usage of kube-proxy with iptables mode
2021-07-05 15:13:38 -07:00
chenyw1990
1f24a198e7 reduce cpu usage of kube-proxy with iptables mode 2021-07-05 16:08:19 +08:00
Swetha Repakula
03b7a699c2 Kubeproxy uses V1 EndpointSlice 2021-06-30 18:41:57 -07:00
Kubernetes Prow Robot
1151dc1ee5
Merge pull request #103138 from sbangari/winDsrLoadBalancerServiceFix
Loadbalancer IngressIP policy should be configured as non-DSR to enable routing mesh by default
2021-06-28 23:26:51 -07:00
Kubernetes Prow Robot
db3a216fbb
Merge pull request #97238 from andrewsykim/kube-proxy-handle-terminating
kube-proxy handle terminating endpoints
2021-06-28 20:46:40 -07:00
wangyx1992
c85e567a3d cleanup: fix errors in wrapped format and log capitalization in proxy
Signed-off-by: wangyx1992 <wang.yixiang@zte.com.cn>
2021-06-28 04:39:15 +08:00