Commit Graph

270 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
74743793f2
Merge pull request #74027 from squeed/kube-proxy-metrics
proxy: add some useful metrics
2019-05-15 03:08:19 -07: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
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
JieJhih Jhang
176d49300d combine two logics avoid for range the same thing 2019-05-01 18:35:52 +08: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
Jay
9f2147161e Fix spell error 2019-04-08 15:49:29 +08:00
Tim Hockin
f8a7936894 Add better logging when iptables-restore fails 2019-04-04 16:34:10 -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
Tim Hockin
de25d6cb95 Kube-proxy: REJECT LB IPs with no endpoints
We REJECT every other case.  Close this FIXME.

To get this to work in all cases, we have to process service in
filter.INPUT, since LB IPS might be manged as local addresses.
2019-03-11 20:33:45 -07:00
danielqsj
10ab3fb832 clean the deprecated metrics which introduced recently 2019-03-06 15:23:46 +08:00
danielqsj
f7b437cae0 convert latency in mertics name to duration 2019-02-22 21:40:13 +08:00
Kubernetes Prow Robot
059d6057dd
Merge pull request #73323 from prameshj/clear-externalip-conntrack
Clear conntrack entries for externalIP and LoadBalancer IP
2019-02-19 18:38:17 -08:00
Pavithra Ramesh
24d3ab83dc Remove conntrack entries from loadbalancer ip too. 2019-02-13 09:55:31 -08:00
Matt Matejczyk
7141ece4bf Start exporting the in-cluster network programming latency metric. 2019-02-12 08:09:59 +01:00
Ashish Ranjan
7be223e798 Refactor to use k8s.io/utils/net/ package instead of kubernetes/pkg/util/net/sets
Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>
2019-02-04 10:34:53 +05:30
Kubernetes Prow Robot
b8d6de320f
Merge pull request #72334 from danielqsj/kp
Change proxy metrics to conform metrics guidelines
2019-01-25 18:32:12 -08:00
prameshj
5667ebd4f6
Merge branch 'master' into clear-externalip-conntrack 2019-01-25 11:12:16 -08:00
Pavithra Ramesh
168602e597 Clear conntrack entries for externalIP
When an endpoint is deleted, the conntrack entries are cleared for
clusterIP but not for externalIP of the service. This change adds
that step.
2019-01-25 11:05:18 -08:00
Tim Hockin
df77e8eefd kube-proxy: reject 0 endpoints on forward
Previously we only REJECTed on OUTPUT which works for packets from the
node but not for packets from pods on the node.
2019-01-03 10:59:13 -08:00
Tim Hockin
0d451d7a4c kube-proxy: remove old cleanup rules 2019-01-03 10:59:10 -08:00
Tim Hockin
51442b1e8e kube-proxy: rename field for congruence 2019-01-03 10:59:10 -08:00
Tim Hockin
2106447d21 kube-proxy: rename vars for clarity, fix err str 2019-01-03 10:59:10 -08:00
Tim Hockin
b3c2888e71 kube-proxy: rename internal field for clarity 2019-01-03 10:59:06 -08:00
danielqsj
8975e62254 Change proxy metrics to conform guideline 2018-12-26 17:25:10 +08:00
Jacob Tanenbaum
144280e7a7 Correctly Clear conntrack entrty on endpoint changes when using nodeport
When using NodePort to connect to an endpoint using UDP, if the endpoint is deleted on
restoration of the endpoint traffic does not flow. This happens because conntrack holds
the state of the connection and the proxy does not correctly clear the conntrack entry
for the stale endpoint.

Introduced a new function to conntrack ClearEntriesForPortNAT that uses the endpointIP
and NodePort to remove the stale conntrack entry and allow traffic to resume when
the endpoint is restored.

Signed-off-by: Jacob Tanenbaum <jtanenba@redhat.com>
2018-12-03 15:02:48 -05:00
AdamDang
cc4d38c768 Typo fix: healtcheck->healthcheck (#65394)
Typo fix: healtcheck->healthcheck

Typo fix: healtcheck->healthcheck
2018-11-13 19:45:24 -08:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
k8s-ci-robot
941fc26418
Merge pull request #67888 from tanshanshan/glogformat
remove unused format log print
2018-10-01 22:20:28 -07:00
k8s-ci-robot
3fe21e5433
Merge pull request #68922 from BenTheElder/version-staging
move pkg/util/version to staging
2018-09-26 22:59:42 -07:00
Benjamin Elder
8b56eb8588 hack/update-gofmt.sh 2018-09-24 12:21:29 -07:00
Benjamin Elder
088cf3c37b find & replace version import 2018-09-24 12:03:24 -07:00
Jess Frazelle
f8ba640ced
pkg/proxy: only set sysctl if not already set
This will allow for kube-proxy to be run without `privileged` and
with only adding the capability `NET_ADMIN`.

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-09-19 15:29:53 -04:00
Kubernetes Submit Queue
11c47e1872
Merge pull request #67948 from wojtek-t/use_buffers_in_kube_proxy
Automatic merge from submit-queue (batch tested with PRs 66577, 67948, 68001, 67982). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Reduce amount of allocations in kube-proxy

Follow up from https://github.com/kubernetes/kubernetes/pull/65902
2018-08-29 16:33:34 -07:00
wojtekt
8fb365df32 Reduce amount of allocations in kube-proxy 2018-08-28 15:18:58 +02:00
tanshanshan
8598c9dceb remove unused format log print 2018-08-27 17:10:24 +08:00
Laszlo Janosi
e466bdc67e Changes according to the approved KEP. SCTP is supported for HostPort and LoadBalancer. Alpha feature flag SCTPSupport controls the support of SCTP. Kube-proxy config parameter is removed. 2018-08-27 05:58:36 +00:00
Laszlo Janosi
a6da2b1472 K8s SCTP support implementation for the first pull request
The requested Service Protocol is checked against the supported protocols of GCE Internal LB. The supported protocols are TCP and UDP.

SCTP is not supported by OpenStack LBaaS. If SCTP is requested in a Service with type=LoadBalancer, the request is rejected. Comment style is also corrected.

SCTP is not allowed for LoadBalancer Service and for HostPort. Kube-proxy can be configured not to start listening on the host port for SCTP: see the new SCTPUserSpaceNode parameter

changed the vendor github.com/nokia/sctp to github.com/ishidawataru/sctp. I.e. from now on we use the upstream version.

netexec.go compilation fixed. Various test cases fixed

SCTP related conformance tests removed. Netexec's pod definition and Dockerfile are updated to expose the new SCTP port(8082)

SCTP related e2e test cases are removed as the e2e test systems do not support SCTP

sctp related firewall config is removed from cluster/gce/util.sh. Variable name sctp_addr is corrected to sctpAddr in pkg/proxy/ipvs/proxier.go

cluster/gce/util.sh is copied from master
2018-08-27 05:56:27 +00:00
x00416946 fisherxu
79e17e6cd7 use versioned api in kube-proxy 2018-08-16 09:59:33 +08:00
tanshanshan
f68af9e584 fix spell 2018-07-14 10:05:56 +08:00
Kubernetes Submit Queue
13f9c26fd7
Merge pull request #65902 from wojtek-t/kube_proxy_less_allocations_2
Automatic merge from submit-queue (batch tested with PRs 65902, 65781). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Avoid unnecessary allocations in kube-proxy
2018-07-09 23:07:01 -07:00
wojtekt
6e50f39dbd Avoid allocations when parsing iptables 2018-07-08 10:55:19 +02:00
wojtekt
bbd0a98346 Avoid printing service comments in proxy rules 2018-07-04 08:45:19 +02:00
m1093782566
029a16a1eb fix review comments 2018-05-14 16:07:13 +08:00
m1093782566
8b16d66b46 add some comment message 2018-05-02 17:02:07 +08:00