Commit Graph

107 Commits (f34a24e98e7c837b567b78be3af958ac1156cd80)

Author SHA1 Message Date
Kubernetes Submit Queue 1d8f1e268f Merge pull request #47699 from supereagle/fix-typos
Automatic merge from submit-queue. 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>.

fix typos: remove duplicated word in comments

**What this PR does / why we need it**: Remove the duplicated word `the` in comments

**Which issue this PR fixes** : fixes #

**Special notes for your reviewer**:

```release-note
NONE
```
2017-10-17 02:35:52 -07:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Dane LeBlanc 6d71eb590b Add check for IPv6 '::' when calculating kube-proxy's node IP
kube-proxy currently checks for a bind address of 0.0.0.0 (IPv4 all-zeros)
when calculating kube-proxy's node IP, but it does not check for
an address of '::' (IPv6 all-zeros). For either of those all-zeros
addresses, the node IP should be determined based on the hostname,
rather than using the address directly.

Also added a helpful log message when the kube-proxy protocol is
determined to be IPv6.

fixes #52613
2017-09-25 17:54:57 -04:00
supereagle 87c29a08e1 fix typos: remove duplicated word in comments 2017-09-16 14:38:10 +08:00
m1093782566 1faa6f56b9 fix kube-proxy panic 2017-09-01 16:18:03 +08:00
m1093782566 c355a2ac96 Paramaterize stickyMaxAgeMinutes for service in API 2017-08-25 17:44:47 +08:00
m1093782566 992f618343 move IsLocalIP() and ShouldSkipService() to pkg/proxy/util 2017-08-17 14:32:05 +08:00
m1093782566 7b8372db99 move UDP conntrack operations together to pkg/proxy/util/conntrack.go 2017-08-12 11:10:04 +08:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Jeff Grafton cf55f9ed45 Autogenerate BUILD files 2017-08-11 09:30:23 -07:00
Kubernetes Submit Queue 5d24a2c199 Merge pull request #49300 from tklauser/syscall-to-x-sys-unix
Automatic merge from submit-queue

Switch from package syscall to golang.org/x/sys/unix

**What this PR does / why we need it**:

The syscall package is locked down and the comment in https://github.com/golang/go/blob/master/src/syscall/syscall.go#L21-L24 advises to switch code to use the corresponding package from golang.org/x/sys. This PR does so and replaces usage of package syscall with package golang.org/x/sys/unix where applicable. This will also allow to get updates and fixes
without having to use a new go version.

In order to get the latest functionality, golang.org/x/sys/ is re-vendored. This also allows to use Eventfd() from this package instead of calling the eventfd() C function.

**Special notes for your reviewer**:

This follows previous works in other Go projects, see e.g. moby/moby#33399, cilium/cilium#588

**Release note**:

```release-note
NONE
```
2017-08-03 04:02:12 -07:00
Tobias Klauser 4a69005fa1 switch from package syscall to x/sys/unix
The syscall package is locked down and the comment in [1] advises to
switch code to use the corresponding package from golang.org/x/sys. Do
so and replace usage of package syscall with package
golang.org/x/sys/unix where applicable.

  [1] https://github.com/golang/go/blob/master/src/syscall/syscall.go#L21-L24

This will also allow to get updates and fixes for syscall wrappers
without having to use a new go version.

Errno, Signal and SysProcAttr aren't changed as they haven't been
implemented in /x/sys/. Stat_t from syscall is used if standard library
packages (e.g. os) require it. syscall.SIGTERM is used for
cross-platform files.
2017-07-21 12:14:42 +02:00
ymqytw 9b393a83d4 update godep 2017-07-20 11:03:49 -07:00
ymqytw 3dfc8bf7f3 update import 2017-07-20 11:03:49 -07:00
Mike Danese c201553f27 remove some people from OWNERS so they don't get reviews anymore
These are googlers who don't work on the project anymore but are still
getting reviews assigned to them:
- bprashanth
- rjnagal
- vmarmol
2017-07-13 10:02:21 -07:00
Kubernetes Submit Queue 8c52c8f15c Merge pull request #48635 from dcbw/userspace-proxy-silence-loadbalancerrr-message
Automatic merge from submit-queue (batch tested with PRs 48425, 41680, 48457, 48619, 48635)

proxy/userspace: suppress "LoadBalancerRR: Removing endpoints" message

Don't print it when there aren't any endpoints getting removed.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1468420
Fixes: https://github.com/kubernetes/kubernetes/issues/48816

```release-note
NONE
```

@eparis @thockin @kubernetes/rh-networking
2017-07-12 10:57:21 -07:00
Dan Williams 0233f2b924 proxy/userspace: suppress "LoadBalancerRR: Removing endpoints" message
Don't print it when there aren't any endpoints getting removed.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1468420
2017-07-07 15:45:30 -05:00
Dan Williams 8a58f62fe0 proxy/userspace: honor listen IP address as host IP if given
Allows the proxier to be used on an interface that's not the default route,
otherwise hostIP gets set to the default route interface even if that's
not what the user intended.

If listen IP isn't given, falls back to previous behavior.
2017-07-07 11:17:17 -05:00
Wojciech Tyczynski 33a7a288a5 Switch userspace proxy to be event based for services 2017-05-05 09:35:38 +02:00
Wojciech Tyczynski 12058c6a63 Delete unused code 2017-05-05 09:35:38 +02:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Chao Xu d9920c53a5 move ref.go to its own subpackage 2017-04-13 10:02:43 -07:00
Kubernetes Submit Queue 284615d79d Merge pull request #43702 from wojtek-t/edge_based_proxy
Automatic merge from submit-queue

Edge-based userspace LB in kube-proxy

@thockin @bowei - if one of you could take a look if that PR doesn't break some basic kube-proxy assumptions. The similar change for winuserproxy should be pretty trivial.

And we should also do that for iptables, but that requires splitting the iptables code to syncProxyRules (which from what I know @thockin already started working on so we should probably wait for it to be done).
2017-04-12 00:30:53 -07:00
Chao Xu 08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
Wojciech Tyczynski c5cbdbe3d2 Edge-based userspace proxy 2017-04-10 11:59:21 +02:00
Tim Hockin adf30aa2e1 kube-proxy: OnServiceUpdate takes pointers
This signature is more consistent with OnEndpointsUpdate and removes a
copy loop.  This is part on ongoing cleanup to rate-limit iptables
calls.
2017-04-03 17:19:39 -07:00
Wojciech Tyczynski 2a6083c3e7 Avoid copying endpoints object in kube-proxy 2017-03-25 17:41:42 +01:00
Benjamin Bennett 5447db3048 Userspace proxy should remove conntrack entries
This changes the userspace proxy so that it cleans up its conntrack
settings when a service is removed (as the iptables proxy already
does).  This could theoretically cause problems when a UDP service
as deleted and recreated quickly (with the same IP address).  As
long as packets from the same UDP source IP and port were going to
the same destination IP and port, the the conntrack would apply and
the packets would be sent to the old destination.

This is astronomically unlikely if you did not specify the IP address
to use in the service, and even then, only happens with an "established"
UDP connection.  However, in cases where a service could be "switched"
between using the iptables proxy and the userspace proxy, this case
becomes much more frequent.
2017-02-27 18:41:47 -05:00
Solly Ross 655b338256 Userspace Proxy: Keep ref to service being proxied
This commit makes the userspace proxy keep an ObjectReference to the
service being proxied.  This allows the consumers of the `ServiceInfo`
struct, like `ProxySockets` to emit events about or otherwise refer to
the service.
2017-02-27 18:41:47 -05:00
Solly Ross f5526727fb Userspace Proxy: Expose ProxySocket utility funcs
This commit exposes several utility functions that are valuable for
implementing custom ProxySockets.
2017-02-27 18:41:47 -05:00
Solly Ross de2285ac7b Userspace Proxy: Allow any ProxySocket in Proxier
This commit adds a new method for constructing userspace proxiers,
`NewCustomProxier`.  `NewCustomProxier` functions identically to
`NewProxier`, except that it allows a custom constructor method to
be passed in to construct instances of ProxySocket.
2017-02-27 18:41:47 -05:00
Solly Ross 43c4d7ae23 Userspace Proxy: Make ProxySocket Implementable
This commit makes it possible for the `ProxySocket` interface to be
implemented by types outside of the `userspace` package.  It mainly just
exposes relevant types and fields as public.
2017-02-27 18:41:46 -05:00
Solly Ross 9dcf8ef344 Userspace Proxy: allow check for endpoints on svc
This commit adds a method to the `LoadBalancer` interface in the
userspace proxy which allows consumers of the `LoadBalancer` to check if
it thinks a given service has endpoints available.
2017-02-23 16:06:28 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Brendan Burns 47b79de76e Refactor port allocation logic a little, deflake tests. 2016-12-18 21:18:34 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Kubernetes Submit Queue 08c0f7dded Merge pull request #27711 from xiangpengzhao/port-allocator-test
Automatic merge from submit-queue

Cover port_allocator_test with more conditions

The test cases of port_allocator_test should cover more conditions, such as `rangeAllocator.used.Bit`.
2016-12-07 12:14:36 -08:00
Kubernetes Submit Queue 919dfc4211 Merge pull request #36523 from apelisse/owners-pkg-proxy
Automatic merge from submit-queue

Curating Owners: pkg/proxy

cc @thockin

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2016-11-28 11:42:49 -08:00
Tim Hockin 19dd9c1271 Reduce to folks with context 2016-11-15 08:51:12 +01:00
Antoine Pelisse cbbf366f1f Update OWNERS approvers and reviewers: pkg/proxy 2016-11-09 10:17:55 -08:00
Timothy St. Clair 2b012e822a Add minimum iptables sync period to the proxy, default is 2/sec 2016-11-04 00:38:35 -05:00
xiangpengzhao 513b346bb7 Log portal IP in error info. 2016-11-01 05:26:16 -04:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
xiangpengzhao 9ef7475c12 Cover port_allocator_test with more conditions 2016-08-23 05:19:44 -04:00
Michal Rostecki 59ca5986dd Print/log pointers of structs with %#v instead of %+v
There are many places in k8s where %+v is used to format a pointer
to struct, which isn't working as expected.

Fixes #26591
2016-08-01 22:27:56 +02:00
k8s-merge-robot 04602bb9e5 Merge pull request #28655 from freehan/kubeproxyfix
Automatic merge from submit-queue

Don't delete affinity when endpoints are empty

closes: #25316
2016-07-08 11:28:43 -07:00