Commit Graph

10205 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
3af1e5fdf6
Merge pull request #112707 from enj/enj/i/https_links
Use https links for k8s KEPs, issues, PRs, etc
2022-09-29 12:34:40 -07:00
Kubernetes Prow Robot
00532e305a
Merge pull request #107896 from smarterclayton/track_pod_sync_latency
kubelet: Record a metric for latency of pod status update
2022-09-27 14:25:50 -07:00
Kubernetes Prow Robot
5579ddea8a
Merge pull request #112644 from vitorfhc/issue-112605
Improves message for pod status in rejectPod
2022-09-27 11:32:02 -07:00
Kubernetes Prow Robot
efc306a12d
Merge pull request #112316 from dengyufeng2206/0908test
fix test order in pkg/kubelet/sysctl/util_test.go
2022-09-27 11:31:50 -07:00
Monis Khan
b738be9b46
Use https links for k8s KEPs, issues, PRs, etc
Signed-off-by: Monis Khan <mok@microsoft.com>
2022-09-23 23:36:24 +00:00
Kubernetes Prow Robot
4e105c4814
Merge pull request #111343 from niulechuan/add_unit_test_for_asw
Add unit test in kubelet volumemanager ASW: Detach a volume that had been mounted by pod should be skipped
2022-09-23 07:04:25 -07:00
Vitor Falcao
0beafd1a5a Improved message for pod status in rejectPod
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2022-09-21 21:46:52 +00:00
Ryan Phillips
205adec698 kubelet: increase log level for Path does not exist message 2022-09-21 14:16:44 -05: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
c45ca46cdb
Merge pull request #112387 from mythi/kubelet-devicemanager-topologyinfo
devicemanager: do not leak empty TopologyInfo to TopologyManager
2022-09-14 07:17:00 -07:00
Mikko Ylinen
68bb0935bd devicemanager: do not leak empty TopologyInfo to TopologyManager
Device Plugins that wish to leverage the Topology Manager can send back a populated
TopologyInfo struct as part of the device registration, along with the device IDs
and the health of the device. TopologyInfo is converted to TopologyHints and
used by TopologyManager to find the optimal/desired resource allocation for a Pod.

If a plugin sends an empty but non-nil instance of TopologyInfo for a resource,
devicemanager passes it on as an empty instance of TopologyHint which is
currently interpreted as "Hint Provider has no possible NUMA affinities
for resource" which further means that pods requesting that resource will fail.

To not block device resources that pass TopologyInfo{Nodes:[]*NUMANode{}} from being
used, interprete that as nil set of hints and not a []TopologyHint{}.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-09-14 16:13:31 +03:00
Kubernetes Prow Robot
74469ca4c5
Merge pull request #112123 from paskal/paskal/cfs_clarification
clarify CPUCFSQuotaPeriod values, set the minimum to 1ms
2022-09-12 07:01:25 -07:00
Dmitry Verkhoturov
d0f9e6dc36 clarify CPUCFSQuotaPeriod values, set the minimum to 1ms
cpu.cfs_period_us is measured in microseconds in the kernel but
provided in time.Duration by the user, that change clarifies the code
to make this evident to the reader.

Also, the minimum value for that feature is 1ms and not 1μs, and this
change alters the validation to reject values smaller than 1ms.
2022-09-08 23:29:13 +02:00
Clayton Coleman
e9a5fb7372
kubelet: Record a metric for latency of pod status update
Track how long it takes for pod updates to propagate from detection
to successful change on API server. Will guide future improvements
in pod start and shutdown latency.

Metric is `kubelet_pod_status_sync_duration_seconds` and is ALPHA
stability. Histogram buckets are chosen based on distribution of
observed status delays in practice.
2022-09-08 12:17:44 -04:00
dengyufeng2206
e20071792f fix test order in pkg/kubelet/sysctl/util_test.go
Signed-off-by: dengyufeng2206 <deng.yufeng@zte.com.cn>
2022-09-08 17:20:22 +08:00
Kubernetes Prow Robot
6d1e9150d0
Merge pull request #108855 from haircommander/podStatsFix
kubelet/stats: deduplicate makePodStorageStats
2022-09-06 12:58:22 -07:00
Kubernetes Prow Robot
780fe01858
Merge pull request #111935 from giuseppe/userns-manager-use-bitmask-pkg-registry
kubelet: drop bitArray implementation
2022-09-06 10:27:51 -07:00
Dalton Hubble
7850097fd0 Avoid propagating search . into containers /etc/resolv.conf
* Adapt https://github.com/kubernetes/kubernetes/pull/109441 but
ensures that `search .` does not get propagated into containers'
/etc/resolv.conf. There is no reason to put `.` in a container's
search field and it causes issues for musl
2022-09-01 12:07:18 -07:00
Kubernetes Prow Robot
67d75db890
Merge pull request #111932 from azylinski/rm-lastContainerStartedTime-lru
Cleanup: Remove unused lastContainerStartedTime time.Cache lru
2022-08-29 09:54:37 -07:00
Antonio Ojea
d434c588d7 Revert "change CPUCFSQuotaPeriod default value to 100us to match Linux default"
This reverts commit f2d591fae6.
2022-08-26 23:51:04 +02:00
Kubernetes Prow Robot
bc9f48b841
Merge pull request #112024 from cndoit18/remove-redundant-judgment
style: remove redundant judgment
2022-08-25 07:28:18 -07:00
Kubernetes Prow Robot
2b5475b3fa
Merge pull request #111554 from paskal/paskal/clarify_default_cfs_period
Clarify cpu.cfs_period_us default value
2022-08-25 07:28:07 -07:00
cndoit18
ec43037d0f style: remove redundant judgment
Signed-off-by: cndoit18 <cndoit18@outlook.com>
2022-08-25 12:07:36 +08:00
Kubernetes Prow Robot
70254065ea
Merge pull request #109966 from zhangxyjlu/config_validation_test
Add validation test for features.GracefulNodeShutdownBasedOnPodPriority
2022-08-24 00:02:24 -07:00
Kubernetes Prow Robot
08aac4f0ac
Merge pull request #111520 from paskal/paskal/clarify_cfs_period_us
Change CPUCFSQuotaPeriod default value from 100ms to 100us to match Linux default
2022-08-23 20:07:48 -07:00
Kubernetes Prow Robot
c9c7e245e4
Merge pull request #111692 from SataQiu/cleanup-kubelet-20220804
kubelet: remove unused custommetrics package
2022-08-23 17:17:34 -07:00
Kubernetes Prow Robot
052bfc35b2
Merge pull request #110390 from major1201/fix_kubelet_test
fix defer in loop and optimize test cases with explicit field name
2022-08-23 16:04:37 -07:00
Kubernetes Prow Robot
17dd76f5d4
Merge pull request #108832 from waynepeking348/fix_bugs_of_container_cpu_shares
fix bugs of container cpu shares when cpu request set to zero
2022-08-23 16:04:03 -07:00
Giuseppe Scrivano
2b01af6c92
kubelet: drop bitArray implementation
drop bitArray implementation and use the bitmap implementation from
k8s.io/kubernetes/pkg/registry/core/service/allocator.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-08-19 16:55:15 +02:00
Artur Żyliński
15566d3d89 Cleanup: Remove unused lastContainerStartedTime time.Cache lru 2022-08-19 14:57:29 +02:00
Peter Hunt~
d6ffca04c9 kubelet/stats: drop makePodStorageStats errors to V(6)
and by doing so, fix a bug where the stats providers report a directory is not found after a pod's storage is removed

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2022-08-16 16:54:29 -04:00
Peter Hunt
6d9264247d kubelet/stats: deduplicate makePodStorageStats
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2022-08-16 16:54:29 -04:00
Dmitry Verkhoturov
f2d591fae6 change CPUCFSQuotaPeriod default value to 100us to match Linux default
cpu.cfs_period_us is 100μs by default despite having an "ms" unit
for some unfortunate reason. Documentation:
https://www.kernel.org/doc/html/latest/scheduler/sched-bwc.html#management

The desired effect of that change is to match
k8s default `CPUCFSQuotaPeriod` value (100ms before that change)
with one used in k8s without the `CustomCPUCFSQuotaPeriod` flag enabled
and Linux CFS (100us, 1000x smaller than 100ms).
2022-08-10 03:25:05 +02:00
Niu Lechuan
24614f8551 Add unit test in volumemanager: Detach a volume that had been mounted by pod should be skipped
Signed-off-by: Niu Lechuan <lechuan.niu@daocloud.io>
2022-08-05 09:03:21 +08:00
SataQiu
ea9f0a8c8e kubelet: remove unused custommetrics package 2022-08-04 20:00:38 +08:00
Jan Safranek
f9c7ce5b9c Add unit tests for DesiredStateOfWorldPopulator 2022-08-04 10:51:59 +02:00
Jan Safranek
260912490e Add a coment about handling same volumes with different contexts 2022-08-04 10:51:56 +02:00
Jan Safranek
a01e720a1a Rename IsRWOP
To be able to update content of the function to other access modes when we
implement SELinux mount for more of them.
2022-08-04 10:51:54 +02:00
Jan Safranek
1490d51028 Remove noisy log
The error would be logged every reconciler sync (100 ms).
2022-08-04 10:51:53 +02:00
Jan Safranek
0793ecee3a Add unit tests for ASW.AddPodToVolume 2022-08-04 10:51:52 +02:00
Jan Safranek
17d850ee0e Add interface for SELinuxOptionsToFileLabel
github.com/opencontainers/selinux/go-selinux needs OS that supports SELinux
and SELinux enabled in it to return useful data, therefore add an interface
in front of it, so we can mock its behavior in unit tests.
2022-08-04 10:51:51 +02:00
Jan Safranek
d9f792633d Add AddPodToVolume unit tests with SELinux 2022-08-04 10:51:50 +02:00
Jan Safranek
8d6b721ddd Extract SELinux context error handling into a common func
Add handlerSELinuxMetricError() which bumps the right metric + either
consumes a SELinux error or lets it propagate up the stack.
2022-08-04 10:51:48 +02:00
Jan Safranek
49148ddfd0 Extract getSELinuxLabel from AddPodToVolume
To keep the function smaller.
2022-08-04 10:51:46 +02:00
Jan Safranek
de7f5b66ed Fix existing unit tests 2022-08-04 10:51:44 +02:00
Jan Safranek
b2e18c0b20 Add metrics for SELinux context mount
Add separate _errors and _warnings to capture volumes that were rejected
from those will be rejected when the feature is expanded to all access
mode.
2022-08-04 10:51:43 +02:00
Jan Safranek
48b0751269 Add SELinux context tracking to volume manager
Both ActualStateOfWorld and DesiredStateOfWorld must track SELinux context
of volume mounts.
2022-08-04 10:51:41 +02:00
Kubernetes Prow Robot
442574f3a7
Merge pull request #111513 from jingxu97/july/localstorage
Promote Local storage capacity isolation feature to GA
2022-08-03 13:05:59 -07:00
Kubernetes Prow Robot
4b6134b6dc
Merge pull request #111090 from kinvolk/rata/userns-support-2022
Add support for user namespaces phase 1 (KEP 127)
2022-08-03 13:05:47 -07:00