Commit Graph

8861 Commits

Author SHA1 Message Date
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
Kubernetes Prow Robot
61dc69ac2c
Merge pull request #87461 from bboreham/fix-uid-gen
kubelet: ensure static pod UIDs are unique
2020-12-01 08:18:50 -08:00
Jordan Liggitt
5c88880584 Restore beta os/arch labels on initial node registration 2020-11-23 11:23:59 -05:00
Kubernetes Prow Robot
ece591f722
Merge pull request #96758 from msau42/revert-84206-refactor/remove-mount-volume-check-orphaned-pod-cleanup
Revert "check volume directories instead of mounts for cleanupOrphanedPodDirs"
2020-11-20 22:37:33 -08:00
Kubernetes Prow Robot
8c7cd8a8cc
Merge pull request #96553 from AlexeyPerevalov/FixesKubeletCrashEmptyTopology
Fixes sigfault in case of empty TopologyInfo
2020-11-20 16:03:33 -08:00
Michelle Au
25edb8bc69
Revert "check volume directories instead of mounts for cleanupOrphanedPodDirs" 2020-11-20 09:06:09 -08:00
Andrew Sy Kim
a59189e213 kubelet: dockershim should return grpc status with DeadlineExceeded code
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-16 22:51:59 -05:00
Alexey Perevalov
5e6aed4137 Fixes sigfault in case of empty TopologyInfo
Device plugin which implements v1beta interface can return nil in
Topology field

For example nvidia-gpu-deviceplugin
3520254b75/nvidia.go (L147)
Signed-off-by: Alexey Perevalov <alexey.perevalov@huawei.com>
2020-11-13 11:51:47 +03:00
Kubernetes Prow Robot
0e0cc1ead8
Merge pull request #95839 from egernst/pod-usage
resource-metrics: add pod/sandbox metrics to endpoint
2020-11-12 19:36:23 -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
David Porter
2343689ce7 Add systemd package to interface with dbus
* Add a new package under nodeshutdown "systemd"
  * Package uses dbus to interface with logind to manage shutdown
  inhibitors
* Make github.com/godbus/dbus a new explicit dependency
  * Update vendor and go modules
2020-11-12 21:46:44 +00:00
Kubernetes Prow Robot
55856ed727
Merge pull request #93130 from zshihang/master
plumb service account token down to csi driver
2020-11-12 13:16:25 -08:00
Kubernetes Prow Robot
71331d8596
Merge pull request #96372 from serathius/sanitization-kubelet
Add --experimental-logging-sanitization flag to kubelet
2020-11-12 11:21:12 -08:00
Kubernetes Prow Robot
df794c1dda
Merge pull request #96054 from alvaroaleman/increase
Allow debugging kubelet image pull times
2020-11-12 11:20:14 -08:00
Shihang Zhang
d2859cd89b plumb service account token down to csi driver 2020-11-12 09:26:43 -08:00
Kubernetes Prow Robot
f653e6cf92
Merge pull request #94624 from dims/deprecate-dockershim
Deprecate Dockershim
2020-11-12 08:04:50 -08:00
Marek Siarkowicz
8e60d75c15 Add --experimental-logging-sanitization flag to Kubelet
Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
2020-11-12 12:32:19 +01:00
Krzysztof Wiatrzyk
b7714918db Run ./update-all.sh
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:55 +01:00
sw.han
7b0ccaa1e9 Add tests for getPodDeviceRequest() for devicemanager
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:55 +01:00
sw.han
ba1e8abce7 Add tests for GetPodTopologyHints() for devicemanager
* Add additional test cases returned by getPodScopeTestCases()

Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:55 +01:00
sw.han
1c4a1ba6ae Update topology hints tests to use pod object for devicemanager
Pod object is more flexible to use and construct
* Update TestGetTopologyHints() to work according to new test cases
* Update topologyHintTestCase{} to include proper field

Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:55 +01:00
sw.han
7ad65bf22d Add tests for GetPodTopologyHints() for cpumanager
* Add tests for getPodRequestedCPU()

Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:55 +01:00
sw.han
35b1f28d0f Refactor topology hints tests for cpumanager
* Extract common tests cases that will be used for both GetTopologyHints()
and GetPodTopologyHints()
* Extract machineInfo as it will be used for both functions as well

Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:55 +01:00
Krzysztof Wiatrzyk
656a08afdf Move scope specific tests from topologymanager under particular scopes
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:55 +01:00
Krzysztof Wiatrzyk
c786c9a533 Move common tests from topologymanager under scope
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:55 +01:00
Krzysztof Wiatrzyk
f5c0fe4ef6 Update topologymanager tests after adding scopes
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:55 +01:00
Byonggon Chun
9da0912a33 Implement devicemanager.GetPodLevelTopologyHints() function
* Add podDevices() func
* Add getPodDeviceRequest() func

Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:55 +01:00
sw.han
27b7bcb41c Implement the cpumanager.GetPodTopologyHints() function
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:55 +01:00
Krzysztof Wiatrzyk
6db58b2e92 Update logging to use a format util
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:55 +01:00
Krzysztof Wiatrzyk
b2be584e5b Implement topology manager scopes
* Add topologyScopeName parameter to NewManager().
* Add scope interface and structure that implement common logic
* Add pod scope & container scopes
* Add pod lifecycle functions

Co-authored-by: sw.han <sw.han@samsung.com>

Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:54 +01:00
sw.han
f5997fe537 Add GetPodTopologyHints() interface to Topology/CPU/Device Manager
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:54 +01:00
Krzysztof Wiatrzyk
ec552e6dc6 Add flag value validation of TopologyManagerPolicy
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:54 +01:00
Krzysztof Wiatrzyk
a05eead211 Add flag value validation of TopologyManagerScope
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:54 +01:00
sw.han
d070bff273 Add kubelet configuration flag 'topology-manager-scope'
add kubelet config option.
* --topology-manager-scope=[ container | pod ]
* default=container

Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:54 +01: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
bdac36b57e
Merge pull request #84206 from mucahitkurt/refactor/remove-mount-volume-check-orphaned-pod-cleanup
check volume directories instead of mounts for cleanupOrphanedPodDirs
2020-11-11 21:24:49 -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
Alvaro Aleman
801a52c06d
Allow debugging kubelet image pull times
This PR changes the buckets of the
kubelet_runtime_operation_duration_seconds metric to be
metrics.ExponentialBuckets(.005, 2.5, 14) in order to
allow debugging image pull times. Right now the biggest bucket is 10
seconds, which is an ordinary time frame to pull an image, making the
metric useless for the aforementioned usecase.
2020-11-11 20:18:36 -05: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
Alexey Perevalov
62326a1846 Convert podDevices to struct
PodDevices will have its own guard

Signed-off-by: Alexey Perevalov <alexey.perevalov@huawei.com>
2020-11-11 13:50:48 +03:00
Kubernetes Prow Robot
f5e4a73266
Merge pull request #96196 from roycaihw/move-lease-controller
Move lease controller to k8s.io/component-helpers/apimachinery
2020-11-11 01:50:28 -08:00
Alexey Perevalov
9f54dccc92 Change GetDevices interface
This change is necessary for supporting Topology in the ContainerDevices.

Signed-off-by: Alexey Perevalov <alexey.perevalov@huawei.com>
2020-11-11 12:41:31 +03:00
Kubernetes Prow Robot
c22e2246ca
Merge pull request #95521 from masap/fix_si
kube-eviction: Fix SI of process quantity
2020-11-10 17:47:56 -08:00
Haowei Cai
e79ba4877e move lease controller to k8s.io/component-helpers/apimachinery 2020-11-10 15:51:03 -08:00
Andrew Sy Kim
2d0dd26252 kubelet: add initial credentialprovider v1alpha1 APIs
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-10 13:44:06 -05: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
Andrew Sy Kim
c23638c3ce kubelet: update pkg/kubelet/apis/config/OWNERS to include api approvers and reviewers
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-10 13:44:06 -05:00