Commit Graph

9248 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
c0841211fd Merge pull request #98990 from gjkim42/kubelet-pod-structured-logging
Migrate `pkg/kubelet/pod,pleg` to structured logging
2021-02-16 20:03:05 -08:00
Kubernetes Prow Robot
a4b3d31678 Merge pull request #98730 from dims/mark-cmd-line-params-related-to-dockershim-as-deprecated
Mark commandline parameters related to dockershim as deprecated
2021-02-16 13:45:18 -08:00
Kubernetes Prow Robot
55626cf2c6 Merge pull request #95301 from lorenz/pr-remove-dangling-volumes
Automatically remove orphaned pod's dangling volumes
2021-02-16 12:53:06 -08:00
Kubernetes Prow Robot
e7cc2117a0 Merge pull request #98956 from gjkim42/fix-race-KillPod
kubelet: Fix race when KillPod followed by IsPodPendingTermination
2021-02-16 10:13:10 -08:00
Kubernetes Prow Robot
d0a433fa45 Merge pull request #98458 from SaranBalaji90/profiling
Add support to disable /debug/pprof and /debug/flags/v endpoint
2021-02-16 10:12:58 -08:00
Nikhita Raghunath
c3c45b9b8c *: move balajismaniam to emeritus_approvers 2021-02-16 10:55:47 +05:30
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
jialaijun
15612338e5 Migrate pkg/kubelet/metrics logs to structured logging. 2021-02-14 09:41:35 +08:00
Geonju Kim
221025ce74 Migrate pkg/kubelet/pleg to structured logging 2021-02-14 07:24:28 +09:00
Geonju Kim
504cc5b1e4 Migrate pkg/kubelet/pod to structured logging 2021-02-14 07:23:09 +09:00
Geonju Kim
5e752968c3 Simulate KillPod in TestSyncPodsDeletesWhenSourcesAreReadyPerQOS 2021-02-14 07:17:48 +09:00
Geonju Kim
b451c15bf7 kubelet: Fix race when KillPod followed by IsPodPendingTermination
Ensures the pod to be pending termination or be killed, after
(*podKillerWithChannel).KillPod has been returned, by limiting
one request per pod in (*podKillerWithChannel).KillPod.
2021-02-14 07:16:49 +09:00
JunYang
28a232888e fix error description of reconcileHugePageResource log
Signed-off-by: JunYang <yang.jun22@zte.com.cn>
2021-02-13 17:02:44 +08:00
Qi Wang
e84af0ac13 Migrate pkg/kubelet/nodestatus to structured logging
Migrate pkg/kubelet/nodestatus to structured logging

Signed-off-by: Qi Wang <qiwan@redhat.com>
2021-02-12 13:15:45 -05:00
Odin Ugedal
124de526cb Fix cgroup handling for systemd with cgroup v2
This fixes issues where kubelet enforces qos and nodeAllocatable on the
worng hierarchy. Kublet will now create the files

/sys/fs/cgroup/kubepods/{burstable,besteffort,}/pod-xyz

when running with systemd as the driver, making it impossible to enforce
the limits on nodeAllocatable.
2021-02-12 10:44:38 +01:00
Sri Saran Balaji Vellore Rajakumar
af05a7eca3 Refactor Kubelet Server to take kubeConfiguration instead of multiple fields 2021-02-11 16:15:35 -08:00
Sri Saran Balaji Vellore Rajakumar
51cdf4e97b Add support to disable /debug/pprof and /debug/flags/v endpoint
Co-authored-by: xiaofei.sun <sunxiaofei@kuaishou.com>
Co-authored-by: SaranBalaji90 <srisaranbalaji@gmail.com>
2021-02-11 15:56:53 -08:00
Kubernetes Prow Robot
2d153fe04e Merge pull request #98969 from khenidak/beta-feature
upgrade IPv6DualStack feature to beta and turn on by default
2021-02-11 11:53:37 -08:00
Davanum Srinivas
6150378d36 Mark commandline parameters related to dockershim as deprecated
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-02-10 21:04:19 -05:00
Khaled (Kal) Henidak
32b9e31c23 ammend tests to ensure feat gate is off when expected (beta: gate is always on) 2021-02-10 23:58:55 +00:00
Kubernetes Prow Robot
dcec526c80 Merge pull request #98938 from rphillips/fixes/race_TestSyncPodsDeletesWhenSourcesAreReadyPerQOS
kubelet_test: fixes race in TestSyncPodsDeletesWhenSourcesAreReadyPerQOS
2021-02-10 09:10:59 -08:00
Ryan Phillips
ee8ea1b2c1 kubelet_test: fixes race in TestSyncPodsDeletesWhenSourcesAreReadyPerQOS 2021-02-10 09:36:32 -06:00
Kubernetes Prow Robot
d819199065 Merge pull request #97888 from pacoxu/fix/97565
check containerd as well as docker-containerd
2021-02-09 23:46:59 -08:00
Kubernetes Prow Robot
071bdc344e Merge pull request #98643 from chenyw1990/structuredLogsOfKubeletServer
pkg/kubelet/server: migrate to structured logs
2021-02-09 21:58:59 -08:00
Kevin Klues
8a5fca3f1f Add klueska as an approver in pkg/kubelet/OWNERS
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-02-09 21:43:35 +01:00
Michael Beaumont
a5a6762d33 Move pkg/kubelet/apis to k8s.io/kubelet/pkg/apis 2021-02-09 21:37:39 +01:00
Kubernetes Prow Robot
b9b11d3100 Merge pull request #98510 from jsturtevant/windows-metrics-access-denied
Ignore transient errors when gathering stats for Windows Containers in Dockershim
2021-02-09 10:25:30 -08:00
Kubernetes Prow Robot
3ad19200ba Merge pull request #97321 from shawnhanx/master
Change the upper limit of evictionthreshold from 10000% to 100%
2021-02-09 10:25:13 -08:00
Kubernetes Prow Robot
45d9a13b94 Merge pull request #96451 from ping035627/k8s-201112
Extract the const for ContainerStateReason
2021-02-09 10:25:00 -08:00
Kubernetes Prow Robot
943e67c01f Merge pull request #95479 from mgjeong/feature-memory-manager-working
Memory manager
2021-02-09 03:40:56 -08:00
Kubernetes Prow Robot
0635d3d4c5 Merge pull request #98896 from derekwaynecarr/emeritus-node
Mark vishh as emeritus sig-node approver
2021-02-09 02:45:52 -08:00
chenyw1990
db5de9169f pkg/kubelet/server: migrate to structured logs 2021-02-09 15:34:52 +08:00
Kubernetes Prow Robot
2b7c61b1bb Merge pull request #98205 from pacoxu/build/pauses
update pause image to 3.4.1 and also update the change log
2021-02-08 18:20:58 -08:00
Artyom Lukianov
102124464a memory manager: improve the reserved memory validation logic
We will have two layers of the validation.

- the first part of the validation logic will be implemented under the
`ValidateKubeletConfiguration` method
- the second one that requires knowledge about machine topology and
node allocatable resources will be implemented under the memory manager.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:02 +02:00
Artyom Lukianov
932134034c memory manager: update API constant to have camel case format
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:02 +02:00
Artyom Lukianov
e8ea461bfd memory manager: update all relevant part of code to use []MemoryReservation
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:01 +02:00
Artyom Lukianov
7561a0f96e memory manager: provide new flag var to parse reserved-memory parameter
The new flag will parse the `--reserved-memory` flag straight forward
to the []kubeletconfig.MemoryReservation variable instead of parsing
it to the middle map representation.

It gives us possibility to get rid of a lot of unneeded code and use the single
presentation for the reserved-memory.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:01 +02:00
Artyom Lukianov
b7cfc40deb memory manager: update kubelet config API
Update kubelet config API to use slice of MemoryReservation
structs instead of slice of maps.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:01 +02:00
Artyom Lukianov
0fa5dd5532 memory manager: move the fakeTopologyManagerWithHint
Move the fakeTopologyManagerWithHint and all related methods
from the topology manager package to the memory manager static policy unittests.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:01 +02:00
Artyom Lukianov
d0089db2ec memory manager: remove unused variable under stateCheckpoint 2021-02-09 01:10:01 +02:00
Artyom Lukianov
ff2a110920 memory manager: provide the new type to contain resources for each NUMA node
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:00 +02:00
Artyom Lukianov
a015e4163f memory manager: rename state structs and fields
The commit rename state structs and some fields under these structs.

- NodeMap -> NUMANodeMap
- NodeState -> NUMANodeState
- NUMANodeState.Nodes -> NUMANodesState.Cells

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:00 +02:00
Artyom Lukianov
aa63e5aed2 memory manager: provide an additional validation for reserved memory
Calculate the total amount of reserved memory only for NUMA nodes
that are existing under the machine.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:00 +02:00
Artyom Lukianov
27c5efe8ec memory manager: fix scheme unit test
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:00 +02:00
Artyom Lukianov
24be74e759 memory manager: update bazel files
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:09:59 +02:00
Artyom Lukianov
f7845ed4e9 memory manager: provide memory manager static policy unittests
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:09:59 +02:00
Krzysztof Wiatrzyk
d7175a831c memory manager: adding Memory Manager component unit tests
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2021-02-09 01:09:59 +02:00
Pawel Rapacz
18c8a821e0 memory manager: implement GetPodTopologyHints method
It will return memory and hugepages hints for the whole pod.

Signed-off-by: Pawel Rapacz <p.rapacz@partner.samsung.com>
2021-02-09 01:09:59 +02:00
Artyom Lukianov
abb94bec51 memory manager: implement the memory manager static policy
- The `Allocate` method will try to allocate the memory according to the affinity hints
  saved under the `TopologyManager` store. If the store does not have any hints for the memory
  it will call `getDefaultHint` to get the default hint. If the affinity does not satisfy
  the memory request, it will call `extendTopologyManagerHint` to extend the topology hint to
  satisfy the memory request. Once it has the preferred hint, it will allocate the memory and
  update the the memory manager state accordingly.

- The `RemoveContainer` will release the allocated memory and update the memory manager state accordingly.

- The `GetTopologyHints` method will try to re-generate topology hints when the container already presents
  under the memory manager state. If it does not present it will call `calculateHints` to get topology hints.
  The `calculateHints` uses an approach similar to the one used under the CPU manager:
  1. If the container memory request can be satisfied by the single NUMA node, it will not allocate the memory from
     more than one NUMA node and it will set only single NUMA hints as the preferred one.
     It can affect the density, but it gives us guarantees regarding the NUMA alignment.
  2. The NUMA node used in the multi NUMA assignment can not be used in the single NUMA assignment.
     And the NUMA node used in the single NUMA assignment can not be used in the multi NUMA assignment.
  3. Only hints with NUMA node that have enough memory will be returned.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:09:59 +02:00
Artyom Lukianov
371c918e6c memory manager: add memory manager policy to defaulter and conversion files
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:09:59 +02:00