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
Danielle Lancashire
c198062da4
cm: Remove legacy docker references
...
Dockershim and built-in Docker support are gone. Cleans up dead code
references to them.
2022-02-08 16:25:04 +01:00
Kubernetes Prow Robot
a9aad7e034
Merge pull request #103107 from pacoxu/fix-93300
...
ResourceConfigForPod: check initContainers as other QoS func
2021-08-17 11:41:37 -07:00
Li Bo
c3d9b10ca8
feature: support Memory QoS for cgroups v2
2021-07-08 09:26:46 +08:00
pacoxu
f2eec0a816
ResourceConfigForPod: check initContainers as other QoS func
...
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-06-28 19:22:42 +08:00
Kenta Tada
89a4d4b071
kubelet: modify the function of getCgroupSubsystemsV2 to use libcontainer API
2021-06-24 16:58:05 +09:00
b10s
de60340e51
Improve the getCgroupSubsystemsV1() which uses random record per subsystem
...
returned by libcontainercgroups.GetCgroupMounts().
Example array from GetCgroupMounts():
```
[
{
Mountpoint: "/sys/fs/cgroup/systemd",
Root: "/",
Subsystems: []string len: 1, cap: 1, ["systemd"],},
{
Mountpoint: "/sys/fs/cgroup/cpu,cpuacct",
Root: "/",
Subsystems: []string len: 2, cap: 2, ["cpu","cpuacct"],},
{
Mountpoint: "/sys/fs/cgroup/systemd/some/path",
Root: "/some/path",
Subsystems: []string len: 1, cap: 1, ["systemd"],},
]
```
becames a map:
```
[
"memory": "/sys/fs/cgroup/memory/kubepods",
"systemd": "/sys/fs/cgroup/systemd/some/path",
]
```
which seems to be wrong.
Using shortest path of mountpoint per subsystem would be more reliable.
reference issue: https://github.com/kubernetes/kubernetes/issues/95488
2021-01-22 22:21:46 +09:00
Giuseppe Scrivano
ef935bd991
kubelet: clamp cpu shares to max allowed
...
clamp the max cpu.shares to the maximum value allowed by the kernel.
It is not an issue when using cgroupfs, as the kernel will
anyway make sure the value is not out of range and automatically clamp
it, systemd has an additional check that prevents the cgroup creation.
Closes: https://github.com/kubernetes/kubernetes/issues/92855
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-07-20 17:18:03 +02:00
Kubernetes Prow Robot
105c0c6951
Merge pull request #88970 from mysunshine92/correct-NodeAllocatableRoot
...
fix function NodeAllocatableRoot
2020-04-14 11:04:13 -07:00
yameiwang
6783f991c3
fix function NodeAllocatableRoot
2020-03-26 18:48:05 +08:00
Giuseppe Scrivano
bb5ed1b797
kubelet: add initial support for cgroupv2
...
do a conversion from the cgroups v1 limits to cgroups v2.
e.g. cpu.shares on cgroups v1 has a range of [2-262144] while the
equivalent on cgroups v2 is cpu.weight that uses a range [1-10000].
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-03-12 08:50:19 +01:00
David Ashpole
f8dff6bd5b
only collect metrics for cgroups required by the summary API
2019-05-10 12:12:41 -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
Derek Carr
f68f3ff783
Fix cpu cfs quota flag with pod cgroups
2018-03-16 15:27:11 -04:00
Jing Xu
a66ee2eb3f
Add pod-level metric for CPU and memory stats
...
This PR adds the pod-level metrics for CPU and memory stats. cAdvisor
can get all pod cgroup information so we can add this pod-level CPU and
memory stats information from the corresponding pod cgroup
2017-11-22 09:25:23 -08:00
Dr. Stefan Schimanski
012b085ac8
pkg/apis/core: mechanical import fixes in dependencies
2017-11-09 12:14:08 +01:00
David Ashpole
e5a6a79fd7
update cadvisor, docker, and runc godeps
2017-09-05 12:38:57 -07:00
Derek Carr
1ec2a69d9a
Kubelet changes to support hugepages
2017-09-05 09:46:08 -04:00
Xing Zhou
37f9e13025
Remove useless error
2017-07-03 14:59:54 +08:00
Chao Xu
f4989a45a5
run root-rewrite-v1-..., compile
2017-06-22 10:25:57 -07:00
Klaus Ma
83b7f77ee2
Moved qos to api.helpers.
2017-05-20 07:17:57 -04:00
Xing Zhou
22ab45b575
While calculating pod's cpu limits, need to count in init-container.
...
Need to count in init-container when calculating a pod's cpu limits.
Otherwise, may cause pod start failure due to "invalid argument"
error while trying to write "cpu.cfs_quota_us" file.
2017-05-19 12:31:27 +08:00
Seth Jennings
4c30459e49
switch from local qos types to api types
2017-01-10 10:54:30 -06:00
Chao Xu
5e1adf91df
cmd/kubelet
2016-11-23 15:53:09 -08:00
derekwaynecarr
42289c2758
pod and qos level cgroup support
2016-11-02 08:07:04 -04:00
derekwaynecarr
62e1759ac0
update kubelet to look at all cgroup mounts
2016-10-10 14:24:18 -04:00
dubstack
4ddfe172ce
Add support for pod container management
2016-08-19 11:07:33 -04:00
Buddha Prakash
dcfff45ab7
Add checks in Create and Update Cgroup methods
2016-07-07 14:17:14 -07:00
David McMahon
ef0c9f0c5b
Remove "All rights reserved" from all the headers.
2016-06-29 17:47:36 -07:00
Buddha Prakash
a5ead79d43
Add support for basic cgroup management
2016-06-26 15:41:34 -07:00