Commit Graph

699 Commits (56dc8f9a6ab09debeddf5349ee26730d3e9107f8)

Author SHA1 Message Date
Erik Stidham 535634f547 Review updates 2017-10-30 13:44:43 -05:00
m1093782566 bf2776eb3f update ipvs proxy readme 2017-10-28 11:41:56 +08:00
Kubernetes Submit Queue a87057bc6f
Merge pull request #54700 from pecameron/iptables-log
Automatic merge from submit-queue (batch tested with PRs 54635, 54250, 54657, 54696, 54700). 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>.

Remove iptables log on restore failure

Don't log the set of rules at v2 in kube-proxy on error.
The rules are displayed at v5 before the restore is attempted.

In a large cluster the report can generate up to 100000 lines.
A partial report is only helpful if the problem is displayed
in the partial report.



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

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-10-27 14:38:32 -07:00
Phil Cameron 965cf128b6 Remove iptables log on restore failure
Don't log the set of rules at v2 in kube-proxy on error.
The rules are displayed at v5 before the restore is attempted.

In a large cluster the report can generate up to 100000 lines.
A partial report is only helpful if the problem is displayed
in the partial report.
2017-10-27 09:14:35 -04:00
Kubernetes Submit Queue 6fbd2a1a30 Merge pull request #53634 from m1093782566/win-session
Automatic merge from submit-queue (batch tested with PRs 54656, 54552, 54389, 53634, 54408). 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>.

Remove hard code of session affinity timeout in winows kernel proxy

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

Remove hard code of session affinity timeout in winows kernel proxy - we have already done this in userspace, iptables and ipvs proxy.

**Which issue this PR fixes**: 

fixes #53636 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig network
/area kube-proxy
2017-10-26 21:08:33 -07:00
m1093782566 2861a78baa remove +linux restriction in ipvs/fake 2017-10-27 11:44:02 +08:00
Kubernetes Submit Queue 9807360fe3 Merge pull request #53956 from m1093782566/proxy-metrics
Automatic merge from submit-queue (batch tested with PRs 52479, 53956). 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>.

Register sync proxy rules latency metrics in app level

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

IMO, should may should register proxy metrics in app level instead of in specific proxy mode, e.g. iptables, ipvs, winkernel...

By registering sync proxy rules latency metrics in app level, we can reuse codes among different proxiers.

**Which issue this PR fixes**: 

closes #53957

**Special notes for your reviewer**:

@wojtek-t What do you think about it?

**Release note**:

```release-note
NONE
```
2017-10-24 00:48:26 -07:00
m1093782566 876c73024c migrate ip cmd to netlink 2017-10-24 13:26:07 +08:00
m1093782566 fa94105866 implement dummy device operation by netlink 2017-10-24 11:41:36 +08:00
m1093782566 9dce640213 fix review comments 2017-10-24 10:30:38 +08:00
Kubernetes Submit Queue 1274902a3d Merge pull request #53864 from m1093782566/m109-reviewer
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>.

Add m1093782566 to pkg/proxy/OWNERS reviewers

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

Add @m1093782566 to pkg/proxy/OWNERS reviewers. I would love to help review kube-proxy, especially ipvs mode codes.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-22 23:22:41 -07:00
m1093782566 46b4614c5d remove hard code of session affinity timeout in win-proxy 2017-10-21 13:47:31 +08:00
Kubernetes Submit Queue 48da128d83 Merge pull request #53708 from m1093782566/cleanup-winkernel-proxy
Automatic merge from submit-queue (batch tested with PRs 52471, 53708). 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>.

clean up winkernel proxy

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

clean up winkernel proxy

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-20 22:46:12 -07:00
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
m1093782566 dab9b84b67 add proxy metrics in app level 2017-10-16 21:10:51 +08:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue 02f0d92160 Merge pull request #51686 from choury/fix_dup_unbind
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 duplicate unbind action in kube-proxy

**What this PR does / why we need it**:
Fix duplicate unbind action in kube-proxy. It will generate unnecessary error info If unbind multi-ports on one service .

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

**Release-note**:
```release-note
NONE
```
2017-10-15 17:38:45 -07:00
m1093782566 7bb279f74d add m1093782566 to pkg/proxy/OWNERS 2017-10-13 11:39:25 +08:00
Dane LeBlanc 799341f2dc Add IPv6 and negative UT test cases for proxier's deleteEndpointConnections
This change adds IPv6 and negative UT test cases for the proxier's
deleteEndpointConnections.

Changes include:
- Add IPv6 UT test cases to TestDeleteEndpointConnections.
- Add negative UT test case to TestDeleteEndpointConnections for
  handling case where no connections need clearing (benign error).
- Add negative UT test case to test unexpected error.
- Reorganize UT in TestDeleteEndpointConnections so that the fake
  command executor's command and scripted responses are generated on
  the fly based on the test case table (rather than using a fixed
  set of commands/responses that will need to be updated every time
  test cases are added/deleted).
- Create the proxier service map in real time, based on the test case
  table (rather than using a fixed service map that will need to be updated
  every time test cases are added/deleted).

fixes #53554
2017-10-12 20:07:19 -04:00
m1093782566 8b8c305de4 clean up winkernel proxy 2017-10-11 16:30:24 +08:00
m1093782566 d96409178b consume endpoints IPPart function in util 2017-10-11 09:51:58 +08:00
m1093782566 1ed1200143 move ippart() to util 2017-10-11 09:47:24 +08:00
choury 00f8ae3540 fix duplicate unbind action 2017-10-09 12:14:24 +08:00
Kubernetes Submit Queue 5c9e36ef80 Merge pull request #53097 from m1093782566/ipvs-test
Automatic merge from submit-queue (batch tested with PRs 52768, 51898, 53510, 53097, 53058). 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>.

Run IPVS proxier UTs everywhere - include !linux platfrom

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

IPVS proxier UTs should run everywhere, including !linux platfrom, which will help a lot when developing in windows platfrom.

**Which issue this PR fixes**: 

fixes #53099

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-06 13:16:45 -07:00
Kubernetes Submit Queue a2ce3bcf63 Merge pull request #52935 from m1093782566/ipv6
Automatic merge from submit-queue (batch tested with PRs 53454, 53446, 52935, 53443, 52917). 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>.

Remove ipv4 constraint of Node IPs in ipvs proxier

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

We are targeting to IPV6. So, we should remove ipv4 constraint of Node IPs in ipvs proxier.

Besides, adding some log messages.


**Which issue this PR fixes**:

xref #51866 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-05 05:06:27 -07:00
Kubernetes Submit Queue daa0d81703 Merge pull request #52614 from leblancd/v6_proxy_bind_address
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>.

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



**What this PR does / why we need it**:
This PR adds a check for a bind address of IPv6 '::' (all zeros) when kube-proxy is calculating its node IP,
similar to what is done for a bind address of IPv4 0.0.0.0. For either of these all-zeros addresses,
kube-proxy should derive the node IP based on the hostname, rather than use the bind address
directly.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #52613

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-04 19:55:04 -07:00
Kubernetes Submit Queue a0c93de03d Merge pull request #52028 from leblancd/v6_conntrack
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>.

Add required family flag for conntrack IPv6 operation

This change causes kube-proxy to supply the required "-f ipv6"
family flag whenever the conntrack utility is executed and the
associated service is using IPv6.

This change is required for IPv6-only operation.

Note that unit test coverage for the 2-line changes in
pkg/proxy/iptables/proxier.go and /pkg/proxy/ipvs/proxier.go will need
to be added after support for IPv6 service addresses is added to these
files. For pkg/proxy/iptables/proxier.go, this coverage will be added
either with PR #48551.

fixes #52027



**What this PR does / why we need it**:
Kube-proxy is currently not supplying the required "-f ipv6" family flag whenever it
calls the conntrack utility and the associated service is using an IPv6 service IP address.
This means that for IPv6-only operation, conntrack is not properly cleaning up
stale UDP connections, and this may be effecting ip6tables operation.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # 52027

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-04 17:11:36 -07:00
m1093782566 2243577569 remove ipv4 constraints of Node IPs in ipvs proxier 2017-09-28 16:24:52 +08:00
m1093782566 1e00828588 support run ipvs UTs in windows platform 2017-09-27 11:43:16 +08: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
Kubernetes Submit Queue 7c9e614cbb Merge pull request #52873 from ixdy/bazel-cleanup
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>..

bazel: build/test almost everything

**What this PR does / why we need it**: Miscellaneous cleanups and bug fixes. The main motivating idea here was to make `bazel build //...` and `bazel test //...` mostly work. (There's a few reasons these still don't work, but we're a lot closer.)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @BenTheElder @mikedanese @spxtr
2017-09-24 00:04:36 -07:00
Kubernetes Submit Queue 414a3bdd0e Merge pull request #48551 from leblancd/v6_new_proxier
Automatic merge from submit-queue (batch tested with PRs 50068, 52406, 52394, 48551, 52131). 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>..

Add IPv6 support to iptables proxier

Add IPv6 support to iptables proxier

The following changes are proposed for the iptables proxier:

- There are three places where a string specifying IP:port is parsed
  using something like this:
      if index := strings.Index(e.endpoint, ":"); index != -1 {
  This will fail for IPv6 since V6 addresses contain colons. Also,
  the V6 address is expected to be surrounded by square brackets
  (i.e. [<ipv6-addr>]:<port>). Fix this by replacing call to Index with
  call to LastIndex() and stripping out square brackets.
- The String() method for the localPort struct should put square brackets
  around IPv6 addresses.
- The logging in the merge() method for proxyServiceMap should put brackets
  around IPv6 addresses.
- There are several places where filterRules destination is hardcoded to
  <clusterIP>/32. This should be a /128 for IPv6 case.
- Add IPv6 unit test cases

Note: I've left out most of the UT test cases that I had included in my original version of this
PR because the number of lines of code change were much too large for a single review.
I'm including a minimum of UT with this current version of the PR.

fixes #48550



**What this PR does / why we need it**:
This PR addresses several issues in the iptables proxier for handling IPv6 addresses
that were found via visual code inspection, including:
- There are three places where a string specifying IP:port using something like the following:
       if index := strings.Index(e.endpoint, ":"); index != -1 {
  This will fail for IPv6 since V6 addresses contains many colons, and the V6 address is expected
  to be enclosed in square brackets when followed by :<port>.
- The String() method for the localPort struct should put square brackets around IPv6 addresses.
- The logging in the merge() method for proxyServiceMap should put brackets around IPv6
  addresses.
- There are several places where filterRules destination is hardcoded to /32.
  Should be a /128 for IPv6 case.
- More IPv6 unit test cases are needed.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #48550

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-23 20:55:52 -07:00
Kubernetes Submit Queue c7f72a6388 Merge pull request #52394 from Lion-Wei/ipvs-nodeport
Automatic merge from submit-queue (batch tested with PRs 50068, 52406, 52394, 48551, 52131). 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>..

add FlagPersistent flag in nodePort and other situation

**What this PR does / why we need it**:
For AffinityClientIP service, origin code in ipvs didn't add Persistent flag, which is a bug, so I added it.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #52626

**Special notes for your reviewer**:
add FlagPersistent flag in nodePort and other situation

**Release note**:
```release-note
NONE
```
2017-09-23 20:55:49 -07:00
Kubernetes Submit Queue 7008b9043b Merge pull request #52014 from m1093782566/reasons-sync
Automatic merge from submit-queue (batch tested with PRs 50294, 50422, 51757, 52379, 52014). 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>..

rsync ipvs proxier to HEAD of iptables

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

rsync ipvs proxier to HEAD of iptables.

**Which issue this PR fixes**:

 xref #51679

**Special notes for your reviewer**:

Obviously, @Lion-Wei has done part of this work, ref: #51922. It's fine that let #51922 get in first.

**Release note**:

```release-note
NONE
```
2017-09-23 11:40:56 -07:00
Kubernetes Submit Queue 976efef908 Merge pull request #51937 from Lion-Wei/ipvs-readme
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>..

add readme file of ipvs

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

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:
```
None
```
2017-09-22 18:25:52 -07:00
Jeff Grafton 02fb4200dc Use buildozer to delete licenses() rules 2017-09-21 15:53:22 -07:00
Jeff Grafton 532bd482df Use buildozer to remove deprecated automanaged tags 2017-09-21 15:53:22 -07:00
Madhan Raj Mookkandy a8d797afdd Add exception to golint check
(*) Fix cleanup of NodePort resources. (*) Fix the logic to select existing policies

Fix review comment

Fix Bazel

Update GoDep License

Fix NodePort forwarding to target port

Fix Darwin Build break. +1

Implement IsCompatible to validate kernel support for kernel mode
2017-09-18 11:11:22 -07:00
Dane LeBlanc 5fbc9e45cc Add IPv6 support to iptables proxier
The following changes are proposed for the iptables proxier:

* There are three places where a string specifying IP:port is parsed
  using something like this:

      if index := strings.Index(e.endpoint, ":"); index != -1 {

  This will fail for IPv6 since V6 addresses contain colons. Also,
  the V6 address is expected to be surrounded by square brackets
  (i.e. []:). Fix this by replacing call to Index with
  call to LastIndex() and stripping out square brackets.
* The String() method for the localPort struct should put square brackets
  around IPv6 addresses.
* The logging in the merge() method for proxyServiceMap should put brackets
  around IPv6 addresses.
* There are several places where filterRules destination is hardcoded to
  /32. This should be a /128 for IPv6 case.
* Add IPv6 unit test cases

fixes #48550
2017-09-16 09:16:12 -04:00
supereagle 87c29a08e1 fix typos: remove duplicated word in comments 2017-09-16 14:38:10 +08:00
Erik Stidham 7c108f595d Initial changes for adding forward rules 2017-09-15 13:34:20 -05:00
Madhan Raj Mookkandy 63020d5f72 Vendor changes
Vendoring (NEW) in github.com/Microsoft/hcsshim
2017-09-14 16:00:07 -07:00
Madhan Raj Mookkandy 5b87513972 Fix Bazel build 2017-09-14 15:50:47 -07:00
Madhan Raj Mookkandy f503755e53 Add Windows Kernel Proxy support
Windows Kernel now exposes "Internal Load Balancing"
	using VFP (Virtual Filtering Platform) part of Virtual Switch. An inbuild
	windows service HNS (Host Networking Service) acts as interface to program
	the VFP. VFP is synonymous to iptables in functionality. HNS uses json based
	data as input.

	With the help of the interface available in github.com/Microsoft/hcsshim,
	these APIs are exposed to the world in github to program HNS and use
	the feature.

	*** More info about the changes in this PR ***
	(1) For every endpoint available in the system, an HNS Endpoint is added
	    (1.a) for local endpoints, a local HNS Endpoint would already exist, as part of
            container creation.
	    (1.b) For all remote endpoints, a remote HNS Endpoint is created via HNS

	(2) For every Service, a HNS ILB LoadBalancer is added referring the endpoints
	    created in (1)
		Sample Input to HNS:
		{
 	       "Policies":  [
        	                 {
                	             "ExternalPort":  80,
                        	     "InternalPort":  80,
	                             "Protocol":  6,
        	                     "Type":  "ELB",
                	             "VIPs":  [
                        	                  "11.0.98.129"
                                	      ]
	                         }
        	             ],
	        "References":  [
                           "/endpoints/ca8b877b-ab90-499a-bc0e-7d736c425632",
                           "/endpoints/ee0ef08b-8434-4f8b-b748-393884e77465"
        		]
    		}

	(2-a) This is done for Cluster IP, LoadBalancer Ingress IP, NodePort, External IP

	Following the regular service and endpoint updates,
	the HNS is notified of the updates and the system is kept in sync.
2017-09-14 15:50:47 -07:00
Lion-Wei ed802f1db7 add FlagPersistent flag in nodePort and other situation 2017-09-13 16:03:25 +08:00
Dane LeBlanc 502d14afd4 Add required family flag for conntrack IPv6 operation
This change causes kube-proxy to supply the required "-f ipv6"
family flag whenever the conntrack utility is executed and the
associated service is using IPv6.

This change is required for IPv6-only operation.

Note that unit test coverage for the 2-line changes in
pkg/proxy/iptables/proxier.go and /pkg/proxy/ipvs/proxier.go will need
to be added after support for IPv6 service addresses is added to these
files. For pkg/proxy/iptables/proxier.go, this coverage will be added
either with PR #48551.

fixes #52027
2017-09-06 18:05:06 -04:00
m1093782566 c57283ced2 update bazel 2017-09-06 18:57:11 +08:00
m1093782566 44afb09339 rsync ipvs proxier to HEAD of iptables 2017-09-06 18:36:33 +08:00
Lion-Wei 25372689c8 add readme file of ipvs 2017-09-06 08:52:26 +08:00
Kubernetes Submit Queue 7a219684a9 Merge pull request #51682 from m1093782566/ipvs-rsync-iptables
Automatic merge from submit-queue

rsync IPVS proxier to the HEAD of iptables

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

There was a significant performance improvement made to iptables. Since IPVS proxier makes use of iptables in some use cases, I think we should rsync IPVS proxier to the HEAD of iptables.

**Which issue this PR fixes** : 

xref #51679 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-03 15:48:31 -07:00
Kubernetes Submit Queue a31bc44b38 Merge pull request #51500 from m1093782566/fix-kube-proxy-panic
Automatic merge from submit-queue (batch tested with PRs 51819, 51706, 51761, 51818, 51500)

fix kube-proxy panic because of nil sessionAffinityConfig

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

fix kube-proxy panic because of nil sessionAffinityConfig

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

**Special notes for your reviewer**:

I apology that this bug is introduced by #49850 :(

@thockin @smarterclayton @gnufied 

**Release note**:

```release-note
NONE
```
2017-09-03 15:00:15 -07:00
m1093782566 1faa6f56b9 fix kube-proxy panic 2017-09-01 16:18:03 +08:00
m1093782566 96882713b4 rsync iptables 2017-08-31 14:54:22 +08:00
m1093782566 5ed2b44ca7 implement ipvs mode of kube-proxy
Conflicts:
	pkg/util/ipvs/ipvs_unsupported.go
2017-08-30 10:03:02 +08:00
Kubernetes Submit Queue b65f3cc8dd Merge pull request #49850 from m1093782566/service-session-timeout
Automatic merge from submit-queue (batch tested with PRs 49850, 47782, 50595, 50730, 51341)

Paramaterize `stickyMaxAgeMinutes` for service in API

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

Currently I find `stickyMaxAgeMinutes` for a session affinity type service is hard code to 180min. There is a TODO comment, see

https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/iptables/proxier.go#L205

I think the seesion sticky max time varies from service to service and users may not aware of it since it's hard coded in all proxier.go - iptables, userspace and winuserspace.

Once we parameterize it in API, users can set/get the values for their different services.

Perhaps, we can introduce a new field `api.ClientIPAffinityConfig` in `api.ServiceSpec`.

There is an initial discussion about it in sig-network group. See,

https://groups.google.com/forum/#!topic/kubernetes-sig-network/i-LkeHrjs80

**Which issue this PR fixes**: 

fixes #49831

**Special notes for your reviewer**:

**Release note**:

```release-note
Paramaterize session affinity timeout seconds in service API for Client IP based session affinity.
```
2017-08-25 20:43:30 -07:00
m1093782566 c355a2ac96 Paramaterize stickyMaxAgeMinutes for service in API 2017-08-25 17:44:47 +08:00
m1093782566 a7fd545d49 clean up LocalPort in proxier.go 2017-08-24 11:16:38 +08:00
m1093782566 992f618343 move IsLocalIP() and ShouldSkipService() to pkg/proxy/util 2017-08-17 14:32:05 +08:00
Kubernetes Submit Queue 41784b5c66 Merge pull request #49478 from m1093782566/proxy-util-conntrack
Automatic merge from submit-queue (batch tested with PRs 50094, 48966, 49478, 50593, 49140)

[kube-proxy] Move UDP conntrack operations together to pkg/proxy/util/conntrack.go

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

Fix TODO in pkg/proxy/iptables.go, see

https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/iptables/proxier.go#L1632

Move UDP conntrack operations together to from `pkg/proxy/iptables/proxier.go` to `pkg/proxy/util/conntrack.go` so that make them more consistent and add some UTs.

**Which issue this PR fixes**

Fixes #49477

**Special notes for your reviewer**:

```release-note
NONE
```
2017-08-14 12:14:59 -07:00
Kubernetes Submit Queue 2d4c609a1d Merge pull request #49847 from m1093782566/fix-win-proxy
Automatic merge from submit-queue

Fix winspace proxier wrong comment message

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

Since winspace proxier has nothing to do with iptables, this PR remove the wrong comment message on iptables.

**Which issue this PR fixes**: 

Fixes #50524
2017-08-12 01:51:07 -07: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
xiangpengzhao ea1a577358 Remove some helpers associated with ESIPP. 2017-08-09 14:25:08 +08:00
xiangpengzhao ebe21ee4c1 Remove deprecated ESIPP beta annotations 2017-08-05 15:00:58 +08: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
Kubernetes Submit Queue 7b55a2d385 Merge pull request #48624 from derekwaynecarr/log-abridged
Automatic merge from submit-queue

Log abridged set of rules at v2 in kube-proxy on error

**What this PR does / why we need it**:
this is a follow-on to https://github.com/kubernetes/kubernetes/pull/48085

**Special notes for your reviewer**:
we hit this in operations where we typically run in v2, and would like to log abridged set of output rather than full output.

**Release note**:
```release-note
NONE
```
2017-08-02 15:26:37 -07:00
m1093782566 d56344fdf7 fix winspace wrong comment message 2017-08-01 14:06:23 +08:00
Zihong Zheng db379de778 Emit event and retry when fail to start healthz server on kube-proxy. 2017-07-27 20:54:51 -07:00
Derek Carr 3bddef790b Log abridged set of rules at v2 in kube-proxy on error 2017-07-25 10:32:16 -04:00
supereagle adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08: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
Kubernetes Submit Queue 923ef03d05 Merge pull request #48613 from dcbw/userspace-proxy-host-ip
Automatic merge from submit-queue (batch tested with PRs 47232, 48625, 48613, 48567, 39173)

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.

```release-note
To allow the userspace proxy to work correctly on multi-interface hosts when using the non-default-route interface, you may now set the `bindAddress` configuration option to an IP address assigned to a network interface.  The proxy will use that IP address for any required NAT operations instead of the IP address of the interface which has the default route.
```

@kubernetes/sig-network-misc @thockin @wojtek-t
2017-07-12 00:10:16 -07:00
Cao Shufeng 0c577c47d5 Use glog.*f when a format string is passed
ref:
https://godoc.org/github.com/golang/glog

I use the following commands to search all the invalid usage:
$ grep "glog.Warning(" * -r | grep %
$ grep "glog.Info(" * -r | grep %
$ grep "glog.Error(" * -r | grep %
$ grep ").Info(" * -r | grep % | grep "glog.V("
2017-07-10 19:04:03 +08: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
Minhan Xia 68a2749b28 fix unit tests 2017-07-06 16:01:03 -07:00
Minhan Xia 46d3e83caf refactor updateEndpointMap and updateServiceMap results 2017-07-06 16:00:57 -07:00
Minhan Xia 25ac521f88 flush conntrack entry for udp service when # of backend changes from 0 to non-0 2017-07-06 15:12:44 -07:00
xiangpengzhao 9e31eb280a Populate endpoints and allow ports with headless service 2017-06-28 11:15:51 +08:00
Shyam Jeedigunta d354e0bf4f Move iptables logging in kubeproxy from Errorf to V(2).Infof 2017-06-26 19:59:23 +02:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f2d3220a11 run root-rewrite-import-client-go-api-types 2017-06-22 11:30:59 -07:00
Kubernetes Submit Queue 9054e70ca3 Merge pull request #38751 from chenchun/warn
Automatic merge from submit-queue

Raise a warning instead of info if br-netfilter is missing or unset

Took quite a while to figure out why service VIP is unreachable on my cluster. It turns out br-nf-call-iptables is unset. I wish this message could be a warning to attract considerable attention.
2017-06-16 17:25:32 -07:00
Tim Hockin ce8309780f Proxy: comments around ClusterCIDR use 2017-06-01 12:36:31 -07:00
Wojciech Tyczynski 03c255d7c5 Store chain names to avoid recomputing them multiple times 2017-05-30 10:50:10 +02:00
Wojciech Tyczynski c4d51f12a2 Store port endpoint chain names to avoid recomputing it multiple times 2017-05-30 10:49:36 +02:00
Wojciech Tyczynski 88e3e8f470 Reuse args slice for generating iptable rules. 2017-05-30 10:49:35 +02:00
Wojciech Tyczynski 070f393bc8 Precompute probabilities in iptables kube-proxy. 2017-05-30 10:49:34 +02:00
Wojciech Tyczynski 1242e8ca20 Minor improvement for memory allocations 2017-05-30 08:11:12 +02:00
Kubernetes Submit Queue 25dc892a97 Merge pull request #46450 from MrHohn/fix-proxy-healthcheck-nilpointer
Automatic merge from submit-queue (batch tested with PRs 46450, 46272, 46453, 46019, 46367)

Fix potential nil pointer dereference for kube-proxy healthcheck

Found error log from https://storage.googleapis.com/kubernetes-jenkins/logs/ci-kubernetes-e2e-gce-slow/5222:
```
I0524 20:22:35.554156       7 healthcheck.go:226] Not saving endpoints for unknown healthcheck "kube-system/kubernetes-dashboard"
I0524 20:22:35.554172       7 proxier.go:923] syncProxyRules took 40.047209ms
I0524 20:22:35.554218       7 healthcheck.go:175] Healthcheck "e2e-tests-esipp-f7djn/external-local" closed: accept tcp [::]:32027: use of closed network connection
I0524 20:22:37.416133       7 logs.go:41] http: panic serving 169.254.169.254:49216: runtime error: invalid memory address or nil pointer dereference
goroutine 1623 [running]:
net/http.(*conn).serve.func1(0xc420b27220)
	/usr/local/go_k8s_patched/src/net/http/server.go:1721 +0xd0
panic(0x1c07e40, 0x2b11ee0)
	/usr/local/go_k8s_patched/src/runtime/panic.go:489 +0x2cf
k8s.io/kubernetes/pkg/proxy/healthcheck.hcHandler.ServeHTTP(0xc4201aea60, 0x15, 0xc4203233a0, 0xe, 0xc4203aa280, 0x2ab51a0, 0xc420ae4d20, 0xc4202e7a00)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/proxy/healthcheck/healthcheck.go:200 +0x86
k8s.io/kubernetes/pkg/proxy/healthcheck.(*hcHandler).ServeHTTP(0xc420798390, 0x2ab51a0, 0xc420ae4d20, 0xc4202e7a00)
	<autogenerated>:8 +0x87
net/http.serverHandler.ServeHTTP(0xc4208d0210, 0x2ab51a0, 0xc420ae4d20, 0xc4202e7a00)
	/usr/local/go_k8s_patched/src/net/http/server.go:2568 +0x92
net/http.(*conn).serve(0xc420b27220, 0x2ab66e0, 0xc420945380)
	/usr/local/go_k8s_patched/src/net/http/server.go:1825 +0x612
created by net/http.(*Server).Serve
	/usr/local/go_k8s_patched/src/net/http/server.go:2668 +0x2ce
```

So seems like it's possible healthcheck server is still serving traffic after service entry is removed.

/assign @freehan 

**Release note**:

```release-note
NONE
```
2017-05-26 18:48:56 -07:00
Zihong Zheng 41c4e965c3 Fix potential nil pointer dereference for kube-proxy healthcheck 2017-05-25 10:26:51 -07:00
Tim Hockin 2856fde23b Use BoundedFrequencyRunner in kube-proxy 2017-05-24 20:33:15 -07:00
Tim Hockin 578d9fcf63 Logging/naming cleanup for service port names 2017-05-24 20:33:15 -07:00
Kubernetes Submit Queue 6f5193593d Merge pull request #46201 from wojtek-t/address_kubeproxy_todos
Automatic merge from submit-queue

Address remaining TODOs in kube-proxy.

Followup PR from the previous two.
2017-05-22 20:54:14 -07:00
Wojciech Tyczynski 9e6de42745 Remove Save() from iptables interface 2017-05-22 13:23:49 +02:00
Wojciech Tyczynski ee505677f7 Address remaining TODOs in kube-proxy. 2017-05-22 09:18:55 +02:00
Kubernetes Submit Queue 336fb2f508 Merge pull request #45933 from smarterclayton/secret_reuse
Automatic merge from submit-queue

Move the remaining controllers to shared informers

Completes work done in 1.6 to move the last two hold outs to shared informers - tokens controller and scheduler. Adds a few more tools to allow informer reuse (like filtering the informer, or maintaining a mutation cache).

The mutation cache is identical to #45838 and will be removed when that merges

@ncdc @deads2k extracted from openshift/origin#14086
2017-05-20 23:08:09 -07:00
Clayton Coleman 3e095d12b4
Refactor move of client-go/util/clock to apimachinery 2017-05-20 14:19:48 -04:00
Wojciech Tyczynski 7ba30afbed Fix codestyle 2017-05-20 18:46:29 +02:00
Wojciech Tyczynski 758c9666e5 Call syncProxyRules when really needed and remove reasons 2017-05-20 18:46:28 +02:00
Wojciech Tyczynski c0c41aa083 Check whether service changed 2017-05-20 14:22:56 +02:00
Wojciech Tyczynski 05ffcccdc1 Check whether endpoints change 2017-05-20 14:22:07 +02:00
Wojciech Tyczynski 37a6989c79 Cleanup iptables proxier 2017-05-20 14:17:03 +02:00
Wojciech Tyczynski a3da8d7300 Fix naming and comments in kube-proxy. 2017-05-19 21:34:05 +02:00
Wojciech Tyczynski 7d44f83441 Descrese logs verbosity for iptables 2017-05-19 20:44:26 +02:00
Wojciech Tyczynski e3bb755270 Reuse buffers for generated iptables rules 2017-05-19 20:44:26 +02:00
Wojciech Tyczynski 4d29c8608f Avoid strings.Join which is expensive 2017-05-19 20:44:25 +02:00
Wojciech Tyczynski 5464c39333 Reuse buffer for getting iptables contents 2017-05-19 20:44:25 +02:00
Kubernetes Submit Queue f706b81007 Merge pull request #45642 from JiangtianLi/jiangtli-fixdns2
Automatic merge from submit-queue

Fix the issue in Windows kube-proxy when processing unqualified name. This is for DNS client such as ping or iwr that validate name in response and original question.

**What this PR does / why we need it**:
This PR is an additional fix to #41618 and [the corresponding commit](b9dfb69dd7). The DNS client such as nslookup does not validate name matching in response and original question. That works fine when we append DNS suffix to unqualified name in DNS query in Windows kube-proxy. However, for DNS client such as ping or Invoke-WebRequest that validates name in response and original question, the issue arises and the DNS query fails although the received DNS response has no error. 

This PR fixes the additional issue by restoring the original question name in DNS response. Further, this PR refactors DNS message routines by using miekg's DNS library.

This PR affects the Windows kube-proxy only.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #42605 

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix DNS suffix search list support in Windows kube-proxy.
```
2017-05-17 23:48:27 -07:00
Zihong Zheng aca4d469b2 Revert "Remove reasons from iptables syncProxyRules"
This reverts commit 77624a12d3.
2017-05-17 16:33:13 -07:00
Kubernetes Submit Queue 9a9a296556 Merge pull request #45889 from wojtek-t/kube_proxy_handlers
Automatic merge from submit-queue (batch tested with PRs 45953, 45889)

Add /metrics and profiling handlers to kube-proxy

Also expose "syncProxyRules latency" as a prometheus metrics.

Fix https://github.com/kubernetes/kubernetes/issues/45876
2017-05-17 13:56:47 -07:00
Wojciech Tyczynski 45ed99c3a6 Add syncProxyRules prometheus metric 2017-05-17 19:26:58 +02:00
Zihong Zheng 5992425588 Autogenerated files 2017-05-16 21:55:51 -07:00
Zihong Zheng c0920f75cf Move API annotations into annotation_key_constants and remove api/annotations package 2017-05-16 21:55:23 -07:00
Kubernetes Submit Queue 35eba22cc7 Merge pull request #41162 from MrHohn/esipp-ga
Automatic merge from submit-queue (batch tested with PRs 45623, 45241, 45460, 41162)

Promotes Source IP preservation for Virtual IPs from Beta to GA

Fixes #33625. Feature issue: kubernetes/features#27.

Bullet points:
- Declare 2 fields (ExternalTraffic and HealthCheckNodePort) that mirror the ESIPP annotations.
- ESIPP alpha annotations will be ignored.
- Existing ESIPP beta annotations will still be fully supported.
- Allow promoting beta annotations to first class fields or reversely.
- Disallow setting invalid ExternalTraffic and HealthCheckNodePort on services. Default ExternalTraffic field for nodePort or loadBalancer type service to "Global" if not set.

**Release note**:

```release-note
Promotes Source IP preservation for Virtual IPs to GA.

Two api fields are defined correspondingly:
- Service.Spec.ExternalTrafficPolicy <- 'service.beta.kubernetes.io/external-traffic' annotation.
- Service.Spec.HealthCheckNodePort <- 'service.beta.kubernetes.io/healthcheck-nodeport' annotation.
```
2017-05-12 15:00:46 -07:00
Kubernetes Submit Queue 5576fafc63 Merge pull request #45723 from wojtek-t/simplify_iptables_proxy
Automatic merge from submit-queue (batch tested with PRs 45685, 45572, 45624, 45723, 45733)

Remove reasons from iptables syncProxyRules

The reasons are no longer useful, since we know if something changed anyway, I think.
2017-05-12 14:00:59 -07:00
Zihong Zheng 7ed716a997 Change to use ESIPP first class fields and update comments 2017-05-12 10:59:00 -07:00
Wojciech Tyczynski 77624a12d3 Remove reasons from iptables syncProxyRules 2017-05-12 13:32:02 +02:00
Kubernetes Submit Queue a126f40c58 Merge pull request #45622 from shyamjvs/mock-proxy
Automatic merge from submit-queue (batch tested with PRs 45571, 45657, 45638, 45663, 45622)

Use real proxier inside hollow-proxy but with mocked syscalls

Fixes https://github.com/kubernetes/kubernetes/issues/43701

This should make hollow-proxy better mimic the real kube-proxy in performance.
Maybe next we should have a more realistic implementation even for fake iptables (adding/updating/deleting rules/chains in an table, just not on the real one)? Though I'm not sure how important it is.

cc @kubernetes/sig-scalability-misc @kubernetes/sig-network-misc @wojtek-t @gmarek
2017-05-12 02:28:43 -07:00
Jiangtian Li 1760767047 Add error to function return 2017-05-11 00:30:07 -07:00
Jiangtian Li 33d878bc5a Run ./hack/update-bazel.sh to update deps in BUILD 2017-05-11 00:29:48 -07:00
Jiangtian Li 1eda859bf9 Fix the issue in unqualified name where DNS client such as ping or iwr validate name in response and original question. Switch to use miekg's DNS library 2017-05-11 00:29:20 -07:00
Shyam Jeedigunta 27fa52390b Use real proxier inside hollow-proxy but with mocked syscalls 2017-05-10 23:45:26 +02:00
Wojciech Tyczynski ce752e3fc9 Remove no-longer used code in proxy/config 2017-05-10 12:16:35 +02:00
Wojciech Tyczynski 57d35d5acb Switch winuserspace proxy to be event based for services 2017-05-10 12:14:37 +02:00
Kubernetes Submit Queue 332b095ca9 Merge pull request #44968 from MrHohn/kube-proxy-healthcheck
Automatic merge from submit-queue (batch tested with PRs 44727, 45409, 44968, 45122, 45493)

Separate healthz server from metrics server in kube-proxy

From #14661, proposal is on kubernetes/community#552.

Couple bullet points as in commit:
- /healthz will be served on 0.0.0.0:10256 by default.
- /metrics and /proxyMode will be served on port 10249 as before.
- Healthz handler will verify timestamp in iptables mode.

/assign @nicksardo @bowei @thockin 

**Release note**:

```release-note
NONE
```
2017-05-08 14:54:38 -07:00
Zihong Zheng e5db5dc3a1 Autogenerated files 2017-05-05 14:44:38 -07:00
Zihong Zheng ca59d909cf Separate healthz server from metrics server in kube-proxy
- /healthz will be served on 0.0.0.0:10256 by default.
- /metrics and /proxyMode will be served on port 10249
  as before.
- Healthz handler will verify timestamp in iptables mode.
2017-05-05 14:43:44 -07:00
Zihong Zheng eed08362d8 Add healthz server support to healthcheck package 2017-05-05 14:42:27 -07:00
Kubernetes Submit Queue 32335ee473 Merge pull request #45208 from MrHohn/proxy-localendpoint-logic
Automatic merge from submit-queue (batch tested with PRs 44590, 44969, 45325, 45208, 44714)

Fix onlylocal endpoint's healthcheck nodeport logic

I was in the middle of rebasing #41162, surprisingly found the healthcheck nodeport logic in kube-proxy is still buggy. Separate this fix out as it isn't GA related.

/assign @freehan @thockin

**Release note**:

```release-note
NONE
```
2017-05-05 14:08:15 -07: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
Zihong Zheng 1cac5db856 Fix onlylocal endpoint's healthcheck nodeport logic 2017-05-02 09:47:27 -07:00
Wojciech Tyczynski eb6949a53e Change locking mechanism in kube-proxy 2017-04-28 09:40:39 +02:00
Chao Xu 958903509c bazel 2017-04-27 09:41:53 -07:00
Chao Xu 3fa7b7824a easy changes 2017-04-27 09:41:53 -07:00
Jeff Grafton 6a0c06926a gofmt proxier_test for go1.8.1 2017-04-25 11:23:59 -07:00
Ketan Kulkarni ac7c026ee7 Reject Rules for ExternalIP and svc port if no ep
- Install ICMP Reject Rules for externalIP and svc port
  if no endpoints are present
- Includes Unit Test case
- Fixes #44516
2017-04-21 16:48:24 -07:00
Wojciech Tyczynski c7353432df Don't rebuild service map in iptables kube-proxy all the time 2017-04-21 09:41:27 +02:00
Wojciech Tyczynski 2f250435fd Don't rebuild endpoints map in iptables kube-proxy all the time. 2017-04-20 08:34:46 +02:00
Wojciech Tyczynski 7a647f9d1a Event-based iptables proxy for services 2017-04-18 13:30:59 +02:00
Wojciech Tyczynski e22476fd42 Introduce event handlers for Services in KubeProxy. 2017-04-18 11:14:07 +02:00
Zihong Zheng ae93b0da15 Refine NeedsHealthCheck logic 2017-04-17 14:26:02 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00