Commit Graph

12 Commits

Author SHA1 Message Date
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
aabdaa984f refactor hostport logic 2017-02-08 09:26:52 -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
Cao Shufeng
04bc58b6e5 Keep host port socket open for kubenet
When cni is set to kubenet, kubelet should hold the host port socket,
so that other application in this node could not listen/bind this port
any more. However, the sockets are closed accidentally, because
kubelet forget to reconcile the protocol format before comparing.
2016-11-24 04:19:03 -05:00
Chao Xu
5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08: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
118ebd57aa fix a bug in hostport where it flushes KUBE-MARK-MASQ chain 2016-09-09 14:39:47 -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
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Yifan Gu
9140ce07bc kubenet: Fix host port for rktnetes.
Because rkt pod runs after plugin.SetUpPod() is called, so
getRunningPods() does not return the newly created pod, which
causes the hostport iptable rules to be missing for this new pod.
2016-06-23 13:17:01 -07:00
Dan Williams
965492fdd0 kubelet/kubenet: split hostport handling into separate module 2016-06-16 13:44:32 -05:00