Akihiro Suda
2e999fff02
Fix compiling e2e.test on macOS
...
Fix issue 122650 (regression in PR 122552)
```
$ make WHAT=test/e2e/e2e.test
+++ [0109 10:06:53] Building go targets for darwin/amd64
k8s.io/kubernetes/test/e2e/e2e.test (test)
package k8s.io/kubernetes/test/e2e
imports k8s.io/kubernetes/test/e2e/common
imports k8s.io/kubernetes/test/e2e/common/node
imports k8s.io/kubernetes/pkg/kubelet
imports github.com/opencontainers/runc/libcontainer/userns: C source files not allowed when not using cgo or SWIG: userns_maps.c
!!! [0109 10:06:54] Call tree:
!!! [0109 10:06:54] 1: /Users/suda/gopath/src/k8s.io/kubernetes/hack/lib/golang.sh:948 kube::golang::build_binaries_for_platform(...)
!!! [0109 10:06:54] 2: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0109 10:06:54] Call tree:
!!! [0109 10:06:54] 1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0109 10:06:54] Call tree:
!!! [0109 10:06:54] 1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
make: *** [all] Error 1
```
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-09 10:42:20 +09:00
Kubernetes Prow Robot
6427e2c9c8
Merge pull request #122578 from carlory/lock-default-ConsistentHTTPGetHandlers
...
lock GA feature-gate ConsistentHTTPGetHandlers to default
2024-01-04 18:00:52 +01:00
Kubernetes Prow Robot
2b1ccec47e
Merge pull request #122087 from fatsheep9146/fix-kubelet-trace-broke
...
fix kubelet trace broke in 1.28
2024-01-04 17:59:39 +01:00
carlory
55c5db172e
lock GA feature-gate ConsistentHTTPGetHandlers to default
2024-01-04 15:12:08 +08:00
Kubernetes Prow Robot
2b5c0c281d
Merge pull request #122310 from weilaaa/use_buildin_max_min_instead
...
use build-in max and min func to instead of k8s.io/utils/integer funcs
2023-12-18 19:25:34 +01:00
weilaaa
eb8f3f194f
use build-in max and min func to instead of k8s.io/utils/integer funcs
2023-12-15 15:09:11 +08:00
Davanum Srinivas
e2cf9692fc
Remove unused code in kubelet - take 1
...
spotted `DockerContainer` in types.go and pulling on whether we
really needed it found that a bunch of code is not really
required.
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-12-14 13:31:38 -08:00
Ziqi Zhao
e92501b8fc
optimize the comment
...
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-12-05 22:46:27 +08:00
Ziqi Zhao
f035fea63a
remove unnecessary code
...
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-11-29 09:59:53 +08:00
Ziqi Zhao
6d92b330e3
use ctx withoutcancel
...
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-11-28 23:43:33 +08:00
Ziqi Zhao
90fc108f6d
fix kubelet trace broke in 1.28
...
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-11-28 20:02:23 +08:00
Taahir Ahmed
1ebe5774d0
kubelet: Support ClusterTrustBundlePEM projections
2023-11-03 11:40:48 -07:00
Kevin Hannon
26923b91e8
implementation of split disk kep
2023-11-01 14:46:33 -04:00
Kubernetes Prow Robot
338aee71c3
Merge pull request #119898 from saschagrunert/semconv
...
Use tracing semconv types instead of own defines
2023-10-26 04:22:38 +02:00
Kubernetes Prow Robot
12b01aff1b
Merge pull request #121275 from haircommander/image-max-gc
...
KEP-4210: add support for ImageMaximumGCAge field
2023-10-25 21:29:10 +02:00
Kubernetes Prow Robot
e1824b6a47
Merge pull request #117615 from aheng-ch/checkpoint
...
Fix: do not assign an empty value to the resource (CPU or memory) if it's not defined in the container
2023-10-24 00:30:08 +02:00
Peter Hunt
d992ea4b30
kubelet: add and use ImageMaximumGCAge in KubeletConfiguration
...
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2023-10-20 12:23:31 -04:00
Kubernetes Prow Robot
c5815fee72
Merge pull request #113825 from harche/ep_comments
...
Keep PLEG interruptions in a separate interface
2023-10-17 03:37:57 +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
Kubernetes Prow Robot
74f6c263d8
Merge pull request #118544 from sohankunkerkar/remove-sandbox-image-ref
...
pkg/kubelet: allow sandbox image pinning from CRI
2023-09-11 11:52: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
Sohan Kunkerkar
d5690f12b6
pkg/kubelet: allow sandbox image pinning from CRI
...
As part of this change, the code responsible for managing the sandbox
image within the kubelet has been removed. Previously, the kubelet used
to prevent sandbox image from the garbage collection process. However,
with this update, the responsibility of managing the sandbox containers
has been shifted to the CRI implementation itself. By allowing sandbox
image pinning from CRI, we improve efficiency and simplify the kubelet's
interaction with the container runtime. As a result, the kubelet can now
rely on the container runtime's built-in mechanisms for sandbox container
lifecycle management.
Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
2023-08-29 15:34:51 -04:00
Sascha Grunert
b9cf6991e6
Use tracing semconv types instead of own defines
...
To keep things in sync when adding new traces, we now use the official
semconv types of OTEL rather than our own values.
Nothing should change for now behavior wise.
Refers to https://github.com/kubernetes/kubernetes/pull/119771
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-08-11 09:24:34 +02:00
Qian Xiao
0944c00778
Fix some typo in kubelet component source code
2023-08-03 23:56:50 -07:00
Dan Winship
f1e7386fbc
Deprecate now-unused kubelet iptables flags
2023-07-17 16:51:47 -04:00
aheng-ch
208cf1afab
Fix: do not assign an empty value to the resource (CPU or memory) if it's not defined in the container
2023-05-24 15:04:22 +08:00
Clayton Coleman
1f16d71185
kubelet: Rename PodManager DeletePod to RemovePod
...
RemovePod is more consistent within the kubelet to be the opposite
of AddPod, and the pod is not being deleted just "removed" from
tracking.
2023-05-12 12:57:27 -04:00
Clayton Coleman
8bd94dfa76
kubelet: Organize and document kubelet pod-related members
...
Clearly describe core pod related component responsibilities in
the kubelet members. Organize the PodManager interface for clarity.
2023-05-12 12:57:27 -04:00
Clayton Coleman
bb568844b6
kubelet: Separate the MirrorClient from the PodManager
...
The two are not coupled except accidentally. Separate them and
update callsites. This will reduce the scope of PodManager interface
to make exposing the pod worker cleaner.
2023-05-12 12:57:26 -04:00
Clayton Coleman
80b1aca580
kubelet: Remove dispatchWork and inline calls to UpdatePod
...
The HandlePod* methods are all structurally similar, but accrued
subtle differences. In general the only point for Handle is to
process admission and to update the pod worker with the desired
state of the kubelet's config (so that pod worker can make it
the actual state).
Add a new GetPodAndMirrorPod() method that handles when the config
pod is ambiguous (pod or mirror pod) and inline the structure.
Add comments on questionable additions in the config methods for
future improvement.
Move the metric observation of container count closer to where
pods are actually started (in the pod worker). A future change
can likely move it to syncPod.
2023-05-12 12:57:26 -04:00
Clayton Coleman
f8086f2dac
kubelet: Convert IsMirrorOf to a function
...
Shrinks the PodManager interface by one method, no abstraction is
necessary here.
2023-05-12 12:57:26 -04:00
Clayton Coleman
02960a8253
kubelet: Remove unused mirrorPodFunc in eviction
...
Not referenced
2023-05-12 12:57:25 -04:00
Harshal Patil
05f04f866e
Keep PLEG interruptions in a separate interface
...
Signed-off-by: Harshal Patil <harpatil@redhat.com>
Co-authored-by: Ed Bartosh <eduard.bartosh@intel.com>
2023-04-26 12:14:26 -04:00
Todd Neal
453f81d1ca
kubelet: pass context to VolumeManager.WaitFor*
...
This allows us to return with a timeout error as soon as the
context is canceled. Previously in cases where the mount will
never succeed pods can get stuck deleting for 2 minutes.
In the Sync*Pod methods that call VolumeManager.WaitFor*, we
must filter out wait.Interrupted errors from being logged as
they are part of control flow, not runtime problems. Any
early interruption should result in exiting the Sync*Pod method
as quickly as possible without logging intermediate errors.
2023-04-17 11:53:28 -05:00
Tim Hockin
dd7af241c1
Replace diff.ObjectDiff with cmp.Equal
...
More obvious and cheaper, and ObjectDiff is already written in terms of
cmp.
2023-04-12 08:45:32 -07:00
Kubernetes Prow Robot
74ad7c397d
Merge pull request #116723 from SergeyKanzhelev/ExperimentalHostUserNamespaceDefaulting
...
deprecate ExperimentalHostUserNamespaceDefaulting
2023-04-11 21:16:57 -07:00
Kubernetes Prow Robot
0c969ad660
Merge pull request #115133 from ffromani/podresources-windows
...
node: create podresources endpoint also on windows
2023-04-11 15:35:19 -07:00
Kubernetes Prow Robot
c7cc7886e2
Merge pull request #116702 from vinaykul/restart-free-pod-vertical-scaling-podmutation-fix
...
Fix pod object update that may cause data race
2023-03-21 19:26:36 -07:00
vinay kulkarni
f41702b8d2
Return updatedPod if resize upon successful checkpointing of allocated resources
2023-03-22 00:24:00 +00:00
vinay kulkarni
d753893260
Do not modify original pod object when processing pod resource resize
2023-03-18 17:57:25 +00:00
Sergey Kanzhelev
eb60dce33b
deprecate ExperimentalHostUserNamespaceDefaulting
2023-03-17 22:07:25 +00:00
vinay kulkarni
358474b71d
Explicitly return from checkpoint update failures. SyncPod will retry
2023-03-17 18:00:04 +00:00
vinay kulkarni
f66e8848ee
Fix pod object update that may cause data race
2023-03-17 08:50:52 +00:00
Paco Xu
7afcfe1826
kubelet: use filepath.Clean before init, validate it in setupDataDirs
2023-03-17 15:45:39 +08:00
Michal Wozniak
3d68f362c3
Give terminal phase correctly to all pods that will not be restarted
2023-03-16 21:25:29 +01:00
Francesco Romani
195fc2f516
kubelet: podresources: rename variable
...
on unix, the podresources endpoint is a unix domain socket;
on windows, the podresources endpoint is a named pipe;
rename the variables to convey this fact. No changes in behavior.
Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-03-14 22:39:54 +01:00
Kubernetes Prow Robot
28fa3cbbf1
Merge pull request #115847 from moshe010/pod-resource-api-dra-upstream
...
Extend the PodResources API to include resources allocated by DRA
2023-03-14 14:12:26 -07:00
Kubernetes Prow Robot
89a9c0c8bb
Merge pull request #96120 from LorbusChris/kubelet-journal-logs
...
KEP 2258: add node log query
2023-03-14 14:12:14 -07:00
Kubernetes Prow Robot
6a111bebe2
Merge pull request #116377 from kinvolk/rata/userns
...
KEP-127: user namespace support for stateless pods
2023-03-14 10:40:43 -07:00
Moshe Levi
2a568bcfc8
kubelet podresources: extend List to support Dynamic Resources and implement Get API
...
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:04 +02:00