Commit Graph

108 Commits (7ffa2faeacb213d25c86ab91a2ce5b67f30b9c33)

Author SHA1 Message Date
Kubernetes Submit Queue e14d9a7ffd Merge pull request #48091 from rpothier/kubenet-ipv6
Automatic merge from submit-queue (batch tested with PRs 45467, 48091, 48033, 48498)

Allow Kubenet with ipv6

When running kubenet with IPv6, there is a panic as there
is IPv4 specific code the Event function.
With this change, Event will support IPv4 and IPv6



**What this PR does / why we need it**:
This PR allows kubenet to use IPv6. Currently there is a panic in kubenet_linux.go
as there is IPv4 specific code.

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

**Special notes for your reviewer**:

**Release note**:

```release-note-NONE
```
2017-07-05 12:37:31 -07:00
Dan Williams 36a54bd5a4 kubelet: remove NET_PLUGIN_CAPABILITY_SHAPING
This was effectively unused with v1.5 and later when kubelet stopped
doing internal shaping and delegated all shaping to plugins.
2017-06-30 11:51:22 -05:00
Dan Williams 5b8ad3f7c5 kubelet: remove unused bandwidth shaping teardown code
Since v1.5 and the removal of --configure-cbr0:

0800df74ab "Remove the legacy networking mode --configure-cbr0"

kubelet hasn't done any shaping operations internally.  They
have all been delegated to network plugins like kubenet or
external CNI plugins.  But some shaping code was still left
in kubelet, so remove it now that it's unused.
2017-06-30 11:51:22 -05:00
Robert Pothier d716557f4d Support IPv6 in kubenet_linux.go
When running kubenet with IPv6, there is a panic as there
is IPv4 specific code the Event function.
With this change, Event will support IPv4 and IPv6
2017-06-27 14:36:25 -04:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Dan Williams 45dffed8ac kubelet/network: return but tolerate errors returned from GetNetNS()
Runtimes should never return "" and nil errors, since network plugin
drivers need to treat netns differently in different cases.  So return
errors when we can't get the netns, and fix up the plugins to do the
right thing.

Namely, we don't need a NetNS on pod network teardown.  We do need
a netns for pod Status checks and for network setup.
2017-06-12 14:46:13 -05:00
Dawn Chen 78c1649f5b Revert "kubelet/network: report but tolerate errors returned from GetNetNS()" 2017-05-31 17:16:32 -07:00
Kubernetes Submit Queue 3702352aa9 Merge pull request #43879 from dcbw/fix-up-runtime-GetNetNS
Automatic merge from submit-queue (batch tested with PRs 46076, 43879, 44897, 46556, 46654)

kubelet/network: report but tolerate errors returned from GetNetNS()

Runtimes should never return "" and nil errors, since network plugin
drivers need to treat netns differently in different cases.  So return
errors when we can't get the netns, and fix up the plugins to do the
right thing.

Namely, we don't need a NetNS on pod network teardown.  We do need
a netns for pod Status checks and for network setup.

@kubernetes/rh-networking @kubernetes/sig-network-bugs @DirectXMan12
2017-05-30 23:19:59 -07:00
Tim Hockin 252646b8de Deprecate kubelet non-masquerade-cidr
Also do not install iptables rules if it is set to 0.0.0.0/0
2017-05-26 17:01:58 -07:00
Dan Williams 9e1385b450 kubelet/network: return but tolerate errors returned from GetNetNS()
Runtimes should never return "" and nil errors, since network plugin
drivers need to treat netns differently in different cases.  So return
errors when we can't get the netns, and fix up the plugins to do the
right thing.

Namely, we don't need a NetNS on pod network teardown.  We do need
a netns for pod Status checks and for network setup.
2017-05-23 22:33:12 -05:00
Aaron Levy fe77957461 Skip inspecting pod network if unknown namespace 2017-04-28 11:13:26 -07:00
Casey Callendrello e4eaad3d24 kubelet/networking: add support for cni ConfigLists, pass hostport parameters
** reason for this change **
CNI has recently introduced a new configuration list feature. This
allows for plugin chaining. It also supports varied plugin versions.
2017-04-18 14:23:57 +02:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Andy Goldstein 2c30dc1a60 ConstructPodPortMapping: move & export
Move ConstructPodPortMapping to pkg/kubelet/network/hostport and export
it so downstream projects (such as OpenShift) can use it.
2017-04-06 13:47:33 -04:00
Minhan Xia f006c8bcd3 teach kubenet to use annotation instead of pod object for traffic shaper 2017-02-27 10:11:09 -08:00
Minhan Xia 947e0e1bf5 pass pod annotation to SetUpPod 2017-02-27 10:09:45 -08:00
Minhan Xia 6b34343946 bug fix for hostport-syncer 2017-02-22 16:38:09 -08:00
Minhan Xia be9eca6b51 teach kubenet to use hostport_manager 2017-02-08 09:35:04 -08:00
Minhan Xia 51526d3103 Add checkpointHandler to DockerService 2017-02-02 10:19:34 -08:00
Minhan Xia 548a6122c5 rename HostportHandler to HostportSyncer 2017-01-30 16:30:06 -08:00
Minhan Xia 8e318b8d9b refactor hostport logic 2017-01-25 14:52:33 -08: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
Kubernetes Submit Queue d97f125ddf Merge pull request #39050 from mikedanese/gazel-bump
Automatic merge from submit-queue

bump gazel: pick up some new unit tests
2016-12-29 15:19:18 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Pengfei Ni 25dee7dd83 kubenet: define KubenetPluginName for all platforms 2016-12-29 15:39:16 +08:00
Minhan Xia ff6cdeb9b8 clean up logic that configs TX queue length 2016-12-27 14:43:47 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu 5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
bprashanth 11638e9ee1 Unittests 2016-10-31 13:05:20 -07:00
bprashanth aee5b8099c Skip legacy features (hostport, bwshaping) 2016-10-31 13:05:19 -07:00
bprashanth 48db726342 Split network.Host into LegacyHost and NamespaceGetter 2016-10-31 13:05:19 -07:00
bprashanth 37bc34c567 periodically GC pod ips 2016-10-27 22:15:35 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Dan Williams e2c96db72b kubenet: make it more apparent that kubenet ignores PodCIDR updates
https://github.com/kubernetes/kubernetes/issues/32900
2016-10-05 11:24:02 -05:00
Kubernetes Submit Queue 9c5bf904c2 Merge pull request #32217 from freehan/kubenetcheck
Automatic merge from submit-queue

nit fixes

Do not merge yet. Wait till it gets bigger. 

fix included:
1. use golang native util to list dir
2016-09-24 03:28:28 -07:00
Yifan Gu 5389a74388 kubenet: SyncHostports for both running and ready to run pods.
This fixes the race that happens in rktnetes when pod B invokes
'kubenet.SetUpPod()' before another pod A becomes actually running.

The second 'kubenet.SetUpPod()' call will not pick up the pod A
and thus overwrite the host port iptable rules that breaks pod A.

This PR fixes the case by listing all 'active pods' (all non-exited
pods) instead of only running pods.
2016-09-16 17:29:44 -07:00
Minhan Xia 8031c8d97b use golang native util to list dir 2016-09-07 10:42:27 -07:00
Kubernetes Submit Queue 2a7d0df30d Merge pull request #30727 from asalkeld/iptables-caps
Automatic merge from submit-queue

Clean up IPTables caps i.e.: sed -i "s/Iptables/IPTables/g"

Fixes #30651
2016-09-06 09:01:27 -07:00
Kubernetes Submit Queue 1e21eda604 Merge pull request #31197 from freehan/kubenethairpin
Automatic merge from submit-queue

Deprecate the old cbr0 and flannel networking modes

fixes: #19766
2016-09-02 18:51:05 -07:00
Minhan Xia fd4c947de9 correct typo in kubenet config 2016-09-02 14:33:34 -07:00
Minhan Xia 20ed879faa kubenet checks required cni plugins are present 2016-09-01 17:16:05 -07:00
Angus Salkeld f785f3d3ef Clean up IPTables caps i.e.: sed -i "s/Iptables/IPTables/g" 2016-08-29 10:34:42 +10:00
Kubernetes Submit Queue d3ecad111e Merge pull request #28717 from freehan/ebtable
Automatic merge from submit-queue

Filter duplicate network packets in promiscuous bridge mode (with ebtables)

also fixes: #30783
2016-08-25 19:12:09 -07:00
Minhan Xia c1d3c89cfa fix #30376 that broken cross-build 2016-08-24 13:18:18 -07:00
Minhan Xia 42a554ec0d add ebtables rules to filter duplicate packets 2016-08-24 10:19:29 -07:00
Minhan Xia 950e689637 kubenet set cbr0 mac address 2016-08-24 10:18:48 -07:00
Justin Santa Barbara 902ba4e249 Add network-plugin-mtu option for MTU selection
MTU selection is difficult, and if there is a transport such as IPSEC in
use may be impossible.  So we allow specification of the MTU with the
network-plugin-mtu flag, and we pass this down into the network
provider.

Currently implemented by kubenet.
2016-08-23 01:50:58 -04:00