Commit Graph

118 Commits (7cbe2d6c5f4c3b00d482dc7de3bfd1831ff0e861)

Author SHA1 Message Date
Dan Winship 4d77d3e75f Update iptables.IsNotFoundError for iptables-nft error messages 2019-05-01 10:42:30 -04:00
JieJhih Jhang 098a7c5972 fix golint 2019-04-26 15:37:38 +08:00
Kubernetes Prow Robot 5b7a790d35
Merge pull request #72185 from dcbw/owners-label-sig-network
OWNERS: add label:sig/network to a bunch of places
2019-02-08 10:36:16 -08:00
Roy Lenferink b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
Andrew Kim 93b086f6ea replace k8s.io/apiserver/pkg/util/trace with k8s.io/utils/trace 2019-01-24 15:34:21 -05:00
Dan Williams 2e339188ed OWNERS: add label:sig/network to a bunch of places 2018-12-19 00:00:02 -06: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
Benjamin Elder 8b56eb8588 hack/update-gofmt.sh 2018-09-24 12:21:29 -07:00
Benjamin Elder f828c6f662 hack/update-bazel.sh 2018-09-24 12:03:24 -07:00
Benjamin Elder 088cf3c37b find & replace version import 2018-09-24 12:03:24 -07:00
wojtekt 6e50f39dbd Avoid allocations when parsing iptables 2018-07-08 10:55:19 +02:00
wojtekt d073b2097f Optimize iptables 2018-07-06 14:25:56 +02:00
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Jeff Grafton a725660640 Update to gazelle 0.12.0 and run hack/update-bazel.sh 2018-06-22 16:22:18 -07:00
Kubernetes Submit Queue 300f4915f3
Merge pull request #65216 from wojtek-t/log_long_iptables_operations
Automatic merge from submit-queue (batch tested with PRs 65152, 65199, 65179, 64598, 65216). 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>.

Log long operations on iptables

Ref #48107
2018-06-21 18:20:19 -07:00
wojtekt 0f9df22616 Log long operations on iptables 2018-06-20 08:43:42 +02:00
Brendan Burns 7b02b6d98c Address a TODO, move to lazy initialization of the firewallD signal handler. 2018-06-07 22:05:20 -07:00
zhouhaibing089 6dc32c33d7 iptables: add timeout when checking rules
in cases where iptables stucks forever due to some reasons, we lost
the availability of kube-proxy, this is about adding a timeout for
the rule checking operations, as a result, it should give us a more
reliable working iptables proxy.
2018-05-02 16:25:17 +08:00
Lion-Wei c8fae0ee4d add lb source test 2018-03-27 11:31:37 +08:00
Dan Winship 34ce573e99 Fix use of "-w" flag to iptables-restore
iptables accepts "-w5" but iptables-restore requires "-w 5"
2018-03-09 08:52:05 -05:00
Dan Winship fc03cfe7a8 add me to iptables/kube-proxy reviewers 2018-02-22 17:36:57 -05:00
Jeff Grafton ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Chun Chen c6375c20b7 Add tests to test if legacy chains/rules can be cleaned up 2017-11-15 15:15:04 +08:00
Kubernetes Submit Queue 2f622b2a28
Merge pull request #52569 from tmjd/add-proxy-forward-rules
Automatic merge from submit-queue (batch tested with PRs 55009, 55532, 55601, 52569, 55533). 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>.

Kube-proxy adds forward rules to ensure NodePorts work

**What this PR does / why we need it**:
Updates kube-proxy to set up proper forwarding so that NodePorts work with docker 1.13 without depending on iptables FORWARD being changed manually/externally.

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

**Special notes for your reviewer**:
@thockin I used option number 2 that I mentioned in the #39823 issue, please let me know what you think about this change.  If you are happy with the change then I can try to add tests but may need a little direction about what and where to add them.

**Release note**:

```release-note
Add iptables rules to allow Pod traffic even when default iptables policy is to reject.
```
2017-11-14 00:09:57 -08:00
Zihong Zheng f7ed9cf09a [kube-proxy] Fix session affinity with local endpoints traffic 2017-11-10 18:42:07 -08:00
Benjamin Bennett a5c334046b Add the iptables wait flag change to more places
There were a few places that the last PR https://github.com/kubernetes/kubernetes/pull/54763 missed because the flags that PR covered were of the form -w2.  Some of the code had --wait=2.  This changes that code to use the same global variable for the wait setting so that everything is consistent.
2017-11-07 10:50:28 -05:00
Rajat Chopra c5740a3737 make iptables wait flag generic; increase the max wait time from 2 seconds to 5 seconds 2017-10-30 14:22:25 -04:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue 494be59fda Merge pull request #50478 from leblancd/v6_iptables_cmds
Automatic merge from submit-queue (batch tested with PRs 52520, 52033, 53626, 50478). 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 kube-proxy to use proper iptables commands for IPv6 operation

For iptables save and restore operations, kube-proxy currently uses
the IPv4 versions of the iptables save and restore utilities
(iptables-save and iptables-restore, respectively). For IPv6 operation,
the IPv6 versions of these utilities need to be used
(ip6tables-save and ip6tables-restore, respectively).

Both this change and PR #48551 are needed to get Kubernetes services
to work in an IPv6-only Kubernetes cluster (along with setting
'--bind-address ::0' on the kube-proxy command line. This change
was alluded to in a discussion on services for issue #1443.

fixes #50474



**What this PR does / why we need it**:
This change modifies kube-proxy so that it uses the proper commands for iptables save and
iptables restore for IPv6 operation. Currently kube-proxy uses 'iptables-save' and 'iptables-restore'
regardless of whether it is being used in IPv4 or IPv6 mode. This change fixes kube-proxy so
that it uses 'ip6tables-save' and 'ip6tables-restore' commands when kube-proxy is being run
in IPv6 mode.

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

**Special notes for your reviewer**:

**Release note**:

```release-note NONE
```
2017-10-11 01:41:42 -07:00
Erik Stidham 7c108f595d Initial changes for adding forward rules 2017-09-15 13:34:20 -05: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
Dane LeBlanc b45a406aca Fix kube-proxy to use proper iptables commands for IPv6 operation
For iptables save and restore operations, kube-proxy currently uses
the IPv4 versions of the iptables save and restore utilities
(iptables-save and iptables-restore, respectively). For IPv6 operation,
the IPv6 versions of these utilities needs to be used
(ip6tables-save and ip6tables-restore, respectively).

Both this change and PR #48551 are needed to get Kubernetes services
to work in an IPv6-only Kubernetes cluster (along with setting
'--bind-address ::0' on the kube-proxy command line. This change
was alluded to in a discussion on services for issue #1443.

fixes #50474
2017-08-10 19:24:44 -04:00
Kubernetes Submit Queue ce27fa6359 Merge pull request #48517 from dims/fix-tests-on-osx
Automatic merge from submit-queue (batch tested with PRs 50029, 48517, 49739, 49866, 49782)

iptables_test should not run on OSX or Windows

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

Fix for failing tests. Let's just skip these on darwin and windows
platforms as iptables is not available on these.

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

Fixes #48509

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-02 12:46:50 -07: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
Davanum Srinivas a6c3af0226 iptables_test should not run on OSX or Windows
Fix for failing tests. Let's just skip building iptables_test.go
on non-linux platforms.

Fixes #48509
2017-07-17 09:59:21 -04:00
Minhan Xia 8de419b19f expose lock release error from iptables util 2017-07-05 14:31:24 -07:00
Dan Winship 127eb53d4d Fix the names of some iptables tests
The delete tests were copy+pasted from the create tests, and the names
not fully updated to match.
2017-06-27 09:26:10 -04:00
Wojciech Tyczynski 1242e8ca20 Minor improvement for memory allocations 2017-05-30 08:11:12 +02:00
Wojciech Tyczynski 9e6de42745 Remove Save() from iptables interface 2017-05-22 13:23:49 +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 bcfae7e1ed Extend Iptables interface with SaveInto 2017-05-19 20:44:25 +02:00
Wojciech Tyczynski 028ac8034b Remove SaveAll from iptables interface 2017-05-19 20:44:25 +02:00
Shyam Jeedigunta da924fc337 Make fake iptables' Save operation more realistic 2017-05-16 11:58:44 +02:00
Dan Williams a4624a0e75 util/iptables: fix cross-build failures due to syscall.Flock()
Fixes: https://github.com/kubernetes/kubernetes/issues/45554
2017-05-14 23:37:52 -05:00