Commit Graph

1069 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
929adb69e3
Merge pull request #76165 from JacobTanenbaum/minor-cleanups
Minor cleanups in pkg/proxy/endpoints.go
2019-05-15 22:55:55 -07:00
Kubernetes Prow Robot
746404f82a
Merge pull request #77560 from dcbw/proxy-sig-network-owners
pkg/proxy: add sig-network-approvers/sig-network-reviewers to OWNERS files
2019-05-15 03:08:33 -07:00
Kubernetes Prow Robot
74743793f2
Merge pull request #74027 from squeed/kube-proxy-metrics
proxy: add some useful metrics
2019-05-15 03:08:19 -07:00
Dan Williams
91716989b6 pkg/proxy: add sig-network-approvers/sig-network-reviewers to OWNERS files
This PR also adds m1093782566 (Jun Du) to sig-network-reviewers in
recognition of his contributions to the proxy.
2019-05-13 10:30:29 -05:00
Brad Hoekstra
62e58a66aa Fix some lint errors in pkg/proxy 2019-05-09 16:48:29 -04:00
Jacob Tanenbaum
9d4693a70f changing UpdateEndpointsMap to Update
changing UpdateEndpointsMap to be a function of the EndpointsMap object
2019-05-07 14:41:15 -04:00
Jacob Tanenbaum
5201cc994c Cleanup of GetLocalEndpointIPs
unexported GetLocalEndpointIPs and made it a endpointsMap struct method
2019-05-07 14:41:15 -04:00
Jacob Tanenbaum
1d60557c87 Merge() and Unmerge() needlessly exported 2019-05-07 14:41:15 -04:00
Casey Callendrello
017f57a6b0 proxy: add some useful metrics
This adds some useful metrics around pending changes and last successful
sync time.

The goal is for administrators to be able to alert on proxies that, for
whatever reason, are quite stale.

Signed-off-by: Casey Callendrello <cdc@redhat.com>
2019-05-07 14:21:13 +02:00
Krzysztof Siedlecki
941629d37a
Revert "Add better logging when iptables-restore fails" 2019-05-07 13:37:29 +02:00
Kubernetes Prow Robot
5b34d95ec5
Merge pull request #77381 from JieJhih/network/golint
Fix golint
2019-05-07 00:23:54 -07:00
draveness
fabc628210 style: update several golint errors in winkernel 2019-05-06 20:28:09 +08:00
JieJhih Jhang
21e4f0039e fix golint 2019-05-03 14:31:51 +08:00
Kubernetes Prow Robot
a949abc5bd
Merge pull request #76712 from tedyu/rr-read-lock
Use read lock for ServiceHasEndpoints
2019-05-01 23:28:31 -07:00
Kubernetes Prow Robot
de83eefd1b
Merge pull request #76784 from tedyu/health-read
Use read lock in ServeHTTP
2019-05-01 20:42:19 -07:00
JieJhih Jhang
176d49300d combine two logics avoid for range the same thing 2019-05-01 18:35:52 +08:00
Kubernetes Prow Robot
4dc05dd9df
Merge pull request #76320 from JieJhih/config/kube_proxy
support ipv6 in bind address
2019-04-26 17:14:22 -07:00
Kubernetes Prow Robot
a143d07b27
Merge pull request #76254 from JieJhih/fix/word
Fix spell error
2019-04-26 14:26:34 -07:00
Kubernetes Prow Robot
fa833a1e33
Merge pull request #74840 from anfernee/connreset
kube-proxy: Drop packets in INVALID state
2019-04-26 14:26:22 -07:00
Ted Yu
2472d34bf0 Refactor err checking 2019-04-25 10:18:52 -07:00
Ted Yu
9d30833e53 Follow on for #76779 2019-04-25 02:46:38 -07:00
Kubernetes Prow Robot
e8cbeaae2b
Merge pull request #76779 from tedyu/stored-cidr
Store parsed CIDRs at initialization of Proxier
2019-04-24 23:04:45 -07:00
Davanum Srinivas
7b8c9acc09
remove unused code
Change-Id: If821920ec8872e326b7d85437ad8d2620807799d
2019-04-19 08:36:31 -04:00
Ted Yu
9fb6a100c8 Use read lock in ServeHTTP 2019-04-18 11:40:29 -07:00
Ted Yu
0062a7d8de Store parsed CIDRs at initialization of Proxier 2019-04-18 09:36:05 -07:00
Ted Yu
cf706531a5 Use read lock for ServiceHasEndpoints 2019-04-17 08:10:30 -07:00
JieJhih Jhang
08e320fa4e support ipv6 in bind address
use split host port func instead trim specific character

add unit test for metrics and healthz bind address

recover import package

refactor set default kube proxy configuration

fix ipv4 condition

fix set default port condition

rewrite call function occasion to reduce error

set ipv6 default value

move get GetBindAddressHostPort to util

use one func to handle deprecated series

update bazel

define address type

return earlier in the error case

refactor set default kube proxy configuration logic

recover import package

preserve some of the original comments

add get default address func

add append port if needed unit test

rewrite unit test for deprecated flags

remove unused codes
2019-04-17 15:31:42 +08:00
Kubernetes Prow Robot
a55478319a
Merge pull request #76277 from dcbw/proxy-userspace-dans-owners
proxy/userspace: add dcbw and danwinship to OWNERS approvers
2019-04-16 19:14:18 -07:00
Kubernetes Prow Robot
2490e035d7
Merge pull request #71735 from dcbw/userspace-proxy-ratelimiting
proxy/userspace: respect minSyncInterval
2019-04-16 19:14:03 -07:00
Kubernetes Prow Robot
b66fb6a347
Merge pull request #76658 from ksubrmnn/owners
Update winkernel owners file
2019-04-16 17:48:50 -07:00
Kubernetes Prow Robot
90b9ccf7f4
Merge pull request #74447 from WanLinghao/builder_ptr_replace
Remove and replace ptr functions
2019-04-16 16:19:38 -07:00
ksubrmnn
a7c3068e86 Update owners file 2019-04-16 10:45:50 -07:00
Igor German
107faf5ab0 proxy: Take into account exclude CIDRs while deleting legacy real servers 2019-04-11 17:05:49 +03:00
WanLinghao
d0138ca3fe This commit does two things in pkg package:
1. Remove unused ptr functions.
2. Replace ptr functions with k8s.io/utils/pointer
2019-04-09 10:56:35 +08:00
Dan Williams
63c01133f8 proxy/userspace: add dcbw and danwinship to OWNERS approvers
Per recommendation of @thockin:

https://github.com/kubernetes/kubernetes/pull/71735#pullrequestreview-189515580

---
IMO this code is as dead as it could be. The only significant user is OpenShift as far as I know. I'd rather never touch it again, but I know that is not realistic.

Also, it seems like maybe this could be broken into a couple commits for easier review?

I raised some questions about this design, but I think you should add yourselves as approvers in OWNERS for this subdir. If it evolves, I will lose context on the impl. I don't think it is covered by e2e, either (more argument for breaking it to a separate repo and having its own e2e tests)
---
2019-04-08 12:38:22 -05:00
Jay
9f2147161e Fix spell error 2019-04-08 15:49:29 +08:00
Dan Williams
cc2b31a2f3 proxy/userspace: consolidate portal and proxy cleanup 2019-04-05 16:28:24 -05:00
Dan Williams
8cf0076e23 proxy/userspace: respect minSyncInterval and simplify locking
The userspace proxy does not have any ratelimiting and when many
services are used will hammer iptables every time a service or
endpoint change occurs. Instead build up a map of changed
services and process all those changes at once instead of each
time an event comes in. This also ensures that no long-running
processing happens in the same call chain as the OnService*
calls as this blocks other handlers attached to the proxy's
parent ServiceConfig object for long periods of time.

Locking can also now be simplified as the only accesses to the
proxy's serviceMap happen from syncProxyRules(). So instead of
locking in many functions just lock once in syncProxyRules()
like the other proxies do.

https://bugzilla.redhat.com/show_bug.cgi?id=1590589
https://bugzilla.redhat.com/show_bug.cgi?id=1689690
2019-04-05 16:28:17 -05:00
Dan Williams
cf7225f561 proxy/userspace: replace IsServiceIPSet() with ShouldSkipService()
Keeps things consistent with iptables/IPVS proxies. Proxies don't
handle ServiceTypeExternalName even if the ClusterIP is set.
2019-04-05 16:16:36 -05:00
Dan Williams
04b943ce38 proxy/userspace: track initial service/endpoints sync
We'll use this shortly to prevent premature syncing before all
initial endpoints and services have been received from the
apiserver.
2019-04-05 16:16:36 -05:00
Dan Williams
ddab79a233 proxy/userspace: add proxy shutdown function and use in testcases
If a testcase does time out and 'go test' prints the call stack,
make sure everything from previous tests is cleaned up so the call
stack is easier to understand.
2019-04-05 16:16:36 -05:00
Dan Williams
4b07f80d20 proxy: consolidate ServicesHandler/EndpointsHandler into ProxyProvider
Proxies should be able to cleanly figure out when endpoints have been synced,
so make all ProxyProviders also implement EndpointsHandler and pass those
through to loadbalancers when required.
2019-04-05 16:16:35 -05:00
Tim Hockin
f8a7936894 Add better logging when iptables-restore fails 2019-04-04 16:34:10 -07:00
Kubernetes Prow Robot
29566d0a65
Merge pull request #74341 from paulsubrata55/kube_proxy_sctp_fix
Issue in kube-proxy when IPVS is enabled and SCTP traffic is sent.
2019-03-26 12:33:33 -07:00
Kubernetes Prow Robot
59140d6474
Merge pull request #75295 from DataDog/lbernail/strict-arp-flag
[kube-proxy/ipvs] Add flag to enable strict ARP
2019-03-20 07:41:51 -07:00
Kubernetes Prow Robot
88dc966a8a
Merge pull request #75283 from DataDog/lbernail/graceful-restart
[kube-proxy/ipvs] Do not delete existing VS and RS when starting
2019-03-20 07:41:36 -07:00
Kubernetes Prow Robot
046dcbd1ed
Merge pull request #73917 from droslean/cleanup
replace loops with go idiomatic.
2019-03-19 19:01:04 -07:00
Yongkun Gui
a07169bcad kube-proxy: Drop packets in INVALID state
Fixes: #74839
2019-03-18 15:22:30 -07:00
Kubernetes Prow Robot
aa9cbd112c
Merge pull request #75265 from JacobTanenbaum/ClearExternalIPs
Clear conntrack entries on 0 -> 1 endpoint transition with externalIPs
2019-03-18 11:06:23 -07:00
Jacob Tanenbaum
c3548165d5 Clear conntrack entries on 0 -> 1 endpoint transition with externalIPs
As part of the endpoint creation process when going from 0 -> 1 conntrack entries
are cleared. This is to prevent an existing conntrack entry from preventing traffic
to the service. Currently the system ignores the existance of the services external IP
addresses, which exposes that errant behavior

This adds the externalIP addresses of udp services to the list of conntrack entries that
get cleared. Allowing traffic to flow

Signed-off-by: Jacob Tanenbaum <jtanenba@redhat.com>
2019-03-15 11:18:51 -04:00