Commit Graph

29 Commits (6d7a9048b67d81e57923892650a23636f1afba42)

Author SHA1 Message Date
Pengfei Ni aeea967149 Kubelet: only sync iptables on linux 2018-09-05 10:22:48 +08:00
Yu-Ju Hong 42398825ed Move the kubelet network package down to dockershim
With CRI, kubelet no longer sets up networking for the pods. The
dockershim package is the rightful owner and the only user of the
newtork package. This change moves the package into dockershim to make
the distinction obvious, and untangles the codebase.

The`network/dns`is kept in the original package since it is only used by
kubelet.
2018-04-11 09:25:56 -07:00
Yu-Ju Hong 37d30a0815 Remove outdated network plugin code
The code was added to support rktnetes and non-CRI docker integrations.
These legacy integrations have already been removed from the codebase.
This change removes the compatibility code existing soley for the
legacy integrations.
2018-04-11 09:21:17 -07:00
Guangya Liu 8d92814bd0 Extract validateNodeIP test to node status test file.
The function of `validateNodeIP` is belong to kubelet_node_status,
so the unit test of this function should be in node status test file.
2018-04-09 12:02:06 +08:00
Zihong Zheng 0bc2e1f62f Move DNS related kubelet codes into its own package 2017-11-15 10:56:44 -08:00
Daneyon Hansen 7ac6fe9c5d Adds Support for Node Resource IPv6 Addressing
Adds support for the following:

1. A node resource to be assigned an IPv6 address.
2. Expands IPv4/v6 address validation checks.

Which issue this PR fixes:
fixes #44848 in combination with PR #45116

Special notes for your reviewer:

Release note:
With this PR, nodes can be assigned an IPv6 address. An IPv4 address is
preferred over an IPv6 address. IP address validation has been expanded
to check for multicast, link-local and unspecified addresses.
2017-11-10 15:13:53 -08:00
Zihong Zheng 5915b87f8a Rearrange kubelet networking codes 2017-11-09 13:43:30 -08:00
Shawn Hsiao 5cba1f47c3 Support copying options in resolv.conf into pod sandbox when dnsPolicy is Default 2017-11-07 07:54:52 -05:00
Kubernetes Submit Queue 6fbc554c6b Merge pull request #48960 from sjenning/no-event-on-dns-dedup
Automatic merge from submit-queue (batch tested with PRs 45040, 48960)

Do not generate warning event on dns search deduplication

In the case that the node is able to use the cluster DNS, `cluster.local` will already be in the node search domains in `/etc/resolv.conf`.  The kubelet then parses `/etc/resolv.conf` on the node and combines it with  $namespace.svc.$clusterDomain, svc.$clusterDomain, and $clusterDomain to create the pod DNS search domains.  clusterDomain is `cluster.local` by default.  This causes the code to generate a Warning event visible to the user for _every_ pod:

```
Warning   DNSSearchForming     Found and omitted duplicated dns domain in host search line: 'cluster.local' during merging with cluster dns domains
```
This is really overkill.  IMHO, this should be done in the background with no user level notification or logging at all.

xref https://bugzilla.redhat.com/show_bug.cgi?id=1471198

@derekwaynecarr @eparis @vefimova
2017-07-25 14:40:44 -07:00
Klaus Ma 63b78a37e0 Added golint check for pkg/kubelet. 2017-07-19 11:33:06 +08:00
Seth Jennings 4fed1971f6 no warning event on dns search deduplication 2017-07-14 15:27:11 -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
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 43dcf0f56c Merge pull request #45036 from apilloud/fix_resolvconf
Automatic merge from submit-queue

resolv.conf nameserver line has only one entry, ignore trailing garbage

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

Per the resolv.conf man page "name servers may be  listed,  one  per  keyword." Some tools such as udhcpc take advantage of this to append comments to nameserver entries. For example: `nameserver 8.8.8.8 # eth0`. This updates the resolv.conf parser to ignore trailing garbage on nameserver lines.

**Release note**:
NONE
2017-06-01 11:41:58 -07:00
Rohit Agarwal 2b594d6197 Add missing Cleanup() calls in kubelet tests.
Possibly related to #45803 and #46204.
2017-05-25 13:19:56 -07:00
Andrew Pilloud 166a0e440d resolv.conf nameserver line has only one entry 2017-04-27 09:23:04 -07:00
Yu-Ju Hong b1e6e7f774 Use the assert/require package in kubelet unit tests
This reduce the lines of code and improve readability.
2017-03-16 10:21:44 -07:00
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
Kubernetes Submit Queue b5929bfb2b Merge pull request #38789 from jessfraz/cleanup-temp-dirs
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

Cleanup temp dirs

So funny story my /tmp ran out of space running the unit tests so I am cleaning up all the temp dirs we create.
2017-01-20 12:34:58 -08:00
vefimova d925439727 Fixed forming of pod's Search line in resolv.conf:
- exclude duplicates while merging of host's and dns' search lines to form pod's one
 - truncate pod's search line if it exceeds resolver limits: is > 255 chars and containes > 6 searches
 - monitoring the resolv.conf file which is used by kubelet (set thru --resolv-conf="") and logging and eventing if search line in it consists of more than 3 entries
   (or 6 if Cluster Domain is set) or its lenght is > 255 chars
 - logging and eventing when a pod's search line is > 255 chars or containes > 6 searches during forming
Fixes #29270
2017-01-17 13:18:26 +00:00
Jess Frazelle a2dbd456a7
cleanup all /tmp/kubelet_test files
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-04 10:26:24 -08:00
Kubernetes Submit Queue 412a3d9914 Merge pull request #36785 from wlan0/kubelet
Automatic merge from submit-queue

No need to ScrubDNS anymore

@thockin This removes the DNS scrubber from kubelet.
2016-12-01 04:52:11 -08:00
Chao Xu 5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
wlan0 78ab19c9c5 No need to ScrubDNS anymore 2016-11-15 10:49:24 -08:00
Minhan Xia 1acaa1db09 Revert "Revert "syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE"" 2016-08-18 10:19:48 -07:00
Daniel Smith 2aa0bb2dfc Revert "syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE" 2016-08-16 18:12:28 -07:00
Minhan Xia 3bf8679232 add syncNetworkUtil in kubelet 2016-08-15 17:42:35 -07:00
Paul Morie 5c836f3582 Extract kubelet network code into its own file 2016-07-08 15:18:07 -04:00