Commit Graph

184 Commits

Author SHA1 Message Date
Jason Simmons
5a6acf85fa Align lifecycle handlers and probes
Align the behavior of HTTP-based lifecycle handlers and HTTP-based
probers, converging on the probers implementation. This fixes multiple
deficiencies in the current implementation of lifecycle handlers
surrounding what functionality is available.

The functionality is gated by the features.ConsistentHTTPGetHandlers feature gate.
2022-10-19 09:51:52 -07:00
Kubernetes Prow Robot
127f33f63d
Merge pull request #111221 from inosato/remove-ioutil-from-kubelet
Remove ioutil in kubelet/kubeadm and its tests
2022-09-17 21:56:28 -07:00
inosato
7dc1f5e30b Fix comments 2022-09-18 12:51:03 +09:00
Kubernetes Prow Robot
2e64ae6d62
Merge pull request #110733 from psschwei/probe-grace-period-units
Add unit tests for grace period in killContainer func
2022-07-29 22:30:27 -07:00
inosato
3b95d3b076 Remove ioutil in kubelet and its tests
Signed-off-by: inosato <si17_21@yahoo.co.jp>
2022-07-30 12:35:26 +09:00
Paul S. Schweigert
caa2fce0a1
add unit tests for grace period in killContainer func
Signed-off-by: Paul S. Schweigert <paulschw@us.ibm.com>
2022-07-29 11:40:27 -04:00
Lee Verberne
d238e67ba6 Remove EphemeralContainers feature-gate checks 2022-07-26 02:55:30 +02:00
yxxhero
4fac7486d4 remove ioutil in kubelet
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-04-27 21:08:42 +08:00
KeZhang
3946d99904 Ignore container notfound error while getPodstatuses 2022-02-16 08:55:19 +08:00
Kubernetes Prow Robot
64e83a7e43
Merge pull request #107945 from saschagrunert/cri-verbose
Add support for CRI `verbose` fields
2022-02-14 17:58:12 -08:00
Kubernetes Prow Robot
1659924a97
Merge pull request #108070 from jsafrane/remove-selinux
Remove util/selinux package
2022-02-11 18:19:47 -08:00
Jan Safranek
77aa06d0c8 Remove util/selinux package
The package says:

> the libcontainer SELinux package is only built for Linux, so it is
> necessary to have a NOP wrapper which is built for non-Linux platforms

This is not true, Kubernetes now imports
github.com/opencontainers/selinux/go-selinux and it has proper
multiplatform support (i.e. NOOP on non-Linux platforms).

Removing the whole package and calling go-selinux directly.
2022-02-11 15:20:35 +01:00
Sascha Grunert
effbcd3a0a
Add support for CRI verbose fields
The remote runtime implementation now supports the `verbose` fields,
which are required for consumers like cri-tools to enable multi CRI
version support.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-02-10 17:12:26 +01:00
Ciprian Hacman
0819451ea6 Clean up logic for deprecated flag --container-runtime in kubelet
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-02-10 13:26:59 +02:00
Ciprian Hacman
5bae9b9288 Clean up DockerLegacyService interface
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2021-12-18 12:24:54 +02: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
rarashid
bf2ae14501 Move feature flag to beta (but leave as false) and remove the feature flag from Kubelet 2021-07-13 14:25:44 -05:00
Kubernetes Prow Robot
13cafd5cb0
Merge pull request #101480 from yuzhiquan/little-nit-for-kubelet
Fix some nit for kubelet
2021-05-24 21:49:05 -07:00
Kubernetes Prow Robot
a49b4a1018
Merge pull request #100608 from pacoxu/fix/poststart-hook
correct messages in post start hook error handling
2021-05-24 21:48:32 -07:00
pacoxu
75c19da843 correct messages in post start hook error handling
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-05-20 15:14:47 +08:00
Kubernetes Prow Robot
a238eb2fe8
Merge pull request #99748 from rphillips/fixes/check_log_path_for_restart_count
kubelet: fix log files being overwritten on container state loss
2021-05-03 16:14:19 -07:00
yuzhiquan
bebca30309 comment should have function name as prefix 2021-04-28 15:26:46 +08:00
Quan Tian
a90df057ac Fix panic when killing container fails
Use runningPod for logging as the pod passed in could be nil.
2021-04-12 14:02:53 +08:00
Ryan Phillips
d169c81496 check log directory for restartCount 2021-03-15 15:33:29 -05:00
Elana Hashman
9fb6e712ff
Override terminationLivenessGracePeriod for probes 2021-03-11 14:38:03 -08:00
chenyw1990
68457812f3 Use structured logging to refactor log printing code, and add containerName to log output information 2021-03-05 09:10:05 +08:00
uzuku
8c53bfe1ea Fix typo in comment for purgeInitContainers. 2021-02-26 21:33:31 +08:00
Artyom Lukianov
38dc7509f8 cpu manager: specify the container CPU set during the creation
We can set the container cpuset.cpus diring the creation and it
will not need to call to update resources after the container creation.

Additional side effect of the change, that the runc process that responsible
to create the container will run with the same CPU affinity because the
runc runs on the cpuset provided in the config.json arg.

It will allow to prevent undesirable interupts on isolated CPUs.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-01-20 17:53:33 +02:00
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
Seth Jennings
c8d02f703b kubelet: do not rerun init containers if any main containers have status 2020-12-01 14:59:03 -06: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
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
brianpursley
6d001ebb68 Add logging if container or pod fails to be killed 2020-08-25 20:37:49 -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
851d778531 address review comments 2020-07-22 11:54:58 -07:00
Keerthan Reddy,Mala
90cc954eed add sandbox deletor to delete sandboxes on pod delete event 2020-07-22 11:54:58 -07:00
Kubernetes Prow Robot
9a3276548b
Merge pull request #91956 from kinvolk/rata/fix-kubelet-log-on-kill
kubelet: Fix log typo when killing a container
2020-06-24 13:30:38 -07:00
Rodrigo Campos
82856541fb kubelet: Fix log typo when killing a container
Signed-off-by: Rodrigo Campos <rodrigo@kinvolk.io>
2020-06-20 20:15:27 -03:00
Sergey Kanzhelev
ee53488f19 fix golint issues in pkg/kubelet/container 2020-06-19 15:48:08 +00: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
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
Kubernetes Prow Robot
0d8b4b5df4
Merge pull request #85994 from coderanger/patch-1
Tiny typo in a comment.
2020-04-06 15:41:47 -07:00
Eric Mountain
22e0ee768b Removes container RefManager 2020-03-16 14:30:57 +01:00
Lee Verberne
9a6d50cb2a Add namespace targeting to the kubelet 2020-01-30 15:31:43 +01:00
Noah Kantrowitz
0ac25f51fc
Tiny typo in a comment. 2019-12-06 01:32:09 -08:00
Kubernetes Prow Robot
4e45328e65
Merge pull request #83123 from aramase/dualstack-downward-api
Dualstack downward api
2019-11-14 22:13:42 -08:00
Kubernetes Prow Robot
d3593c07de
Merge pull request #83057 from bclau/windows/containerd
Windows: Fixes termination-file mounting support for containerd
2019-11-13 17:27:36 -08:00
Claudiu Belu
d4d7f58362 Windows: Fixes termination-file mounting for containerd
If Containerd is used on Windows, then we can also mount individual
files into containers (e.g.: termination-log files), which was not
possible with Docker.

Checks if the container runtime is containerd, and if it is, then also
mount the termination-log file.
2019-11-12 23:33:55 -08:00
Anish Ramasekar
af4d18ccf9
add status.podIPs in downward api
add host file write for podIPs

update tests

remove import alias

update type check

update type check

remove import alias

update open api spec

add tests

update test

add tests

address review comments

update imports

remove todo and import alias
2019-10-25 09:18:49 -07:00
Kubernetes Prow Robot
4cff1c3ea1
Merge pull request #81280 from yqwang-ms/yqwang/exitmsglost
Fix Container exit message lost due to FallbackToLogsOnError is not compatible with ContainerCannotRun
2019-10-08 15:41:51 -07:00