Commit Graph

10775 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
c3c731890c
Merge pull request #117927 from kaisoz/add-FailedToRetrieveImagePullSecret-event
Log a warning if a ImagePullSecrets does not exist
2023-06-28 11:14:31 -07:00
Kubernetes Prow Robot
52457842d1
Merge pull request #117055 from cyclinder/csi_migration
remove CSI-migration gate
2023-06-28 04:28:31 -07:00
Kubernetes Prow Robot
b3d94ae74f
Merge pull request #118786 from pohly/dra-test-skip-prepare
dra: kubelet must skip NodePrepareResource if not used by any container
2023-06-27 09:58:32 -07:00
Patrick Ohly
bde66bfb55 kubelet dra: restore skipping of unused resource claims
1aeec10efb removed iterating over containers in favor of iterating over pod
claims. This had the unintended consequence that NodePrepareResource gets
called unnecessarily when no container needs the claim. The more natural
behavior is to skip unused resources. This enables (theoretic, at this time)
use cases where some DRA driver relies on the controller part to influence
scheduling, but then doesn't use CDI with containers.
2023-06-27 16:02:31 +02:00
Patrick Ohly
874daa8b52 kubelet dra: fix checking of second pod which uses a claim
When a second pod wanted to use a claim, the obligatory sanity check whether
the pod is really allowed to use the claim ("reserved for") was skipped.
2023-06-27 16:01:11 +02:00
Davanum Srinivas
f7239e4095
Better back off delays and connection timeout to talk to containerd
Set up params similar to what we do in cadvisor:
e9068e3273/container/containerd/client.go (L59-L61)

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-06-25 16:25:28 -04:00
Michal Wozniak
17013d3960 Review remarks to improve HandlePodCleanups in kubelet 2023-06-22 10:55:39 +02:00
Michal Wozniak
e3ee9b9adc Fix the deletion of rejected pods 2023-06-22 09:18:34 +02:00
Davanum Srinivas
c98e72841b
Add a connection backoff to talk to CRI impls
We can add backoff for connection like we do in cadvisor:
https://github.com/google/cadvisor/blob/master/container/containerd/client.go#L76-L80

for now, don't tune it, just use the default:
https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-06-20 21:32:50 -04:00
Kubernetes Prow Robot
6a79a8a57c
Merge pull request #115835 from HirazawaUi/fix-terminationGracePeriod-bug
fix terminationGracePeriod blocked by preStop
2023-06-14 10:34:18 -07:00
carlory
5e048041e4 remove helper function for unused storage feature in pkg/proxy/util 2023-06-13 09:22:59 +08:00
Kubernetes Prow Robot
86d786090a
Merge pull request #117793 from tzneal/memory-oom-group-support
use the cgroup aware OOM killer if available
2023-06-12 14:45:58 -07:00
Todd Neal
4e20a8f52b kill all processes in a container in the event of OOM
Set memory.oom.group if using cgroups v2 unified mode so all processes in
the container will be killed together in the event of an OOM kill.
2023-06-12 15:49:01 -05:00
Kubernetes Prow Robot
d627045949
Merge pull request #118373 from saschagrunert/seccomp-unused
Remove unused `getSeccompProfilePath` helper function
2023-06-12 13:46:57 -07:00
Kubernetes Prow Robot
da4646c080
Merge pull request #118096 from tnqn/fix-confusing-check
Remove undesired verbose fields from log
2023-06-12 13:46:42 -07:00
Kubernetes Prow Robot
9d231f8ce7
Merge pull request #118329 from danwinship/fix-dual-stack-cloud-node-ip-annotation
Set the node-ips annotation correctly with CloudDualStackNodeIPs
2023-06-12 11:44:10 -07:00
Kubernetes Prow Robot
18d05b646d
Merge pull request #117702 from kannon92/pod-ready-to-start-rename
feat: rename PodHasNetwork to PodReadyToStartContainers
2023-06-11 18:59:48 -07:00
Kubernetes Prow Robot
89bfdf0276
Merge pull request #117079 from qingwave/sort-volumes
kubelet/volumemanager: sort unmounted volumes in error message
2023-06-07 18:52:12 -07:00
Kubernetes Prow Robot
c831a08c8e
Merge pull request #118253 from saschagrunert/streaming-cri-api
Move `cri/streaming` to `k8s.io/kubelet` staging repository
2023-06-06 14:14:12 -07:00
Kubernetes Prow Robot
3d4a243742
Merge pull request #116742 from moshe010/fix-pod-resource-api-ut
kubelet PodResources API: follow-up review comments
2023-06-06 11:18:35 -07:00
Kubernetes Prow Robot
299b72c587
Merge pull request #114760 from TommyStarK/unit-tests/pkg-kubelet-cm-containermap
kubelet/cm/containermap: Improving test coverage
2023-06-06 11:18:24 -07:00
Sascha Grunert
db9fcfeed2
Move cri/streaming to k8s.io/kubelet staging repository
Container runtimes like CRI-O and containerd reuse the code by copying
it from Kubernetes. To have a single source of truth for the streaming
server we now move the already isolated implementation to the
k8s.io/kubelet staging repository. This way runtimes can re-use the code
without copying the parts.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-06-05 08:08:18 +02:00
cyclinder
8e4228a8c1 remove CSI-migration gate 2023-06-04 18:40:17 +08:00
HirazawaUi
b4dfae25de fix terminationGracePeriod blocked by preStop 2023-06-04 01:04:13 +08:00
Dan Winship
a6c7f63b18 Set the node-ips annotation correctly with CloudDualStackNodeIPs 2023-06-01 07:20:17 -04:00
Sascha Grunert
15aa00fc83
Remove unused getSeccompProfilePath helper function
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-06-01 11:03:39 +02:00
Kubernetes Prow Robot
0bb17a88fa
Merge pull request #116741 from gjkim42/promote-expanded-dns-config-to-ga
Promote ExpandedDNSConfig feature to the GA stage
2023-05-30 18:19:56 -07:00
Kubernetes Prow Robot
cfeb83d56b
Merge pull request #116525 from ffromani/kubelet-podresources-endpoint-ga
node: podresources: graduate to GA
2023-05-25 16:38:50 -07:00
Kubernetes Prow Robot
03ebd4b7ef
Merge pull request #116656 from HirazawaUi/fik-fd-leaks
Cleanup fd leaks and file removal cleanup
2023-05-24 22:50:50 -07:00
Kubernetes Prow Robot
484645e817
Merge pull request #116659 from claudiubelu/skip-flaky-tests-2
unit tests: Skip flaky tests on Windows (part 2)
2023-05-23 20:04:48 -07:00
Kubernetes Prow Robot
de12f89cd4
Merge pull request #116994 from mmiranda96/fix/116505
Create local copy to avoid potential race condition
2023-05-23 19:06:49 -07:00
Kubernetes Prow Robot
8b8dfcad12
Merge pull request #117586 from mimowo/preemption-for-critical-pods
Add DisruptionTarget condition when preempting for critical pod
2023-05-23 11:22:27 -07:00
Kubernetes Prow Robot
74c66a8b39
Merge pull request #116231 from kannon92/kubelet-image-cleanup
Using parsers in applyDefaultImageTag and adding error test cases.
2023-05-23 10:24:27 -07:00
Kubernetes Prow Robot
1cad20dece
Merge pull request #117935 from saschagrunert/cri-errors-additional
Allow runtimes to provide additional context on CRI pull errors
2023-05-22 23:06:26 -07:00
Tomas Tormo
a10ff53d8e Reword the event message to read better for a single secret
Co-authored-by: Steven E. Harris <seh@panix.com>
2023-05-18 13:47:49 +00:00
Quan Tian
d9b941b782 Remove undesired verbose fields from log
The if and else branches have the exactly same code, which looks
confusing and doesn't make sense. According to the comment, the else
branch should log the error and podUID only.

Signed-off-by: Quan Tian <qtian@vmware.com>
2023-05-18 16:07:45 +08:00
Tomas Tormo
5a75a03a77 Improve warning message
Co-authored-by: Steven E. Harris <seh@panix.com>
2023-05-17 18:50:54 +00:00
Kubernetes Prow Robot
bdbfbffef3
Merge pull request #117371 from smarterclayton/minimal_podmanager
kubelet: Don't reference the pod manager interface directly from components
2023-05-16 14:34:33 -07:00
Kubernetes Prow Robot
03b2e84183
Merge pull request #113209 from luozhiwenn/personal/etc-host
ensure etc-host file permission is 644 whatever umask is
2023-05-16 01:41:35 -07:00
kannon92
0819d34204 using parsers in applyDefaultImageTag 2023-05-15 15:53:47 +00:00
Sascha Grunert
aa405c8aac
Allow runtimes to provide additional context on CRI pull errors
Right now container runtimes have no way to provide additional context
to the pull errors. We now loosen the constraints and check for
additional messages after the actual CRI errors, which allows to enrich
the verbosity of the warning events, for example:

```
Warning  Failed     2s (x3 over 43s)   kubelet            Failed to pull image "localhost:5000/foo": RegistryUnavailable: pinging container registry localhost:5000: Get "http://localhost:5000/v2/": dial tcp [::1]:5000: connect: connection refused
```

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-05-15 09:08:14 +02: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
166256f73e
kubelet: Reduce the interface pod.Manager consumers accept
Every component that uses a pod.Manager should use a stub interface
(like we do for podWorker) that explicitly describes what methods
they use. This will allow podWorker to implement the minimum set
of manager interfaces.
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
e7207c8546
kubelet: Merge orphaned mirror pod names into GetPodsAndMirrorPods
There is only one caller and both sets of data are part of the
resync operation between kubelet's desired state and the actual
state of the pod workers. Reduces the size of the interface so
that it is easier to create another pod manager.
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
Kubernetes Prow Robot
8f9c185696
Merge pull request #116761 from iancoolidge/devel-cpuset-revendor
Complete cpuset export to k/utils by revendoring
2023-05-12 08:37:02 -07:00