Commit Graph

37 Commits

Author SHA1 Message Date
Hong Zhiguo
b2bf173aaf ipvs: add addrtype match for nodeport 2018-07-04 17:33:31 +08:00
liangwei
a270d14a00 complete ipvs proxier test 2018-06-09 16:00:54 +08:00
hangaoshuai
c3ee2802e4 fix bug excludeCIDRs was not assign in func NewProxier 2018-06-01 09:27:55 +08:00
hangaoshuai
9d944d30a6 remove unused parameter in func buildFakeProxier 2018-05-30 15:18:07 +08:00
Lion-Wei
339f92c175 abstract duplicated code in ipvs proxier 2018-05-16 11:53:15 +08:00
Weibin Lin
10664ee8c6 Add comments for ipset entries in kube-proxy 2018-05-11 17:11:34 +08:00
Lion-Wei
e90de22a5e fix ipvs fw 2018-05-07 11:22:34 +08:00
Kubernetes Submit Queue
191d3c5681
Merge pull request #62718 from Lion-Wei/ipvs-host
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 problem that ipvs can't work with hostPort

**What this PR does / why we need it**:
Make ipvs proxy mode can work with pods that have hostPort.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #61938
#60688 and #60305 are related too.

**Special notes for your reviewer**:
IPVS proxier will create dummy device named `kube-ipvs0`, which will maintain all ipvs virtual service address. That means all ipvs maintained clusterIP/externalIP/ingress will be treat as local address.

Then if we have a pod with hostPort, cni will attach this rule to `PREROUTING` chain:
```
KUBE-HOSTPORTS  all  --  0.0.0.0/0            0.0.0.0/0            /* kube hostport portals */ ADDRTYPE match dst-type LOCAL
```
so if a service have same port with pod's hostport, then this service can't be access.

In this pr, we added `ACCESS` rule for traffic that aim to ipvs virtual service, to prevent those traffic from be blocked by other rules.

**Release note**:
```release-note
NONE
```
2018-04-27 19:50:45 -07:00
Lion-Wei
76f6158b6c add accept for ipvs 2018-04-27 14:38:09 +08:00
Kubernetes Submit Queue
c0d1ab8e99
Merge pull request #62083 from rramkumar1/ipvs-exclude-cidrs-flag
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 --ipvs-exclude-cidrs flag to kube-proxy. 

**What this PR does / why we need it**:
Add a flag to kube-proxy called --ipvs-exclude-cidrs. This flag allows a user to specify a list of CIDR ranges that should not be included in the cleanup of IPVS rules. 

Fixes: #59507

**Release note**:
```
Use --ipvs-exclude-cidrs to specify a list of CIDR's which the IPVS proxier should not touch when cleaning up IPVS rules.
```
/assign @m1093782566
2018-04-24 11:13:14 -07:00
Rohit Ramkumar
056ae4421c Add --ipvs-exclude-cidrs flag to kube-proxy. 2018-04-13 10:09:14 -07:00
m1093782566
00430b4b6c fix nodeport FORWARD chain 2018-04-12 17:25:28 +08:00
Lion-Wei
2acd0abd8c add ut 2018-04-08 10:32:49 +08:00
Lion-Wei
6762a865db fix ipvs esipp 2018-03-31 11:26:46 +08:00
Lion-Wei
c8fae0ee4d add lb source test 2018-03-27 11:31:37 +08:00
Zihong Zheng
f6eed81f21 [kube-proxy] Mass service/endpoint info functions rename and comments 2018-02-27 11:14:02 -08:00
Zihong Zheng
b485f7b5b4 [kube-proxy] Move Service/EndpointInfo common codes to change tracker 2018-02-27 11:05:59 -08:00
m1093782566
c537ff54e7 ipvs part implementation 2018-02-26 23:48:47 +08:00
Kubernetes Submit Queue
9438e14d39
Merge pull request #52528 from m1093782566/refactor-proxy
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>.

Refactor kube-proxy service/endpoints update so that can be consumed among different proxiers

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

There are huge duplication among different proxiers.  For example, the service/endpoints list/watch part in iptables, ipvs and windows kernel mode(to be get in soon).

I think the more places this is replicated the harder it becomes to keep correct. We may need to refactor it and let different proxiers consume the same code.

**Which issue this PR fixes**: 

fixes #52464

**Special notes for your reviewer**:

* This refactor reduces **500** Lines in iptables proxy, so it will reduce **500*N**(number of proxiers) lines in total. People no need to care the service/endpoints update logic any more and can be more focus on proxy logic.

* I would like to do the following things in follow-ups:

1. rsync it to ipvs proxier

2. rsync it to winkernel proxier

**Release note**:

```release-note
Refactor kube-proxy service/endpoints update so that can be consumed among different proxiers
```
2018-02-12 23:29:50 -08:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
m1093782566
8dd4cbe88b ipvs part changes 2018-02-09 17:20:55 +08:00
m1093782566
9cae364ce7 add test for syncvirtualServer 2017-12-30 12:51:59 +08:00
m1093782566
15f427ac2c fix ipvs/proxier_test.go compile error 2017-12-20 15:54:07 +08:00
m1093782566
094eaf4249 test get node IP 2017-12-18 11:03:15 +08:00
m1093782566
dc2e57ba74 refactor canUseIPVSMode and test it 2017-11-27 20:06:47 +08:00
Kubernetes Submit Queue
3df3c580b7
Merge pull request #54219 from m1093782566/ipset
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>.

Using ipset doing SNAT and packet filter in IPVS kube-proxy

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

Try ipset in ipvs proxy mode.

**Which issue this PR fixes**: 

fixes #54203

xref: #53393, #53775

**Special notes for your reviewer**:

**Release note**:

```release-note
Using ipset doing SNAT and packet filtering in IPVS kube-proxy
```

/sig network

/area kube-proxy
2017-11-19 22:09:13 -08:00
m1093782566
fbf8a13376 use ipset doing snat and packet filter in ipvs proxy 2017-11-15 18:02:58 +08:00
m1093782566
42832e7666 fix ipvs proxier getLocalIPs() error 2017-11-13 17:55:53 +08:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
m1093782566
876c73024c migrate ip cmd to netlink 2017-10-24 13:26:07 +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
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
m1093782566
44afb09339 rsync ipvs proxier to HEAD of iptables 2017-09-06 18:36:33 +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