Commit Graph

237 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
Kubernetes Submit Queue 509bf69a2d Merge pull request #47612 from freehan/hostport-bug-fix
Automatic merge from submit-queue (batch tested with PRs 47523, 47438, 47550, 47450, 47612)

append KUBE-HOSTPORTS to system chains instead of prepend

Bug fix for conflicting iptables rules between hostport and kube-proxy
2017-06-15 18:54:08 -07:00
Minhan Xia e6add2072b append KUBE-HOSTPORTS to system chains instead of prepend 2017-06-15 12:06:46 -07:00
Casey Callendrello 14ad62b924 cni: Don't try and map ports with an unset HostPort 2017-06-14 22:31:42 +02: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
Abhinav Dahiya 73555e7ce9 Fix inconsistenty in finding cni binaries
Fixes [#46476]

Signed-off-by: Abhinav Dahiya <abhinav.dahiya@coreos.com>
2017-05-29 16:58:45 -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
Wojciech Tyczynski 9e6de42745 Remove Save() from iptables interface 2017-05-22 13:23:49 +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
Kubernetes Submit Queue aee07e9464 Merge pull request #45446 from zdj6373/cni
Automatic merge from submit-queue

cni Log changes

Newly modified log error, modified
2017-05-09 14:23:32 -07:00
zdj6373 aa86d7734b Log changes 2017-05-06 11:22:37 +08:00
Aaron Levy fe77957461 Skip inspecting pod network if unknown namespace 2017-04-28 11:13:26 -07:00
Kubernetes Submit Queue b19589df31 Merge pull request #44642 from supereagle/fix-comment-error
Automatic merge from submit-queue (batch tested with PRs 42202, 40784, 44642, 44623, 44761)

fix comment error for network plugin

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-04-21 11:52:07 -07:00
supereagle 343f4baa5a fix comment error for network plugin 2017-04-19 07:10:41 +08: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
Kubernetes Submit Queue a1684fea80 Merge pull request #42085 from cblecker/gofmt-fix
Automatic merge from submit-queue (batch tested with PRs 40055, 42085, 44509, 44568, 43956)

Fix gofmt errors

**What this PR does / why we need it**:
There were some gofmt errors on master. Ran the following to fix:
```
hack/verify-gofmt.sh | grep ^diff | awk '{ print $2 }' | xargs gofmt -w -s
```

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-04-17 15:39:07 -07: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
Kubernetes Submit Queue 7629bffba2 Merge pull request #42876 from timchenxiaoyu/accuratehint
Automatic merge from submit-queue (batch tested with PRs 42379, 42668, 42876, 41473, 43260)

accurate hint

accurate hint

same err hint (Error adding network) in one method,cann't position problem
2017-03-30 23:36:26 -07:00
Christoph Blecker 6681835b0c
Fix gofmt errors 2017-03-28 17:12:04 -07:00
Dan Williams 193abffdbe kubelet/cni: hook network plugin Status() up to CNI network discovery
Ensure that the plugin returns NotReady status until there is a
CNI network available which can be used to set up pods.

Fixes: https://github.com/kubernetes/kubernetes/issues/43014
2017-03-21 15:50:39 -05:00
timchenxiaoyu c295514443 accurate hint 2017-03-10 16:41:51 +08: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
Kubernetes Submit Queue 077e67eb77 Merge pull request #42076 from freehan/network-owner
Automatic merge from submit-queue (batch tested with PRs 42058, 41160, 42065, 42076, 39338)

add OWNER file to kubelet/network
2017-02-27 01:30:05 -08:00
Minhan Xia 727c3f28e5 add OWNER file to kubelet/network 2017-02-24 11:41:13 -08:00
Minhan Xia 6b34343946 bug fix for hostport-syncer 2017-02-22 16:38:09 -08:00
Kubernetes Submit Queue 98d1cffe05 Merge pull request #37036 from dcbw/docker-gc-teardown-pods
Automatic merge from submit-queue (batch tested with PRs 40505, 34664, 37036, 40726, 41595)

dockertools: call TearDownPod when GC-ing infra pods

The docker runtime doesn't tear down networking when GC-ing pods.
rkt already does so make docker do it too. To ensure this happens,
infra pods are now always GC-ed rather than gating them by
containersToKeep.

This prevents IPAM from leaking when the pod gets killed for
some reason outside kubelet (like docker restart) or when pods
are killed while kubelet isn't running.

Fixes: https://github.com/kubernetes/kubernetes/issues/14940
Related: https://github.com/kubernetes/kubernetes/pull/35572
2017-02-16 17:05:12 -08:00
Kubernetes Submit Queue 4515f72824 Merge pull request #38101 from CaoShuFeng/haripin_nsenter
Automatic merge from submit-queue (batch tested with PRs 38101, 41431, 39606, 41569, 41509)

[hairpin] fix argument of nsenter

**Release note**:

```release-note
None
```

We should use:
	nsenter --net=netnsPath -- -F some_command
instend of:
	nsenter -n netnsPath -- -F some_command
Because "nsenter -n netnsPath" get an error output:
	# nsenter -n /proc/67197/ns/net ip addr
	nsenter: neither filename nor target pid supplied for ns/net

If we really want use -n, we need to use -n in such format:
	# sudo nsenter -n/proc/67197/ns/net ip addr
2017-02-16 15:49:10 -08:00
Dan Williams 60525801c1 kubelet/network: move mock network plugin to pkg/kubelet/network/testing 2017-02-16 13:48:32 -06:00
Dan Williams 5633d7423a kubelet: add network plugin manager with per-pod operation locking
The PluginManager almost duplicates the network plugin interface, but
not quite since the Init() function should be called by whatever
actually finds and creates the network plugin instance.  Only then
does it get passed off to the PluginManager.

The Manager synchronizes pod-specific network operations like setup,
teardown, and pod network status.  It passes through all other
operations so that runtimes don't have to cache the network plugin
directly, but can use the PluginManager as a wrapper.
2017-02-16 13:48:32 -06:00
Minhan Xia be9eca6b51 teach kubenet to use hostport_manager 2017-02-08 09:35:04 -08:00
Minhan Xia bd05e1af2b add portmapping getter into network host 2017-02-08 09:35:04 -08:00
Minhan Xia 8e7219cbb4 add hostport manager 2017-02-08 09:26:52 -08:00
Minhan Xia aabdaa984f refactor hostport logic 2017-02-08 09:26:52 -08:00
Kubernetes Submit Queue 1b7bdde40b Merge pull request #38796 from chentao1596/kubelet-cni-log
Automatic merge from submit-queue (batch tested with PRs 38796, 40823, 40756, 41083, 41105)

kubelet/network-cni-plugin: modify the log's info

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

  Checking the startup logs of kubelet, i can always find a error like this:
    "E1215 10:19:24.891724    2752 cni.go:163] error updating cni config: No networks found in /etc/cni/net.d"
 
 It will appears, neither i use cni network-plugin or not. 
After analysis codes, i thought it should be a warn log, because it will not produce any actions like as exit or abort, and just ignored when not any valid plugins exit.

 thank you!
2017-02-08 00:49:44 -08:00
Minhan Xia 51526d3103 Add checkpointHandler to DockerService 2017-02-02 10:19:34 -08:00
Kubernetes Submit Queue 32d79c3461 Merge pull request #39443 from freehan/cri-hostport
Automatic merge from submit-queue (batch tested with PRs 40111, 40368, 40342, 40274, 39443)

refactor hostport logic

Refactor hostport logic to avoid using api.Pod object directly.
2017-01-31 19:18:44 -08:00
Minhan Xia 548a6122c5 rename HostportHandler to HostportSyncer 2017-01-30 16:30:06 -08:00
PI-Victor 388144f769
fix a typo in cni log 2017-01-26 21:27:38 +01:00
Minhan Xia 8e318b8d9b refactor hostport logic 2017-01-25 14:52:33 -08:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00