Commit Graph

2183 Commits

Author SHA1 Message Date
Sergey Kanzhelev
4c9e96c238 Revert "Merge pull request #92817 from kmala/kubelet"
This reverts commit 88512be213, reversing
changes made to c3b888f647.
2021-01-12 22:27:22 +00:00
Elana Hashman
f3073b739f
Add explanation for kubeClient != nil in NewMainKubelet 2021-01-11 14:57:38 -08:00
Kubernetes Prow Robot
75115236e7
Merge pull request #97006 from lingsamuel/fix-cadvisor-machine-metrics
Fix missing cadvisor machine metrics
2020-12-31 21:15:51 -08:00
Erik Wilson
a4037d2684
Fix cadvisor machine metrics
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
2020-12-04 10:08:05 +08:00
Derek Carr
acb43c7c4a Rework hostfs metrics
Ephemeral storage usage should be calculated by the metrics code,
not the eviction code.
2020-12-03 13:04:25 -07:00
Joel Smith
39a11744ce Partially revert "Include pod /etc/hosts in ephemeral storage calculation for eviction"
This reverts (most of) commit f34b586d01.
2020-12-03 04:47:16 -07:00
xiongzhongliang
90f4aeeea4 use klog.Info and klog.Warning when had no format 2020-11-14 00:55:06 +08:00
David Porter
16f71c6d47 Implement shutdown manager in kubelet
Implements KEP 2000, Graceful Node Shutdown:
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2000-graceful-node-shutdown

* Add new FeatureGate `GracefulNodeShutdown` to control
enabling/disabling the feature
* Add two new KubeletConfiguration options
  * `ShutdownGracePeriod` and `ShutdownGracePeriodCriticalPods`
* Add new package, `nodeshutdown` that implements the Node shutdown
manager
  * The node shutdown manager uses the systemd inhibit package, to
  create an system inhibitor, monitor for node shutdown events, and
  gracefully terminate pods upon a node shutdown.
2020-11-12 21:47:55 +00:00
Kubernetes Prow Robot
f653e6cf92
Merge pull request #94624 from dims/deprecate-dockershim
Deprecate Dockershim
2020-11-12 08:04:50 -08:00
Kubernetes Prow Robot
12d9183da0
Merge pull request #95718 from SergeyKanzhelev/runtimeClass2
RuntimeClass GA
2020-11-12 00:44:51 -08:00
Kubernetes Prow Robot
d233111f5b
Merge pull request #94196 from andrewsykim/registry-creds
kubelet: add alpha credential provider plugins
2020-11-11 19:59:11 -08:00
Kubernetes Prow Robot
f5abe26a19
Merge pull request #93243 from AlexeyPerevalov/NUMAidAndCPUidsInPodResources
Implement TopologyInfo and cpu_ids in podresources interface
2020-11-11 12:35:11 -08:00
Sergey Kanzhelev
06da0e5e74 GA of RuntimeClass feature gate and API 2020-11-11 19:22:32 +00:00
Alexey Perevalov
a8b8995ef2 Implement TopologyInfo and cpu_ids in podresources
It covers deviceplugin & cpumanager.

It has drawback, since cpuset and all other structs including cadvisor's keep
cpu as int, but for protobuf based interface is better to have fixed
int.
This patch also introduces additional interface CPUsProvider, while
DeviceProvider might have been extended too.

Checkpoint not covered by unit test.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
Signed-off-by: Alexey Perevalov <alexey.perevalov@huawei.com>
2020-11-11 13:50:49 +03:00
Haowei Cai
e79ba4877e move lease controller to k8s.io/component-helpers/apimachinery 2020-11-10 15:51:03 -08:00
Andrew Sy Kim
51441fd052 kubelet: support alpha credential provider exec plugins
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-10 13:44:06 -05:00
Tim Allclair
a439bc5572
Remove --redirect-container-streaming functionality (#95935)
* Remove --redirect-container-streaming functionality

* Update bazel
2020-11-09 11:50:11 -08:00
Ling Samuel
c7f2b2aa2f
Remove useless variable and if
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
2020-11-03 15:57:22 +08:00
Sergey Kanzhelev
d974b142d3 follow up for #94109 2020-10-27 07:02:44 +00:00
Kubernetes Prow Robot
47943d5f9c
Merge pull request #94109 from derekwaynecarr/cleanup-kubelet-todos
Cleanup kubelet TODOs that are no longer pertinent.
2020-10-26 23:49:59 -07:00
Kubernetes Prow Robot
f20a36f784
Merge pull request #95428 from roycaihw/cleanup/generalize-lease-controller
Generalize node lease controller
2020-10-23 13:43:02 -07:00
Kubernetes Prow Robot
c6f7fbcfbc
Merge pull request #93220 from wawa0210/fix-93165
ingore apparmor on windows
2020-10-22 23:17:59 -07:00
Haowei Cai
c9bbd8532f generalize lease controller 2020-10-22 11:58:59 -07:00
Kubernetes Prow Robot
01f3f67989
Merge pull request #92663 from AndersonQ/68026-golint-/pkg/kubelet/stats
cleanup: fix golint errors in /pkg/kubelet/stats
2020-10-12 23:48:26 -07:00
Anderson Queiroz
8c724d7933 cleanup: fix golint errors in /pkg/kubelet/stats 2020-10-08 21:59:42 +02:00
Dan Winship
75242fce7a kubelet: allow specifying dual-stack node IPs on bare metal
Discussion is ongoing about how to best handle dual-stack with clouds
and autodetected IPs, but there is at least agreement that people on
bare metal ought to be able to specify two explicit IPs on dual-stack
hosts, so allow that.
2020-10-07 17:25:54 -04:00
Dan Winship
9a7afa69ef kubelet: do dual-stack iptables rules
When the dual-stack feature gate is enabled, set up dual-stack
iptables rules. (When it is not enabled, preserve the traditional
behavior of setting up IPv4 rules only, unless the user explicitly
passed an IPv6 --node-ip.)
2020-10-03 07:46:02 -04:00
Srini Brahmaroutu
fbe5daed73 Change code to use staging/k8s.io/mount-utils 2020-09-16 21:51:24 -07:00
wawa0210
995d654167
ingore apparmor on non Linux operating systems. 2020-09-15 17:30:44 +08:00
Kubernetes Prow Robot
88512be213
Merge pull request #92817 from kmala/kubelet
Check for sandboxes before deleting the pod from apiserver
2020-09-10 07:27:45 -07:00
Davanum Srinivas
d63dd5fe4d
Deprecate Dockershim
Start the clock on removing dockershim in a subsequent release

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-09-09 10:08:07 -04:00
Kubernetes Prow Robot
1d1daaa044
Merge pull request #94084 from brianpursley/kubernetes-93925-logging
Add logging when fail to kill container or pod
2020-09-04 03:32:23 -07:00
Derek Carr
752135242e WIP: node sync at least once 2020-09-01 12:17:26 -04:00
Kubernetes Prow Robot
dce91dece3
Merge pull request #93283 from runzexia/cleanup-unused-container-cache
clean up unused var containerCache
2020-08-28 06:36:33 -07:00
brianpursley
6d001ebb68 Add logging if container or pod fails to be killed 2020-08-25 20:37:49 -04:00
Kubernetes Prow Robot
6da73aa572
Merge pull request #93333 from loburm/fix-logrotate
Fix an issue when rotated logs of dead containers are not removed.
2020-08-20 03:27:23 -07:00
Derek Carr
02daa3ec23 Cleanup kubelet TODOs that are no longer pertinent. 2020-08-19 16:40:54 -04:00
Jordan Liggitt
b181c76cbd Deflake TestUpdateNodeStatusWithLease - guard cached machineInfo 2020-08-05 10:00:36 -04:00
Marian Lobur
5d1b3e26af Fix an issue when rotated logs of dead containers are not removed. 2020-07-24 10:06:24 +02:00
Keerthan Reddy,Mala
90cc954eed add sandbox deletor to delete sandboxes on pod delete event 2020-07-22 11:54:58 -07:00
Jordan Liggitt
d195fc2ec8 Ensure runtimeCache contains all observed started containers on pod delete 2020-07-21 15:54:29 -04:00
RyderXia
136df8ce53 update 2020-07-21 17:00:49 +08:00
Kubernetes Prow Robot
8398bc3b53
Merge pull request #92916 from joelsmith/count-etc-hosts
Include pod /etc/hosts in ephemeral storage calculation for eviction
2020-07-12 06:59:36 -07:00
Kubernetes Prow Robot
93e76f5081
Merge pull request #92442 from tedyu/grace-period-with-map
Respect grace period when removing mirror pod
2020-07-10 17:49:23 -07:00
Kubernetes Prow Robot
a6378d8b12
Merge pull request #92779 from fisherxu/patch-2
Return err when create ContainerLogsDir failed
2020-07-10 15:41:37 -07:00
Kubernetes Prow Robot
1e3eeba9fa
Merge pull request #91577 from knabben/kubelet-bootstrap
kubelet: remove the --bootstrap-checkpoint-path feature
2020-07-09 00:03:41 -07:00
Ted Yu
a76a959294 Respect grace period when removing mirror pod
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-07-08 13:38:24 -07:00
Joel Smith
f34b586d01 Include pod /etc/hosts in ephemeral storage calculation for eviction 2020-07-08 12:58:11 -06:00
Fei Xu
34826c82be Return err when create ContainerLogsDir failed 2020-07-07 09:36:35 +08:00
Sri Saran Balaji Vellore Rajakumar
05240c9218 Add support for disabling /logs endpoint in kubelet 2020-07-06 07:52:30 -07:00
Kubernetes Prow Robot
4a91ecb976
Merge pull request #91863 from knabben/kubelet-memcg-notification
Moving Kubelet kernel-memgc-notification to configuration file
2020-06-25 00:20:37 -07:00
Amim Knabben
c39cf28ed3 Moving Kubelet kernel-memgc-notification to configuration file 2020-06-24 06:44:00 -04:00
Sergey Kanzhelev
ee53488f19 fix golint issues in pkg/kubelet/container 2020-06-19 15:48:08 +00:00
Morgan Bauer
38a1d34401
show error when running dockershim
The error returned when running the dockershim is not checked.
When running dockerless, we should show the existing error.
2020-06-10 17:07:48 -07:00
Amim Knabben
0ed41c3f10 Deprecating --bootstrap-checkpoint-path flag 2020-06-09 15:27:01 -04:00
Kubernetes Prow Robot
1d566466cf
Merge pull request #91500 from deads2k/guarantee-service
reduce race risk in kubelet for missing KUBERNETES_SERVICE_HOST
2020-05-29 15:21:33 -07:00
David Eads
4da0e64bc1 reduce race risk in kubelet for missing KUBERNETES_SERVICE_HOST 2020-05-29 17:11:19 -04:00
Kubernetes Prow Robot
99c50dfd3c
Merge pull request #85225 from DataDog/eric.mountain/cleanup_refmanager_master
Removes container RefManager
2020-05-28 16:37:15 -07:00
Davanum Srinivas
5692926914
Move packages for slightly better UX for consumers
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-20 10:57:46 -04: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
mattjmcnaughton
29fa1f4566
Fix the verify job
Small changes to fix the verify job. Add the proper headers, fix lint
errors, etc...
2020-05-07 17:18:50 -04:00
mattjmcnaughton
7fb6c51822
Move DockerLegacyService interface out of pkg/kubelet/dockershim
DockerLegacyService interface is used throughout `pkg/kubelet`.
It used to live in the `pkg/kubelet/dockershim` package. While we
would eventually like to remove it entirely, we need to give users some form
of warning.

By including the interface in
`pkg/kubelet/legacy/logs.go`, we ensure the interface is
available to `pkg/kubelet`, even when we are building with the `dockerless`
tag (i.e. not compiling the dockershim).
While the interface always exists, there will be no implementations of the
interface when building with the `dockerless` tag. The lack of
implementations should not be an issue, as we only expect `pkg/kubelet` code
to need an implementation of the `DockerLegacyService` when we are using
docker. If we are using docker, but building with the `dockerless` tag, than
this will be just one of many things that breaks.

`pkg/kubelet/legacy` might not be the best name for the package... I'm
very open to finding a different package name or even an already
existing package.
2020-05-07 17:18:49 -04:00
mattjmcnaughton
34c8f51dcb
Remove all uses of dockershim from cmd/kubelet
We can remove all uses of `dockershim` from `cmd/kubelet`, by just
passing the docker options to the kubelet in their pure form, instead of
using them to create a `dockerClientConfig` (which is defined in
dockershim). We can then construct the `dockerClientConfig` only when we
actually need it.
2020-05-07 17:18:49 -04:00
mattjmcnaughton
e0e6d54cdf
Extract running Dockershim into own file
Extract a `runDockershim` function into a file outside of `kubelet.go`.
We can use build tags to compile two separate functions... one which
actually runs dockershim and one that is a no-op.
2020-05-07 17:18:48 -04:00
wawa0210
40da2c521a
Remove duplicate calculation nodename 、hostname 、hostnameOverridden 2020-04-24 07:49:33 +08:00
Tim Hockin
9551ecb7c3 Cleanup: Change "Ip" to "IP" in func and var names 2020-04-10 15:29:50 -07:00
mattjmcnaughton
6b5b8bb186
Delete unused Builder type from kubelet.go
As far as I can tell, nothing uses this type. As a result, it doesn't
really provide any benefit, and just clutters `kubelet.go`.

There's also the risk of it falling out of date with `NewMainKubelet`,
as nothing enforces `NewMainKubelet` being of the `Builder` type.
2020-03-28 20:04:58 -04:00
Eric Mountain
22e0ee768b Removes container RefManager 2020-03-16 14:30:57 +01:00
Kubernetes Prow Robot
7a513b575a
Merge pull request #88440 from smarterclayton/container_success_fix
Ensure Kubelet always reports terminating pod container status
2020-03-04 20:13:04 -08:00
Yu-Ju Hong
2364c10e2e
kubelet: Don't delete pod until all container status is available
After a pod reaches a terminal state and all containers are complete
we can delete the pod from the API server. The dispatchWork method
needs to wait for all container status to be available before invoking
delete. Even after the worker stops, status updates will continue to
be delivered and the sync handler will continue to sync the pods, so
dispatchWork gets multiple opportunities to see status.

The previous code assumed that a pod in Failed or Succeeded had no
running containers, but eviction or deletion of running pods could
still have running containers whose status needed to be reported.

This modifies earlier test to guarantee that the "fallback" exit
code 137 is never reported to match the expectation that all pods
exit with valid status for all containers (unless some exceptional
failure like eviction were to occur while the test is running).
2020-03-04 13:34:25 -05:00
Clayton Coleman
ad3d8949f0
kubelet: Preserve existing container status when pod terminated
The kubelet must not allow a container that was reported failed in a
restartPolicy=Never pod to be reported to the apiserver as success.
If a client deletes a restartPolicy=Never pod, the dispatchWork and
status manager race to update the container status. When dispatchWork
(specifically podIsTerminated) returns true, it means all containers
are stopped, which means status in the container is accurate. However,
the TerminatePod method then clears this status. This results in a
pod that has been reported with status.phase=Failed getting reset to
status.phase.Succeeded, which is a violation of the guarantees around
terminal phase.

Ensure the Kubelet never reports that a container succeeded when it
hasn't run or been executed by guarding the terminate pod loop from
ever reporting 0 in the absence of container status.
2020-03-04 13:34:24 -05:00
Kevin Klues
2327934a86 Rename GetTopologyPodAmitHandler() as
GetAllocateResourcesPodAdmitHandler(). It is named as such to reflect its
new function. Also remove the Topology Manager feature gate check at higher level
kubelet.go, as it is now done in GetAllocateResourcesPodAdmitHandler().
2020-02-27 07:52:43 +00:00
mattjmcnaughton
9e1c99c4e2
Delete the sysctl runtime admit handler
As of https://github.com/kubernetes/kubernetes/pull/72831, the minimum
docker version is 1.13.1. (and the minimum API version is 1.26). The
only time the `RuntimeAdmitHandler` returns anything other than accept
is when the Docker API version < 1.24. In other words, we can be
confident that Docker will always support sysctl.

As a result, we can delete this unnecessary and docker-specific code.
2020-01-22 08:51:39 -05:00
Kubernetes Prow Robot
f4db8212be
Merge pull request #76496 from danielqsj/metrics-2
Clean deprecated metrics
2020-01-13 20:53:09 -08:00
Kubernetes Prow Robot
befc371364
Merge pull request #86702 from mattjmcnaughton/mattjmcnaughton/refactor-oom-watcher-to-allow-greater-test-coverage
Refactor oom watcher to allow greater test coverage
2020-01-10 15:43:37 -08:00
danielqsj
1a9b121764 remove deprecated metrics of kubelet 2020-01-10 16:46:52 +08:00
mattjmcnaughton
8897c435ad
Refactor oom watcher to allow greater test coverage
This diff contains a strict refactor; there are no behavioral changes.

Address a long standing TODO in `oom_watcher_linux_test.go` around test
coverage. We refactor our `oom.Watcher` so it takes in a struct
fulfulling the `streamer` interface (i.e. defines `StreamOoms` method).
In production, we will continue to use the `oomparser` from `cadvisor`.
However, for testing purposes, we can now create our own `fakeStreamer`,
and control how it streams `oomparser.OomInstance`. With this fake, we
can implement richer unit testing for the `oom.Watcher` itself.

Actually adding the additional unit tests will come in a later commit.
2020-01-07 21:48:14 -05:00
louisgong
324e5ce7e3 hollow-node use remote CRI 2020-01-07 11:00:45 +08:00
Jacek Kaniuk
4303be3d9f Revert pull request #85879 "hollow-node use remote CRI" 2019-12-19 10:52:35 +01:00
louisgong
e8e1cc9ee0 extract PreInitRuntimeService from NewMainKubelet 2019-12-18 11:48:29 +08:00
louisgong
0dd468039d inject remoteRuntime to kubelet dependency 2019-12-06 14:12:08 +08:00
louisgong
b469404d97 hollow-node use remote CRI 2019-12-04 17:07:04 +08:00
Travis Rhoden
0c5c3d8bb9
Remove pkg/util/mount (moved out of tree)
This patch removes pkg/util/mount completely, and replaces it with the
mount package now located at k8s.io/utils/mount. The code found at
k8s.io/utils/mount was moved there from pkg/util/mount, so the code is
identical, just no longer in-tree to k/k.
2019-11-15 08:29:12 -07:00
Kubernetes Prow Robot
a08b09d52f
Merge pull request #84279 from matthyx/kuberuntime-startupprobe
Add startupProbe result handling to kuberuntime
2019-11-13 13:01:53 -08:00
Matthias Bertschy
66595d54a0 Add startupProbe result handling to kuberuntime 2019-11-13 08:12:54 +01:00
Kubernetes Prow Robot
897ce3073c
Merge pull request #84533 from davidz627/fix/deprecatedPath
Remove plugin watching of deprecated directory and CSI v0 support in accordance with deprecation policy
2019-11-12 04:48:20 -08:00
David Zhu
802fe12803 Remove plugin watching of deprecated directory {kubelet_root_dir}/plugins and support for CSI V0 in accordance with deprecation announcement in https://v1-13.docs.kubernetes.io/docs/setup/release/notes/ 2019-11-11 11:42:58 -08:00
Kubernetes Prow Robot
0155d18fbc
Merge pull request #84485 from tallclair/mirror-owner
Mirror owner
2019-11-09 20:19:39 -08:00
Kubernetes Prow Robot
ae15368355
Merge pull request #84351 from wojtek-t/promote_node_lease_to_GA
Promote node lease to GA
2019-11-08 09:00:15 -08:00
wojtekt
ffad401b4e Promote NodeLease feature to GA 2019-11-05 09:01:12 +01:00
chendotjs
5381c9afe1 simplify check for IPv6 in kubelet. 2019-11-04 22:01:51 +08:00
Kubernetes Prow Robot
b1ac4cda11
Merge pull request #84253 from yutedz/kube-solve-check
Move CheckLimitsForResolvConf to Kubelet#syncLoop
2019-10-31 18:04:54 -07:00
Tim Allclair
bbb939357e Fix rebase issue 2019-10-30 17:50:13 -07:00
Tim Allclair
f827863128 Inject owner references into mirror pods 2019-10-29 16:14:06 -07:00
Alex Wang
b1a3fb4988 change kubelte nodeInfo to nodeLister 2019-10-24 22:46:59 +08:00
Ted Yu
ae9e93d784 Move CheckLimitsForResolvConf to Kubelet#syncLoop 2019-10-23 17:16:23 -07:00
Kubernetes Prow Robot
3db6d3abcf
Merge pull request #83551 from dims/move-external-facing-kubelet-apis-to-staging
Move external facing kubelet apis to staging
2019-10-10 13:41:36 -07:00
Kubernetes Prow Robot
cc8bfd1cdd
Merge pull request #78720 from goodluckbot/fix-kubelet-runtime-error-log-level
Fix log level for runtime error in kubelet.go
2019-10-08 10:57:10 -07:00
Davanum Srinivas
f29d2272c8
fix gofmt and golint failures
Change-Id: I6535b506f50558b31663a13cd270b15023afa2c6
2019-10-06 18:43:17 -04:00
Davanum Srinivas
d30c489c54
Move pkg/kubelet/pluginregistration and deviceplugin
Change-Id: I06adcb43bd278b430ffad2010869e1524c8cc4ff
2019-10-06 15:28:38 -04:00
Ted Yu
0939f90103 Check whether mirror pod is ciritical in managerImpl#evictPod 2019-10-01 11:12:18 -07:00
Dan Winship
3948f16ff4 Add iptables.Monitor, use it from kubelet and kube-proxy
Kubelet and kube-proxy both had loops to ensure that their iptables
rules didn't get deleted, by repeatedly recreating them. But on
systems with lots of iptables rules (ie, thousands of services), this
can be very slow (and thus might end up holding the iptables lock for
several seconds, blocking other operations, etc).

The specific threat that they need to worry about is
firewall-management commands that flush *all* dynamic iptables rules.
So add a new iptables.Monitor() function that handles this by creating
iptables-flush canaries and only triggering a full rule reload after
noticing that someone has deleted those chains.
2019-09-17 10:19:26 -04:00
Dan Winship
b6c3d5416a Drop iptables firewalld monitoring support
The firewalld monitoring code was not well tested (and not easily
testable), would never be triggered on most platforms, and was only
being taken advantage of from one place (kube-proxy), which didn't
need it anyway since it already has its own resync loop.

Since the firewalld monitoring was the only consumer of pkg/util/dbus,
we can also now delete that.
2019-09-15 15:35:40 -04:00
Travis Rhoden
935c23f2ad
Move HostUtil to pkg/volume/util/hostutil
This patch moves the HostUtil functionality from the util/mount package
to the volume/util/hostutil package.

All `*NewHostUtil*` calls are changed to return concrete types instead
of interfaces.

All callers are changed to use the `*NewHostUtil*` methods instead of
directly instantiating the concrete types.
2019-08-30 10:14:42 -06:00
Kubernetes Prow Robot
d5f9a81d0f
Merge pull request #79873 from tedyu/kube-runtime
Set runtimeState when RuntimeReady is not set or false
2019-08-23 17:58:37 -07:00
Jan Safranek
5b69362ff0 Skip unused volumes in VolumeManager
DesiredStateOfWorldPopulator should skip a volume that is not used in any
pod. "Used" means either mounted (via volumeMounts) or used as raw block
device (via volumeDevices).

Especially when block feature is disabled, a block volume must not get into
DesiredStateOfWorld, because it would be formatted and mounted there.
2019-08-15 10:48:38 +02:00
Kubernetes Prow Robot
56b5f8b47c
Merge pull request #80519 from ethan-daocloud/patch-1
fix typos in kubelet.go
2019-08-12 20:11:51 -07:00
Ted Yu
3865e2b956 Set runtimeState when RuntimeReady is not set or false 2019-08-09 18:52:27 -07:00
Himanshu Pandey
c05d506019 changed IsCriticalPod to return true in case of static pods 2019-08-07 15:47:43 -07:00
Kubernetes Prow Robot
1fcd3d6bac
Merge pull request #80369 from jsafrane/dswp-error
Propagate errors from DSW to pod events
2019-08-05 15:08:16 -07:00
Kubernetes Prow Robot
93e6fb30f0
Merge pull request #74357 from lmdaly/topology-manager-container-manager
Updates to container manager and internal container lifecycle to accommodate TopologyManager
2019-08-01 11:52:17 -07:00
Rong Gao
cda783699b change node-lease-renew-interval to 0.25 of renew-duration
0.25 is a dedicated value to align before default value
of renew-interval but get more heuristic interval
2019-07-29 15:02:11 +08:00
ethan
5d1a42bbbc
fix typos in kubelet.go 2019-07-24 21:16:23 +08:00
Louise Daly
9f0081cc36 Updates to container manager and internal container lifecycle to accommodate Topology Manager
Co-authored-by: Conor Nolan <conor.nolan@intel.com>
2019-07-24 08:09:38 +01:00
Jan Safranek
af0c2fe572 Fix some error messages 2019-07-22 10:54:33 +02:00
Tim Allclair
1eb5aed0dd Register Kubelet server metrics 2019-07-18 14:29:59 -07:00
Rong Gao
95f3e64785 make node lease renew interval more heuristic 2019-07-17 20:57:21 +08:00
Kubernetes Prow Robot
00fe158623
Merge pull request #78414 from tedyu/hdl-pod-addition
Check limits for resolve conf outside the loop
2019-07-11 18:33:22 -07:00
Kubernetes Prow Robot
1c99825adf
Merge pull request #79566 from sukeesh/auditlog
Cleanup: Audit log and error capitalization
2019-07-11 14:33:59 -07:00
Sukeesh
346fdbccf0 Cleanup: Audit log and error capitalization 2019-07-08 20:20:12 +09:00
Khaled Henidak(Kal)
491804001c kubelet: fix ip reporting for downward api 2019-07-03 05:12:39 +00:00
Khaled Henidak(Kal)
dba434c4ba kubenet for ipv6 dualstack 2019-07-02 22:26:25 +00:00
Kubernetes Prow Robot
6f73ab2219
Merge pull request #78908 from dcbw/cni-0.7.1-snapshot
vendor: bump CNI to v0.7.1 snapshot
2019-07-01 21:33:21 -07:00
Kubernetes Prow Robot
dcd57c9e5e
Merge pull request #79076 from draveness/feature/read-nodes-from-scheduler-cache
fix: predicates read nodes from scheduler cache
2019-07-01 15:09:33 -07:00
Dan Williams
8739ade3fa kubelet: add CNI cache dir option and plumb through to CNI and kubenet
libcni 0.7.0 caches ADD operation results and allows the runtime to
retrieve these from the cache. In case the user wants a different
cache directory than the defaul, plumb that through like we do
for --cni-bin-dir and --cni-conf-dir.
2019-07-01 12:14:07 -05:00
Kubernetes Prow Robot
2501a9083d
Merge pull request #68513 from codenrhoden/mount-refactor
Refactor util/mount interface in prep for moving out of k/k
2019-06-28 13:57:28 -07:00
draveness
30b0f8bf3b fix: predicates read nodes from scheduler cache 2019-06-29 02:34:08 +08:00
Kubernetes Prow Robot
231033bd15
Merge pull request #79148 from RobertKrawitz/mirror-pod-delete-loop-fix
Issue 79147: Do not delete an incorrect pod when replacing a mirror pod
2019-06-24 11:24:02 -07:00
draveness
35bc5dc6b6 feat: cleanup feature gates for KubeletPluginsWatcher 2019-06-23 16:59:36 +08:00
Robert Krawitz
12713b3ee4 Do not delete an incorrect pod when replacing a mirror pod 2019-06-20 23:02:16 -04:00
Travis Rhoden
be7da5052f Refactor pkg/util/mount to be more reusable
This patch refactors pkg/util/mount to be more usable outside of
Kubernetes. This is done by refactoring mount.Interface to only contain
methods that are not K8s specific. Methods that are not relevant to
basic mount activities but still have OS-specific implementations are
now found in a mount.HostUtils interface.
2019-06-14 09:35:18 -06:00
goodluckbot
8a7aaad6bd Fix log level for runtime error in kubelet.go 2019-06-05 16:41:08 +08:00
David Ashpole
80ed28b15b disable kubelet local endpoints on windows 2019-06-04 14:07:10 -07:00
Kubernetes Prow Robot
6b6bdc760a
Merge pull request #78504 from dashpole/deprecate_cadvisor_json
Add kubelet flag to disable cadvisor json apis, and mark it deprecrated
2019-06-01 04:44:55 -07:00
Tara Gu
5e18554442 Implement plugin manager - a controller that manages plugin registration/unregistration 2019-05-30 19:00:59 -04:00
Ted Yu
4979686a81 Check limits for resolve conf outside the loop 2019-05-30 13:51:36 -07:00
David Ashpole
785d40923a add kubelet flag to disable cadvisor json apis, and mark it deprecrated 2019-05-30 10:39:45 -07:00
Kubernetes Prow Robot
585fa3acc8
Merge pull request #78073 from mattjmcnaughton/mattjmcnaughton/fix-housekeeping-typos
Standardize housekeeping capitalization
2019-05-22 18:44:37 -07:00
Kubernetes Prow Robot
4f33b5f421
Merge pull request #77820 from dims/charrywanganthony-pr-71835-delete-kubelet-security-controls
Remove deprecated Kubelet security controls
2019-05-22 13:52:25 -07:00
Kubernetes Prow Robot
b7b8addd62
Merge pull request #77068 from monstercy/nodeStatusReportFrequency
fix comment about nodeStatusReportFrequency in kubelet.go
2019-05-21 14:30:10 -07:00
Kubernetes Prow Robot
e476a60ccb
Merge pull request #73241 from vikaschoudhary16/selinux-label
Add correct selinux label at plugin socket directory
2019-05-20 11:07:17 -07:00
mattjmcnaughton
c68690c640
Standardize housekeeping capitalization
Previously, the code base had both `housekeeping` and `houseKeeping`,
which made case sensitive search in vim difficult. Standardize on
`housekeeping`, which was by far the most popular.
2019-05-18 11:30:47 -04:00
vikaschoudhary16
58d1b4d564 Add correct selinux label at plugin socket directory 2019-05-18 12:35:17 +05:30
chaowang
9ba0d47465
Remove deprecated Kubelet security controls
Change-Id: I9f770e6780b60e881092690f6f177d726f474fe3
2019-05-16 13:33:52 -04:00
Kubernetes Prow Robot
ce3ce9a57a
Merge pull request #77023 from obitech/fix_golint_issues_in_kubelet_packages_oom
Fix golint issues in pkg/kubelet/oom
2019-05-15 22:56:21 -07:00
Tim Allclair
41ccf4c77e Don't create a RuntimeClassManager without a KubeClient 2019-05-14 16:41:50 -07:00
obitech
9e35d3d709 Fix golint issues in pkg/kubelet/oom 2019-04-27 10:00:07 +02:00
Ted Yu
1be83c9d4d Utilize read lock for getLastObservedNodeAddresses 2019-04-26 20:05:49 -07:00
Yu Cao
e8b60b1d8d fix comment about nodeStatusReportFrequency in kubelet.go 2019-04-25 19:49:48 +08:00
Kubernetes Prow Robot
8ec6167f61
Merge pull request #74942 from WanLinghao/event_replace
Migrate oom watcher not relying on cAdviosr's API any more
2019-04-24 05:50:05 -07:00
Davanum Srinivas
33081c1f07
New staging repository for cri-api
Change-Id: I2160b0b0ec4b9870a2d4452b428e395bbe12afbb
2019-03-26 18:21:04 -04:00
Kubernetes Prow Robot
046dcbd1ed
Merge pull request #73917 from droslean/cleanup
replace loops with go idiomatic.
2019-03-19 19:01:04 -07:00
Kubernetes Prow Robot
b3ec6c17f1
Merge pull request #75144 from Huang-Wei/followup-74222
kubelet: updated logic of verifying a static critical pod
2019-03-14 14:41:00 -07:00
Wei Huang
d67e7fd47f
kubelet: updated logic of verifying a static critical pod
- check if a pod is static by its static pod info
- meanwhile, check if a pod is critical by its corresponding mirror pod info
2019-03-12 23:40:20 -07:00
Lantao Liu
0ac651bfc3 Include pod logs in the pod ephemeral storage.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-03-08 16:42:14 -08:00
Kubernetes Prow Robot
183e6cc190
Merge pull request #74433 from tallclair/runtimeclass-internal
Migrate RuntimeClass from a CRD to an internal API
2019-03-07 21:19:30 -08:00
David Zhu
41b3579345 Address review comments 2019-03-07 17:17:09 -08:00
Tim Allclair
222988bdda Migrate to internal node.k8s.io client 2019-03-07 11:57:12 -08:00
WanLinghao
b2ce446a88 Migrate oom watcher not relying on cAdviosr any more, it is part of plan
of removing cAdvisor from k8s.
For more informations about this plan, please refer:
https://github.com/kubernetes/kubernetes/issues/68522
2019-03-05 17:06:34 +08:00
Xing Yang
6265f4f78c CSINodeInfo/CSIDriver controller changes
This is the 2nd PR to move CSINodeInfo/CSIDriver APIs to
v1beta1 core storage APIs. It includes controller side changes.
It depends on the PR with API changes:
https://github.com/kubernetes/kubernetes/pull/73883
2019-03-04 16:41:58 -08:00
Fabio Bertinatto
32c0af42e6 Remove last pieces of mount propagation gate 2019-02-28 13:05:02 +01:00
Travis Rhoden
2c4d748bed Refactor subpath out of pkg/util/mount
This patch moves subpath functionality out of pkg/util/mount and into a
new package pkg/volume/util/subpath. NSEnter funtionality is maintained.
2019-02-26 19:59:53 -07:00
danielqsj
79a3eb816c rename latency to duration in metrics 2019-02-18 17:40:04 +08:00
danielqsj
9fd99a48f5 Change kubelet metrics to conform guideline 2019-02-18 14:01:58 +08:00
Nikolaos Moraitis
6e820cdcaf replace loops with go idiomatic. 2019-02-11 11:21:52 +01:00
Kubernetes Prow Robot
a20cd49d6d
Merge pull request #72910 from danielqsj/kn
Add kubelet_node_name metrics
2019-02-05 15:14:06 -08:00
Kubernetes Prow Robot
6a149864fb
Merge pull request #73285 from tallclair/typed-runtimeclass
Migrate RuntimeClass support to the generated typed client
2019-02-04 16:13:30 -08:00
Kubernetes Prow Robot
53a7601e6a
Merge pull request #64648 from dcbw/remove-unused-param
kubelet: remove unused parameter from runtime's SyncPod()
2019-02-01 09:03:45 -08:00
Andrew Kim
0bc5508aca replace client-go/util/integer with k8s.io/utils/integer 2019-01-24 15:34:21 -05:00
Tim Allclair
aab3523e0e Migrate RuntimeClass support to the generated typed client 2019-01-24 11:08:30 -08:00
danielqsj
1d73c7daed Add kubelet_node_name metrics 2019-01-15 18:01:04 +08:00
Kubernetes Prow Robot
0ab3972a08
Merge pull request #72791 from yujuhong/no-rkt
Remove the rkt deprecation warning
2019-01-10 17:09:04 -08:00
Yu-Ju Hong
f8ab673b8f Remove the rkt deprecation warning
The feature was deprecated 1.10. Remove the warning.
2019-01-10 13:27:23 -08:00
gaorong
545aca3d18 fix some typos 2019-01-08 12:46:05 +08:00
Kubernetes Prow Robot
89efdb4173
Merge pull request #71889 from WanLinghao/function_clean_kubelet
Clean unused function in pkg/kubelet/kubelet.go
2019-01-02 23:35:38 -08:00
David Ashpole
70a7fdda02 use Pod.Status.StartTime as pod's cgroup start time in summary API 2018-12-14 14:26:55 -08:00
WanLinghao
ea456bb365 Clean unused function in pkg/kubelet/kublet.go 2018-12-09 14:30:36 +08:00
k8s-ci-robot
e5326f22ea
Merge pull request #70471 from xichengliudui/fix181031
Fix some typos
2018-11-29 00:48:16 -08:00
saad-ali
8f666d9e41 Modify kubelet watcher to support old versions
Modify kubelet plugin watcher to support older CSI drivers that use an
the old plugins directory for socket registration.
Also modify CSI plugin registration to support multiple versions of CSI
registering with the same name.
2018-11-21 18:37:31 -08:00
Renaud Gaubert
229418f261 Update pluginwatcher to ignore CSI metadata dir and non socket files 2018-11-17 01:51:00 +01:00
David Ashpole
630cb53f82 add kubelet grpc server for pod-resources service 2018-11-15 09:43:20 -08:00
Vladimir Vivien
f16d3c56f6 Kubelet plugin watcher update to v1 2018-11-14 05:46:27 -05:00
Frederic Branczyk
4724fca678
pkg/kubelet/stats: Add container log size metric 2018-11-12 22:04:50 +01: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
k8s-ci-robot
160ebd3af2
Merge pull request #70162 from MIBc/commenting-error
Replace resyncTicker with syncTicker in comment
2018-11-05 19:04:25 -08:00
Fabio Bertinatto
6c9b854542 Remove mount propagation feature gate logic 2018-10-31 15:51:37 +01:00
xichengliudui
8477389e7c Fix some types
Fix some typos
2018-10-31 04:05:25 -04:00
Lv Jiawei
06a3391b0c
Replace resyncTicker with syncTicker in commenting
The variable resyncTicker in commenting is out of date. It is replaced with syncTicker.
2018-10-24 10:47:55 +08:00
k8s-ci-robot
0f17e9ade6
Merge pull request #69386 from cblecker/go-1.11
Update to go1.11.1
2018-10-05 17:35:51 -07:00
Christoph Blecker
97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
Walter Fender
f3f46d5f5a Moving the cloudprovider interface to staging.
Individual implementations are not yet being moved.
Fixed all dependencies which call the interface.
Fixed golint exceptions to reflect the move.
Added project info as per @dims and
https://github.com/kubernetes/kubernetes-template-project.
Added dims to the security contacts.
Fixed minor issues.
Added missing template files.
Copied ControllerClientBuilder interface to cp.
This allows us to break the only dependency on K8s/K8s.
Added TODO to ControllerClientBuilder.
Fixed GoDeps.
Factored in feedback from JustinSB.
2018-10-04 14:41:20 -07:00
Krzysztof Jastrzebski
ad330f7dbe Start synchronizing pods after network is ready. 2018-09-21 10:12:49 +02:00
k8s-ci-robot
3429b9aca4
Merge pull request #62544 from astefanutti/56297
Init Kubelet runtime cache before dependent stats provider
2018-09-19 08:38:16 -07:00
Yu-Ju Hong
a1f7ae7ab3 kubelet: skip initializing/using the RuntimeClass in standalone mode
In standalone mode, kubelet will not be configured to talk to an
apiserver. The RuntimeClass manager should be disabled in this case.
2018-09-11 13:21:53 -07:00
Renaud Gaubert
8dd1d27c03 Updated the device manager pluginwatcher handler 2018-09-06 15:34:46 +02:00
Renaud Gaubert
78b55eb5bf Updated the CSI pluginwatcher handler 2018-09-06 15:34:46 +02:00
Tim Allclair
63f3bc1b7e
Implement RuntimeClass support for the Kubelet & CRI 2018-09-04 13:45:11 -07:00
Sandor Szücs
588d2808b7
fix #51135 make CFS quota period configurable, adds a cli flag and config option to kubelet to be able to set cpu.cfs_period and defaults to 100ms as before.
It requires to enable feature gate CustomCPUCFSQuotaPeriod.

Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2018-09-01 20:19:59 +02:00
Kubernetes Submit Queue
33cca5251c
Merge pull request #67255 from bertinatto/promote_mount_propagation
Automatic merge from submit-queue (batch tested with PRs 65251, 67255, 67224, 67297, 68105). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Promote mount propagation to GA

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

This PR promotes mount propagation to GA.

Website PR: https://github.com/kubernetes/website/pull/9823

**Release note**:

```release-note
Mount propagation has promoted to GA. The `MountPropagation` feature gate is deprecated and will be removed in 1.13.
```
2018-08-31 19:25:30 -07:00