Commit Graph

33 Commits (2f5e738dc18c9c603c2974dc4032aa1344df4917)

Author SHA1 Message Date
Euan Kemp 2f5e738dc1 kubenet: Fix inconsistent cidr usage/parsing
Before this change, the podCIDRs map contained both cidrs and ips
depending on which code path entered a container into it.

Specifically, SetUpPod would enter a CIDR while GetPodNetworkStatus
would enter an IP.

This normalizes both of them to always enter just IP addresses.

This also removes the now-redundant cidr parsing that was used to get
the ip before
2016-05-27 10:47:12 -07:00
Euan Kemp 766eb6f0f7 kubenet: Fix bug where shaper.Reset wasn't called
The error check was inverse what it should have been, causing
shaper.Reset to only get called with invalid cidrs.
2016-05-27 10:20:43 -07:00
Alex Robinson 07d9dff83c Merge pull request #26208 from freehan/kubenetteardownfix
do not return error if TearDownPod is called twice
2016-05-27 09:59:03 -07:00
Minhan Xia 0834dc489a do not return error if TearDownPod is called twice 2016-05-26 11:57:22 -07:00
Minhan Xia 6a3ad1d66d add hostport support for kubenet 2016-05-22 22:18:58 -07:00
Dan Williams 3dbbe26316 kubenet: fix log message text 2016-05-18 11:28:05 -05:00
Dan Williams 5de7b561e3 kubenet: ensure loopback interface is up and consolidate CNI setup 2016-05-18 11:28:05 -05:00
Dan Williams 9b85d20c73 kubelet/runtime: add method to return pod network namespace path
Some runtimes (eg, Hypernetes) don't create network namespaces for pods,
so network plugins must correctly handle any error returned from the
runtime.
2016-05-18 09:26:01 -05:00
k8s-merge-robot fd3ef234de Merge pull request #23711 from dcbw/kubenet-promiscuous
Automatic merge from submit-queue

kubenet: set bridge promiscuous mode based on hairpinMode

Closes: https://github.com/kubernetes/kubernetes/issues/23657
Closes: https://github.com/kubernetes/kubernetes/issues/20475

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/23711)
<!-- Reviewable:end -->
2016-05-12 10:33:18 -07:00
Dan Williams b749902b42 kubenet: set bridge promiscuous mode based on hairpinMode
Closes: https://github.com/kubernetes/kubernetes/issues/23657
Closes: https://github.com/kubernetes/kubernetes/issues/20475
2016-05-12 10:02:33 -05:00
Ed Robinson afdbad078a
Corrects some misspellings in comments
This should help to make
https://goreportcard.com/report/k8s.io/kubernetes#misspell
look a little nicer.
2016-05-11 08:16:13 +01:00
k8s-merge-robot 9f00ed6075 Merge pull request #25377 from freehan/kubenetmutex
Automatic merge from submit-queue

modify kubenet mutex and add timer
2016-05-10 17:22:15 -07:00
k8s-merge-robot 3894c7972c Merge pull request #25185 from freehan/kubenetgetpodstatus
Automatic merge from submit-queue

kubenet try to retrieve ip inside pod net namespace

Kubenet currently stores the ips of pods inside a map. Kubelet gets pod ip from kubenet during syncpod. If Kubelet restarts, all pods on the node lost their ips in podStatus. This PR adds logic to retrieve pod IP from pod netns. 

cc: @yujuhong
2016-05-10 16:08:45 -07:00
Minhan Xia 3573903a8d modify kubenet mutex and add timer 2016-05-09 14:54:15 -07:00
k8s-merge-robot 32256d53aa Merge pull request #25136 from dcbw/kubenet-fixup-txqueuelen
Automatic merge from submit-queue

kubenet: fix up CNI bridge TX queue length if needed

CNI's bridge plugin mis-handles the TxQLen when creating the bridge,
leading to a zero-length TX queue.  This doesn't typically cause
problems (since virtual interfaces don't have hard queue limits)
but when adding traffic shaping, some qdiscs pull their packet
limits from the TX queue length, leading to a packet limit of 0
in some cases.  Until we can depend on a new enough version of
CNI, fix up the TX queue length internally.

Closes: https://github.com/kubernetes/kubernetes/issues/25092
2016-05-06 06:29:31 -07:00
Minhan Xia ae6f9ab970 kubenet try to retrieve ip inside pod net namespace 2016-05-05 17:57:32 -07:00
Minhan Xia 04b80f7fb8 rename Status interface to GetPodNetworkStatus 2016-05-04 13:46:31 -07:00
Minhan Xia 265fdd9344 add NetworkStatus in NetworkPlugin interface for kubelet to consume 2016-05-04 13:46:31 -07:00
Dan Williams aad6535a00 kubenet: fix up CNI bridge TX queue length if needed
CNI's bridge plugin mis-handles the TxQLen when creating the bridge,
leading to a zero-length TX queue.  This doesn't typically cause
problems (since virtual interfaces don't have hard queue limits)
but when adding traffic shaping, some qdiscs pull their packet
limits from the TX queue length, leading to a packet limit of 0
in some cases.  Until we can depend on a new enough version of
CNI, fix up the TX queue length internally.
2016-05-04 10:14:40 -05:00
Minhan Xia c8470c49ac add mutex for kubenet 2016-04-26 13:58:10 -07:00
k8s-merge-robot a586177360 Merge pull request #23740 from dcbw/kubenet-shaper
Automatic merge from submit-queue

kubenet: hook pod bandwidth resources up to shaper

@bprashanth @thockin Last bit for shaping.
2016-04-25 22:15:42 -07:00
Minhan Xia a7783e5334 add log line before invoking network plugin 2016-04-19 15:34:06 -07:00
Dan Williams 8086d64131 kubenet: hook pod bandwidth resources up to shaper 2016-04-19 15:32:46 -05:00
k8s-merge-robot d0b52dd8b3 Merge pull request #24107 from yifan-gu/load_bridge
Automatic merge from submit-queue

kubenet: Load bridge netfilter module in Init().

This lets the kubenet loads the bridge netfilter module and set bridge-nf-call-iptables=1

Fix #24018 

Follow up PRs would be appreciate if we also load the module in the bridge plugin binary itself. Ref https://github.com/kubernetes/kubernetes/issues/24018#issuecomment-207682514

cc @kubernetes/sig-node @sjpotter @euank
2016-04-18 00:08:25 -07:00
k8s-merge-robot 8990897ce6 Merge pull request #23940 from freehan/netinterface
Automatic merge from submit-queue

switch to use ContainerID instead of DockerID in network plugin interface

fix: #15663
2016-04-17 01:12:51 -07:00
Yifan Gu 02c0f41c88 kubenet: Load bridge netfilter module in Init().
Also set 'bridge-nf-call-iptables' to true.
2016-04-14 18:43:22 -07:00
Minhan Xia 3c58d1ffd3 switch to use ContainerID instead of DockerID in network plugin interface 2016-04-06 16:04:52 -07:00
Minhan Xia f690220b5c Merge pull request #23704 from freehan/kubenet
Update cni binary

#23712 is depending on this. Not sure why this one gets in first. Hand merging this
2016-04-06 15:47:42 -07:00
Minhan Xia d026d7ecbc Update cni binary 2016-03-31 13:57:51 -07:00
Dan Williams f1323103db Embed NoopNetworkPlugin into other network plugins
Let Noop handle common functions.
2016-03-30 11:51:21 -05:00
goltermann 34d4eaea08 Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code. 2016-03-22 17:26:50 -07:00
Tim St. Clair 3b9feb561c Use the default interface for reporting network stats. 2016-03-01 16:17:04 -08:00
Dan Williams fabb65c13f Add a network plugin that duplicates "configureCBR0" functionality 2016-02-03 10:08:08 -06:00