457 Commits

Author SHA1 Message Date
Sascha Grunert
f9e5dd84ad Graduate image volume sources to beta
Graduate the feature to beta, by:

- Allowing `subPath`/`subPathExpr` for image volumes
- Modifying the CRI to pass down the (resolved) sub path
- Adding metrics which are outlined in the KEP

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2025-03-11 13:41:45 +01:00
Tim Allclair
d4444dd598 Use actuated resources to determine resize status 2025-03-10 10:03:35 -07:00
Kubernetes Prow Robot
1c9840c58e Merge pull request #130243 from rata/revert-userns-kernel-check
Revert userns kernel check
2025-03-07 02:35:44 -08:00
Tim Allclair
ed326fea13 Always report pod status resources consistent with the current pod sync 2025-03-05 16:01:03 -08:00
Kubernetes Prow Robot
9d9e1afdf7 Merge pull request #130576 from tallclair/allocated-uid
Change allocation manager pod UID to types.UID
2025-03-04 16:41:51 -08:00
Tim Allclair
8fac9c68e1 Change allocation manager pod UID to types.UID 2025-03-04 13:54:27 -08:00
Tim Allclair
460db5c137 Always use allocated resources for pods that don't support resize 2025-03-03 14:07:30 -08:00
Kubernetes Prow Robot
3560950041 Merge pull request #130254 from tallclair/allocation-manager-2
[FG:InPlacePodVerticalScaling] Move pod resource allocation management out of the status manager
2025-02-28 11:30:56 -08:00
Tim Allclair
fe4671356c Call allocationManager directly 2025-02-21 09:28:37 -08:00
Rodrigo Campos
7deb49e3a6 Revert "Enforce the Minimum Kernel Version 6.3 for UserNamespacesSupport feature"
This reverts commit 8597b343fa.

I wrote in the Kubernetes documentation:

	In practice this means you need at least Linux 6.3, as tmpfs started
	supporting idmap mounts in that version. This is usually needed as
	several Kubernetes features use tmpfs (the service account token that is
	mounted by default uses a tmpfs, Secrets use a tmpfs, etc.)

The check is wrong for several reasons:
	* Pods can use userns before 6.3, they will just need to be
	  careful to not use a tmpfs (like a serviceaccount). MOST users
	  will probably need 6.3, but it is possible to use earlier kernel
	  versions. 5.19 probably works fine and with improvements in
          the runtime 5.12 can probably be supported too.
	* Several distros backport changes and the recommended way is
	  usually to try the syscall instead of testing kernel versions.
	  I expect support for simple fs like tmpfs will be backported
	  in several distros, but with this check it can generate confusion.
	* Today a clear error is shown when the pod is created, so it's
	  unlikely a user will not understand why it fails.
	* Returning an error if utilkernel fails to understand what
	  kernel version is running is also too strict (as we are
	  logging a warning even if it is not the expected version)
	* We are switching to enabled by default, which will log a
	  warning on every user that runs on an older than 6.3 kernel,
	  adding noise to the logs.

For there reasons, let's just remove the hardcoded kernel version check.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-02-18 17:24:50 +01:00
Rodrigo Campos
a2eeec5c5a Revert "Switch hard error to a WARNING for kernel version check"
This reverts commit fd06dcd604.

The revert is not to make it a hard error again, this revert is needed
to revert cleanly the commit that added this as an error in the first
place.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-02-18 17:24:25 +01:00
Dan Winship
e31a3989fc Make kubelet always canonicalize the PodIPs 2025-02-11 21:46:15 -05:00
Kubernetes Prow Robot
0634e21fb5 Merge pull request #128367 from vivzbansal/sidecar-2
[FG:InPlacePodVerticalScaling] Implement resize for sidecar containers
2025-02-05 14:38:15 -08:00
Gunju Kim
0bee0bcaa7 Promote SidecarContainers feature to GA 2025-02-02 17:45:36 +09:00
vivzbansal
242dec3e34 Updated some unit tests and resolved some review comments 2025-01-27 19:46:54 +00:00
vivzbansal
1cf4587277 Fix build error 2025-01-27 19:42:14 +00:00
vivzbansal
d1fac494f4 resolve merge conflicts 2025-01-27 19:42:13 +00:00
Tim Allclair
8342d39956 Equate CPU limits below the minimum effective limit (10m) 2024-11-12 17:23:17 -08:00
Tim Allclair
25cf2a2aac Allow adding limits 2024-11-11 12:04:36 -08:00
Kubernetes Prow Robot
0fff5bbe7d Merge pull request #128680 from tallclair/min-cpu
[FG:InPlacePodVerticalScaling] Handle edge cases around CPU MinShares
2024-11-08 05:24:51 +00:00
Tim Allclair
5a3a40cd19 Handle resize edge cases around min CPU shares 2024-11-07 17:02:25 -08:00
vivzbansal
763e810fb5 refactor code to add sidecar container support in IPPR 2024-11-07 21:20:48 +00:00
Kubernetes Prow Robot
1dd81aa1c9 Merge pull request #126653 from zhifei92/fix-podstatus
fix the issue of losing the pending phase after a node restart.
2024-11-07 21:06:54 +00:00
Kubernetes Prow Robot
9660e5c4cd Merge pull request #127360 from knight42/feat/split-stdout-stderr-server-side
API: add a new `Stream` field to `PodLogOptions`
2024-11-07 19:44:45 +00:00
zhifei92
bed96b4eb6 fix: fix the issue of losing the pending phase after a node restart. 2024-11-07 21:10:11 +08:00
Lan Liang
6e5a3cde50 Remove PodHostIPs feature gates.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-11-06 23:10:36 -08:00
Jian Zeng
94cd0a0892 feat(kubelet): only returns logs that match the given stream
Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2024-11-07 13:52:16 +08:00
Tim Allclair
ea53083c14 Don't checkpoint ResizeStatus 2024-11-05 15:48:35 -08:00
Tim Allclair
4a4748d23c Determine resize status from state in handlePodResourcesResize 2024-11-05 15:41:49 -08:00
Kubernetes Prow Robot
f81a68f488 Merge pull request #128377 from tallclair/allocated-status-2
[FG:InPlacePodVerticalScaling] Implement AllocatedResources status changes for Beta
2024-11-05 23:21:49 +00:00
carlory
c6e6fadc48 fix pull-kubernetes-linter-hints 2024-11-05 21:26:00 +08:00
carlory
b6c9c2d6fa 1. When the kubelet constructs the cri mounts for the container which references an image volume source type, It passes the missing mount attributes to the CRI implementation, including readOnly, propagation, and recursiveReadOnly. When the readOnly field of the containerMount is explicitly set to false, the kubelet will take the readOnlyas true to the CRI implementation because the image volume plugin requires the mount to be read-only.
2. Fix a bug where the pod is unexpectedly running when the `image` volume source type is used and mounted to `/etc/hosts` in the container.
2024-11-05 19:47:12 +08:00
Tim Allclair
bf4f1832e2 Don't clear resize status when resources are missing 2024-11-01 14:02:59 -07:00
Tim Allclair
84201658c3 Fix ResizeStatus state transitions 2024-11-01 14:02:59 -07:00
Tim Allclair
04aeb40793 Comment clarifying definition of non-resizable containers 2024-11-01 14:02:58 -07:00
Tim Allclair
d37634a930 Fixup linting 2024-11-01 14:02:58 -07:00
Tim Allclair
32e6eac753 Fix clearing pod resize status 2024-11-01 14:02:58 -07:00
Tim Allclair
61c1beeda2 Always set status Resources, default to allocated 2024-11-01 14:02:58 -07:00
Tim Allclair
0f0e27d226 Move container status AllocatedResources behind a separate feature gate 2024-11-01 14:02:58 -07:00
Tim Allclair
321eff34f7 Rework allocated resources handling 2024-10-24 09:27:40 -07:00
Tim Allclair
53aa727708 Checkpoint allocated requests and limits 2024-10-22 11:26:48 -07:00
Itamar Holder
9545d45c5d Remove TODO regarding extended resources
Signed-off-by: Itamar Holder <iholder@redhat.com>
2024-08-28 16:27:05 +03:00
Itamar Holder
090961f8c8 Add limits and request processing for storage resources
Signed-off-by: Itamar Holder <iholder@redhat.com>
2024-08-28 15:38:06 +03:00
Itamar Holder
8811817e7b Refactor: improve convertCustomResources() variable names
Signed-off-by: Itamar Holder <iholder@redhat.com>
2024-08-28 15:38:06 +03:00
Itamar Holder
b9109ab7e4 Refactor: avoid code duplication when converting custom resources
Signed-off-by: Itamar Holder <iholder@redhat.com>
2024-08-28 15:37:39 +03:00
Itamar Holder
a482d8937b Add extended resources to ContainerStatuses[i].Resources
Signed-off-by: Itamar Holder <iholder@redhat.com>
2024-08-28 15:36:55 +03:00
Ed Bartosh
e1bc8defac kubelet: Migrate DRA Manager to contextual logging
Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
2024-08-22 11:12:41 +03:00
Antonio Ojea
5845492cb4 hostNetwork pods mount /etc/hosts without network
hostNetwork pods mount the /etc/hosts from the root namespaces, hence
does not depend on PodIPs to be populated to mount the /etc/hosts file
and add the argumentes specified in the Pod.Spec like hostAliases.
2024-08-06 16:56:57 +00:00
Sergey Kanzhelev
62f96d2748 set AllocatedResourcesStatus in the Pod Status 2024-07-24 00:29:35 +00:00
Kubernetes Prow Robot
581a073dc4 Merge pull request #125663 from saschagrunert/oci-volumesource-kubelet
[KEP-4639] Add `ImageVolumeSource` implementation
2024-07-22 15:48:33 -07:00