Matthieu MOREL
f014b754fb
fix: enable empty and len rules from testifylint on pkg package
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
Co-authored-by: Patrick Ohly <patrick.ohly@intel.com >
2024-07-06 23:15:43 +00:00
Claudiu Belu
b5e3b81de6
unittests: Fixes unit tests for Windows (part 12)
...
Currently, there are some unit tests that are failing on Windows due
to various reasons:
- IPVS proxy mode is not supported on Windows.
- pkg/kubelet/cri/remote was moved to cri-client.
2024-06-28 08:05:38 +00:00
Kubernetes Prow Robot
e6616033cb
Merge pull request #120844 from bzsuni/cleanup/sets/kubelet
...
[kubelet] Use a generic Set instead of a specified Set
2024-06-14 09:09:17 -07:00
Kubernetes Prow Robot
d145bf0907
Merge pull request #125138 from AkihiroSuda/fix-125137
...
kubelet: fix `Turning off swap in unprivileged tmpfs mounts unsupported`
2024-06-09 19:43:11 -07:00
Kubernetes Prow Robot
9c4181e234
Merge pull request #119786 from bzsuni/ut/pkg/kubelet/util
...
[UT] add ut for pkg/kubelet/util
2024-06-04 11:23:28 -07:00
Kubernetes Prow Robot
a8d51f4f05
Use a generic Set instead of a specified Set in kubelet
...
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io >
2024-06-04 14:25:43 +08:00
Akihiro Suda
b3175b8e99
kubelet: fix Turning off swap in unprivileged tmpfs mounts unsupported
...
Fix issue 125137
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp >
2024-05-27 19:07:06 +09:00
Itamar Holder
a6b971f14b
Use kubelet owned directories for mounting rather than /tmp
...
Signed-off-by: Itamar Holder <iholder@redhat.com >
2024-05-21 13:18:16 +03:00
Itamar Holder
29535c0463
Warn of swap is enabled on the OS and tmpfs noswap is not supported
...
When --fail-swap-on=false kubelet CLI argument
is provided, but tmpfs noswap is not supported
by the kernel, warn about the risks of memory-backed
volumes being swapped into disk
Signed-off-by: Itamar Holder <iholder@redhat.com >
2024-05-21 13:18:16 +03:00
Itamar Holder
e7df4d17c4
Add a isSwapOnAccordingToProcSwaps() function and swap utils unit tests
...
Signed-off-by: Itamar Holder <iholder@redhat.com >
2024-05-21 13:18:16 +03:00
Itamar Holder
2a174d09fa
If the kernel version is at least 6.4, assume tmpfs noswap is supported
...
Signed-off-by: Itamar Holder <iholder@redhat.com >
2024-05-21 13:18:16 +03:00
Itamar Holder
fb6c78c90b
Use tmpfs noswap if supported
...
use the tmpfs noswap option in order
to mount memory-backed volumes if it's supported.
Signed-off-by: Itamar Holder <iholder@redhat.com >
2024-05-21 13:18:16 +03:00
Sascha Grunert
2aa9e76be1
Move pkg/kubelet/cri/remote to cri-client
...
Signed-off-by: Sascha Grunert <sgrunert@redhat.com >
2024-05-14 10:58:18 +02:00
Wojciech Tyczyński
36141fa6fb
Bump min watch timeout for secret & configmap manager in Kubelet
2024-04-10 19:36:29 +02:00
Tim Hockin
6dbc754ed6
Retool typecheck to be simpler
...
Instead of walking paths ourselves, just let Go's packages library do
it. This is a slight CLI change - it wants "./foo" rather than "foo".
This also flagged a few things which seem to be legit failures.
2024-02-29 22:07:00 -08:00
Antonio Ojea
b8533f7976
kubelet: add metric for the first pod with network latency
...
The first pod with network latency impact user workloads, however,
it is difficuly to understand where is the problem of this latency,
since it depends on the CNI plugin to be ready at the moment of the
pod creation.
Add a new internal metric in the kubelet that allow developers and cluster
administrator to understand the source of the latency problems on
node startups.
kubelet_first_network_pod_start_sli_duration_seconds
Change-Id: I4cdb55b0df72c96a3a65b78ce2aae404c5195006
2023-11-15 06:09:49 +00:00
ruiwen-zhao
1165609036
Add metric for e2e pod startup latency including image pull
...
Signed-off-by: ruiwen-zhao <ruiwen@google.com >
2023-10-25 20:34:17 +00:00
bzsuni
4e315b85eb
add ut for pkg/kubelet/util
...
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io >
2023-10-25 22:16:02 +08:00
Kubernetes Prow Robot
7824ac0f3e
Merge pull request #114336 from claudiubelu/fixes-test-get-file-type
...
unittests: Fixes hostutil.GetFileType for Windows
2023-10-17 20:07:39 +02:00
Kubernetes Prow Robot
4fd8bd9975
Merge pull request #118568 from qiutongs/node-startup-latency
...
Create a node startup latency tracker
2023-09-15 13:00:12 -07:00
Qiutong Song
d3eb082568
Create a node startup latency tracker
...
Signed-off-by: Qiutong Song <songqt01@gmail.com >
2023-09-11 05:54:25 +00:00
likakuli
e167ecbb9e
fix: only invoke AddReference first time when to sync same pod to minimize unnecessary API requests to the API server for the configmap/secret get API
...
Signed-off-by: likakuli <1154584512@qq.com >
2023-08-31 22:56:49 +08:00
Gunju Kim
b94fa250c2
Sidecar: Implement lifecycle of the restartable init container
...
- Implement `computeInitContainerActions` to sets the actions for the
init containers, including those with `RestartPolicyAlways`.
- Allow StartupProbe on the restartable init containers.
- Update PodPhase considering the restartable init containers.
- Update PodInitialized status and status manager considering the
restartable init containers.
Co-authored-by: Matthias Bertschy <matthias.bertschy@gmail.com >
2023-07-08 07:26:12 +09:00
Claudiu Belu
b4d1440063
unittests: Fixes hostutil.GetFileType for Windows
...
GetFileType is meant to return the type of the given file by using os.Stat.
However, os.Stat doesn't work on Windows for Unix Sockets, causing an error to occur:
[2-Socket Test] unexpected error :
CreateFile C:\Users\Administrator\AppData\Local\Temp\test-get-filetype-2776877299\mt.sock:
The file cannot be accessed by the system.
This is a known issue and we're already using a workaround for this in
pkg/kubelet/util/util_windows.go.
This commit fixes this issue for GetFileType on Windows.
2023-06-01 16:02:07 +00:00
Claudiu Belu
11f1d24165
unit tests: Fixes kubelet util unit tests for Windows
...
The unit tests are currently failing due to missing imports. This commit
addresses this issue.
Additionally, TestIsUnixDomainSocket expects an error to be raised by
IsUnixDomainSocket if the file does not exist, but on Windows we do not
raise such error.
This issue is addressed by Stat-ing the file, and checking
if the file exists or not. We're also handling the case in which the given
filePath is a named pipe, returning false immediately, instead of trying to
dial it as a Unix domain socket.
2023-05-10 11:25:49 +00:00
Kubernetes Prow Robot
65c13c5c21
Merge pull request #117836 from ruquanzhao/addPodUID
...
Passing podUID in AddReference and DeleteReference
2023-05-10 00:18:59 -07:00
RuquanZhao
9150e6b55a
s/of referencedFrom/from referenceFrom/
...
Signed-off-by: Ruquan Zhao <ruquan.zhao@arm.com >
2023-05-10 10:22:52 +08:00
RuquanZhao
308ab380d7
Add unit testcases of refMap.
...
Signed-off-by: Ruquan Zhao <ruquan.zhao@arm.com >
2023-05-09 18:05:43 +08:00
RuquanZhao
ccb4ca8954
record podUID in refMap in watchBasedManager
...
Signed-off-by: Ruquan Zhao <ruquan.zhao@arm.com >
2023-05-08 15:32:10 +08:00
RuquanZhao
936265e870
Add podUID in AddReference and DeleteReference
...
Signed-off-by: Ruquan Zhao <ruquan.zhao@arm.com >
2023-05-06 13:58:14 +08:00
Francesco Romani
6b4ffdb9f7
node: re-implement Localendpoint on windows
...
this will allows us to move forward with the podresources
endpoint GA graduation.
xref: https://github.com/kubernetes/kubernetes/issues/78628
Signed-off-by: Francesco Romani <fromani@redhat.com >
2023-03-14 22:39:56 +01:00
Kubernetes Prow Robot
8bf7805e05
Merge pull request #115397 from sourcelliu/boottime
...
Add test for pkg/kubelet/util
2023-03-14 09:39:18 -07:00
Kubernetes Prow Robot
af97bb9ac5
Merge pull request #115053 from qingwave/remove-unuse-code
...
Remove unuse code in pkg/kubelet/util
2023-03-14 09:39:10 -07:00
Kubernetes Prow Robot
898143a96a
Merge pull request #114904 from TommyStarK/kubelet/pod_startup_latency_tracker
...
kubelet: fix recording when pulling image did finish
2023-03-14 09:39:02 -07:00
Kubernetes Prow Robot
15f5a5c6ef
Merge pull request #110949 from claudiubelu/adds-unittests-4
...
tests: Ports kubelet unit tests to Windows
2023-03-09 21:32:30 -08:00
Kubernetes Prow Robot
54ec651ab5
Merge pull request #110741 from zhoumingcheng/master-unit-v1
...
add unit test coverage for pkg/kubelet/util/queue
2023-03-09 11:15:51 -08:00
TommyStarK
951decd1e6
kubelet: fix recording when pulling image did finish
...
Signed-off-by: TommyStarK <thomasmilox@gmail.com >
2023-03-02 20:21:35 +01:00
Claudiu Belu
5cce4bccad
tests: Port kubelet tests to Windows
...
Ports kubelet/util unit tests to Windows.
2023-02-09 13:50:51 +00:00
mantuliu
9518ca20ac
Add test for pkg/kubelet/util
...
Signed-off-by: mantuliu <240951888@qq.com >
2023-01-31 23:09:08 +08:00
mantuliu
ef0e9b5cf5
Add test for pkg/kubelet/util
...
Signed-off-by: mantuliu <240951888@qq.com >
2023-01-30 21:19:48 +08:00
Kubernetes Prow Robot
232c0de57a
Merge pull request #115101 from HirazawaUi/delte-pkg-kubelet-unused-functions
...
delete unused functions in pkg/kubelet directory
2023-01-29 17:21:08 -08:00
Patrick Ohly
bc6c7fa912
logging: fix names of keys
...
The stricter checking with the upcoming logcheck v0.4.1 pointed out these names
which don't comply with our recommendations in
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments .
2023-01-23 14:24:29 +01:00
HirazawaUi
a8173eded3
delete unused functions in pkg/kubelet directory
2023-01-16 20:00:49 +08:00
qingwave
a9d92bcb25
remove unuse code in pkg/kubelet/util
...
Signed-off-by: qingwave <isguory@gmail.com >
2023-01-13 08:27:42 +00:00
Kubernetes Prow Robot
1bf4af4584
Merge pull request #111930 from azylinski/new-histogram-pod_start_sli_duration_seconds
...
New histogram: Pod start SLI duration
2022-11-04 07:28:14 -07:00
Kubernetes Prow Robot
e6060f2780
Merge pull request #111220 from giuseppe/drop-superfluous-function
...
kubelet: remove superfluous function
2022-11-01 09:34:45 -07:00
Artur Żyliński
8a5fbce96e
Fix cond: Check if pod started
2022-10-26 16:05:19 +02:00
Artur Żyliński
b0fac15cd6
Make the interface local to each package
2022-10-26 11:28:18 +02:00
Artur Żyliński
9f31669a53
New histogram: Pod start SLI duration
2022-10-26 11:28:17 +02: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