Commit Graph

53 Commits

Author SHA1 Message Date
David Ashpole
f43b4f1b95
plumb context from CRI calls through kubelet 2022-10-28 02:55:28 +00:00
Dan Winship
749df8e022 Move iptables consts to kubelet_network_linux.go. 2022-03-26 11:22:51 -04:00
Sascha Grunert
de37b9d293
Make CRI v1 the default and allow a fallback to v1alpha2
This patch makes the CRI `v1` API the new project-wide default version.
To allow backwards compatibility, a fallback to `v1alpha2` has been added
as well. This fallback can either used by automatically determined by
the kubelet.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-11-17 11:05:05 -08:00
JunYang
7735cf7f26 Structured Logging migration: modify dockershim and network part logs of kubelet.
Signed-off-by: JunYang <yang.jun22@zte.com.cn>
2021-02-14 16:01:47 +08:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Davanum Srinivas
33081c1f07
New staging repository for cri-api
Change-Id: I2160b0b0ec4b9870a2d4452b428e395bbe12afbb
2019-03-26 18:21:04 -04:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Zhen Wang
98fc4a107a Update kubelet node status report logic with node lease feature
When node lease feature is enabled, kubelet reports node status to api server
only if there is some change or it didn't report over last report interval.
2018-11-07 11:59:42 -08:00
Pengfei Ni
aeea967149 Kubelet: only sync iptables on linux 2018-09-05 10:22:48 +08:00
Krzysztof Jastrzebski
7ffa4e17e0 Reduce latency to node ready after CIDR is assigned. 2018-08-22 10:43:58 +02:00
Yu-Ju Hong
9a76f73978 Move hairpin mode logic to dockershim
Also moves the CNI binary directory parsing logic into dockerhsim.
2018-04-11 09:21:17 -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
Yu-Ju Hong
59741bdfbd Remove rkt references in the codebase 2018-04-06 12:02:11 -07:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Lee Verberne
e10042d22f Increment CRI version from v1alpha1 to v1alpha2
This also incorporates the version string into the package name so
that incompatibile versions will fail to connect.

Arbitrary choices:
- The proto3 package name is runtime.v1alpha2. The proto compiler
  normally translates this to a go package of "runtime_v1alpha2", but
  I renamed it to "v1alpha2" for consistency with existing packages.
- kubelet/apis/cri is used as "internalapi". I left it alone and put the
  public "runtimeapi" in kubelet/apis/cri/runtime.
2018-02-07 09:06:26 +01:00
Davanum Srinivas
7568462ec3 Remove hacks added for mesos
Since Mesos is no longer in your main repository and since we have
things like dynamic kubelet configuration in progress, we should
drop these undocumented, untested, private hooks.

cmd/kubelet/app/server.go::CreateAPIServerClientConfig
CreateAPIServerClientConfig::getRuntime
pkg/kubelet/kubelet_pods.go::getPhase

Also remove stuff from Dependencies struct that were specific to
the Mesos integration (ContainerRuntimeOptions and Options)

Also remove stale references in test/e2e and and test owners file
2017-12-03 13:52:30 -05:00
Zihong Zheng
386d1b61bd Consolidate DNS codes in kubelet pkg 2017-11-16 21:07:24 -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
Pengfei Ni
9dd589c035 Use constants instead of magic string for runtime names 2017-08-26 22:44:27 +08:00
Michael Taufen
24bab4c20f move KubeletConfiguration out of componentconfig API group 2017-08-15 08:12:42 -07: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
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
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
Andrew Pilloud
166a0e440d resolv.conf nameserver line has only one entry 2017-04-27 09:23:04 -07: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
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05: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
Random-Liu
772bf8e14d Populate NetworkReady Status. 2016-11-05 00:02:05 -07:00
bprashanth
2941aea88e Use podCIDR as a proxy for kubenet.Status 2016-10-31 18:05:30 -07:00
bprashanth
9c585baf1f Teach cri about podCIDR 2016-10-31 13:05:18 -07:00
bprashanth
c11aa2eb77 Teach dockershim to probe for network plugins 2016-10-31 13:05:13 -07:00
Lucas Käldström
565c5e6268 Remove unused net 2016-10-17 16:47:35 +03:00
Lucas Käldström
0800df74ab Remove the legacy networking mode --configure-cbr0 2016-10-16 21:26:41 +03:00
Lucas Käldström
348717c50a Remove the flannel experimental overlay 2016-10-04 11:53:53 +03:00
Steve Leon
a9123de9b4 Moving validateNodeIP to kubelet_node_status.go 2016-09-30 14:07:13 -07:00
Kubernetes Submit Queue
d9533c9530 Merge pull request #29969 from ZTE-PaaS/zhangke-patch-015
Automatic merge from submit-queue

remove duplicate code in updatePodCIDR

As kl.runtimeState.podCIDR() is a sync method, need fetch lock and release lock, so we only invoke once here
2016-08-22 17:40:43 -07:00
Minhan Xia
b31874fe82 bug fixes and nits 2016-08-18 10:19:59 -07: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
Ke Zhang
2b654d1206 optimize code duplicate for updatePodCIDR 2016-08-09 15:46:21 +08:00