Commit Graph

127283 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
5b6a01c2c6
Merge pull request #132159 from linxiulei/automated-cherry-pick-of-#132109-release-1.32
Automated cherry pick of #132109: Clean backoff record earlier
2025-07-09 10:17:26 -07:00
Kubernetes Release Robot
c14c5722a2 Update CHANGELOG/CHANGELOG-1.32.md for v1.32.6 2025-06-17 21:22:48 +00:00
Kubernetes Release Robot
036f7ed3f1 Release commit for Kubernetes v1.32.6 2025-06-17 21:01:12 +00:00
Kubernetes Prow Robot
66b2951498
Merge pull request #132225 from cpanato/update-go-1-32
[release-1.32] [go]Bump images, dependencies and versions to go 1.23.10 and distroless iptables
2025-06-13 03:46:57 -07:00
Carlos Panato
7246ec90c1
Bump images, dependencies and versions to go 1.23.10 and distroless iptables
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-06-11 08:32:50 +02:00
Eric Lin
62eb11dd5f Clean backoff record earlier
Once received job deletion event, it cleans the backoff records for that
job before enqueueing this job so that we can avoid a race condition
that the syncJob() may incorrect use stale backoff records for a newly created
job with same key.

Co-authored-by: Michal Wozniak <michalwozniak@google.com>
2025-06-06 20:51:06 +00:00
Kubernetes Prow Robot
2aa6d7d467
Merge pull request #131782 from rata/automated-cherry-pick-of-#131623-upstream-release-1.32
Automated cherry pick of #131623: kubelet: userns: Improve errors returned to the user
2025-06-05 21:28:37 -07:00
Kubernetes Prow Robot
5b3e813641
Merge pull request #132099 from gnufied/automated-cherry-pick-of-#131408-upstream-release-1.32
Automated cherry pick of #131408: Remove warning about resizing failed for unknown reason
2025-06-05 17:40:39 -07:00
Kubernetes Prow Robot
09750267c3
Merge pull request #132010 from gnufied/automated-cherry-pick-of-#131987-upstream-release-1.32
Automated cherry pick of #131987: Automated cherry pick of #131868: Remove superflous expansion calls if controller finished expansion
2025-06-05 14:24:38 -07:00
Kubernetes Prow Robot
6471cec0de
Merge pull request #131784 from rata/automated-cherry-pick-of-#130243-upstream-release-1.32
Automated cherry pick of #130243: Revert userns kernel check
2025-06-05 08:50:45 -07:00
Kubernetes Prow Robot
790dc3b4fa
Merge pull request #131652 from princepereira/automated-cherry-pick-of-#131506-upstream-release-1.32
Automated cherry pick of #131506: Update hnslib version in Windows KubeProxy.
2025-06-05 08:50:38 -07:00
Kubernetes Prow Robot
b41aa67124
Merge pull request #131786 from rata/automated-cherry-pick-of-#130800-upstream-release-1.32
Automated cherry pick of #130800: Fix unit tests on windows
2025-06-04 15:24:42 -07:00
Kubernetes Prow Robot
448eedf8ef
Merge pull request #131875 from pohly/automated-cherry-pick-of-#131844-origin-release-1.32
Automated cherry pick of #131844: DRA node: reject static pods which reference ResourceClaims
2025-06-04 11:28:42 -07:00
Hemant Kumar
de8292ad6f Remove warning about resizing failed for unknown reason 2025-06-04 11:36:02 -04:00
Hemant Kumar
ec4c71b705 Add tests that validate the return value of resize operation 2025-05-28 22:22:54 -04:00
Kubernetes Prow Robot
89d95c9713
Merge pull request #131936 from cpanato/update-go-1.32
[release-1.32] [go] Bump images, dependencies and versions to go 1.23.9 and distroless iptables
2025-05-26 01:45:16 -07:00
Carlos Panato
40849d37ea
Bump images, dependencies and versions to go 1.23.9 and distroless iptables
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-05-23 09:17:51 -04:00
Patrick Ohly
9a67ee4a70 DRA node: reject static pods which reference ResourceClaims
If someone gains the ability to create static pods, they might try to use that
ability to run code which gets access to the resources associated with some
existing claim which was previously allocated for some other pod. Such an
attempt already fails because the claim status tracks which pods are allowed to
use the claim, the static pod is not in that list, the node is not authorized
to add it, and the kubelet checks that list before starting the pod in
195803cde5/pkg/kubelet/cm/dra/manager.go (L218-L222).

Even if the pod were started, DRA drivers typically manage node-local resources
which can already be accessed via such an attack without involving DRA. DRA
drivers which manage non-node-local resources have to consider access by a
compromised node as part of their threat model.

Nonetheless, it is better to not accept static pods which reference
ResourceClaims or ResourceClaimTemplates in the first place because there
is no valid use case for it.

This is done at different levels for defense in depth:
- configuration validation in the kubelet
- admission checking of node restrictions
- API validation

Co-authored-by: Jordan Liggitt <liggitt@google.com>

Code changes by Jordan, with one small change (resourceClaims -> resourceclaims).
Unit tests by Patrick.
2025-05-21 08:40:28 +02:00
Rodrigo Campos
07011c05b7 pkg/kubelet/userns: Remove skip on windows
We don't build these tests for Windows, let's remove this skip.

We should have never added that skip, we should have skipped the entire
suite on Windows.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-05-15 12:30:21 +02:00
Rodrigo Campos
1d923fbc78 pkg/kubelet/userns: Wrap error to get mappings
I needed to wrap the error for debugging, let's just keep this as it is
useful.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-05-15 12:30:21 +02:00
Rodrigo Campos
3755f8e2f2 pkg/kubelet/userns: Provide stub implementation for windows
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-05-15 12:30:21 +02:00
Rodrigo Campos
b5d6f06fe6 pkg/kubelet: Fix userns tests on Windows
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-05-15 12:30:21 +02:00
Rodrigo Campos
5e7201df69 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-05-15 12:26:08 +02:00
Rodrigo Campos
a35311c358 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-05-15 12:26:08 +02:00
Rodrigo Campos
54889f0532 userns: Wrap more errors
Most errors where already wrapped, but these were missing.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-05-15 12:21:30 +02:00
Rodrigo Campos
9326fc3097 userns: Improve error returned if userns is not supported
This makes it clear the error comes due to a user namespace
configuration. Otherwise the error returned looks too generic and is not
clear.

Before this PR, the error was:

	  Warning  FailedCreatePodSandBox  1s    kubelet            Failed to create pod sandbox: the handler "" is not known

Now it is:

	  Warning  FailedCreatePodSandBox  1s    kubelet            Failed to create pod sandbox: runtime does not support user namespaces

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-05-15 12:21:30 +02:00
Rodrigo Campos
fd5862185f userns: Use len to handle empty non-nil slices
When using an old runtime like containerd 1.7, this message is not
implemented and what we get here is an empty non-nil slice. Let's check
the len of the slice instead.

While we are there, let's just return false and no error. In the
following commits we will wrap the error and we didn't find any more
info to add here.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-05-15 12:21:30 +02:00
Kubernetes Release Robot
95c119b504 Update CHANGELOG/CHANGELOG-1.32.md for v1.32.5 2025-05-15 09:27:49 +00:00
Kubernetes Release Robot
9894294ef1 Release commit for Kubernetes v1.32.5 2025-05-15 09:05:02 +00:00
Kubernetes Prow Robot
3f75cae603
Merge pull request #131524 from carlory/automated-cherry-pick-of-#131495-release-1.32
Automated cherry pick of #131495: Handle unsupported node expansion for RWX volumes
2025-05-13 23:05:23 -07:00
Kubernetes Prow Robot
55a2f43a98
Merge pull request #131438 from gnufied/automated-cherry-pick-of-#131418-upstream-release-1.32
Automated cherry pick of #131418: Check for newer fields when deciding expansion recovery feature status
2025-05-13 23:05:16 -07:00
Kubernetes Prow Robot
01aff800b6
Merge pull request #131528 from ameukam/update-go-1-23-8
[release-1.32][go] Bump images, dependencies and versions to go 1.23.8 and distroless iptables
2025-05-13 05:03:16 -07:00
Prince Pereira
9a57de0ec6 Update hnslib version in Windows KubeProxy. 2025-05-07 09:48:49 -07:00
Kubernetes Prow Robot
a624d76abd
Merge pull request #131428 from princepereira/automated-cherry-pick-of-#131138-upstream-release-1.32
Automated cherry pick of #131138: Fix for HNS local endpoint was being deleted instead of the remote endpoint.
2025-05-06 17:59:13 -07:00
Arnaud Meukam
7ba97788a7
Bump images, dependencies and versions
Bump images, dependencies, versions to Go 1.23.8
Bump distroless-iptables to 0.6.9

Signed-off-by: Arnaud Meukam <ameukam@gmail.com>
2025-04-29 11:56:47 +02:00
carlory
5ad726c6ef Handle unsupported node expansion for RWX volumes
Co-authored-by: Hemant Kumar <gnufied@users.noreply.github.com>
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-04-29 10:52:03 +08:00
Prince Pereira
b23e637969 Manually adding fix for failing pull-kubernetes-typecheck tests which had dependency with this commit: 6186303580 2025-04-27 21:52:32 -07:00
Hemant Kumar
cdbea02d39 Mark NodeExpansion finsihed without featuregate check 2025-04-24 07:52:17 -04:00
Hemant Kumar
69e0af3100 Also change final status by removing featuregate check 2025-04-24 07:52:17 -04:00
Hemant Kumar
0bec23c957 Check for newer fields when deciding expansion recovery feature status 2025-04-24 07:52:17 -04:00
Prince Pereira
76bf5dbdc8 Fix for HNS local endpoint was being deleted instead of the remote endpoint. 2025-04-23 23:08:44 -07:00
Kubernetes Release Robot
d5df907c3c Update CHANGELOG/CHANGELOG-1.32.md for v1.32.4 2025-04-22 16:22:00 +00:00
Kubernetes Release Robot
59526cd486 Release commit for Kubernetes v1.32.4 2025-04-22 15:56:13 +00:00
Kubernetes Prow Robot
bf1fded1f9
Merge pull request #130773 from JoelSpeed/automated-cherry-pick-of-#130450-kubernetes-release-1.32
Cherry pick of "Fix implementation of ContainsCIDR to allow non-equal addresses" on release-1.32
2025-04-17 11:03:14 -07:00
Kubernetes Prow Robot
0b7ab453ce
Merge pull request #130684 from carlory/automated-cherry-pick-of-#130335-upstream-release-1.32
Automated cherry pick of #130335: Fix kubelet restart unmounts volumes of running pods if the referenced PVC is being deleted by the user
2025-04-17 11:03:07 -07:00
Kubernetes Prow Robot
35716897a3
Merge pull request #131159 from wojtek-t/automated-cherry-pick-of-#131020-upstream-release-1.32
Automated cherry pick of #131020: Fix race for sending errors in watch
2025-04-17 09:21:07 -07:00
Wojciech Tyczyński
7b326a9511 Fix race for sending errors in watch 2025-04-03 08:46:13 +01:00
Kubernetes Prow Robot
cdc807a9e8
Merge pull request #131154 from neolit123/automated-cherry-pick-of-#131153-origin-release-1.32
Automated cherry pick of #131153: CHANGELOG-1.32: fix release note about kubeadm upgrade phases
2025-04-02 04:36:47 -07:00
Lubomir I. Ivanov
b5f6d82ff5 CHANGELOG-1.32: fix release note about kubeadm upgrade phases
We forgot to mention that users who skipped addon phases
during 'init' now have to skip the same phases during 'upgrade'.
2025-04-02 13:20:20 +03:00
Joel Speed
01b87d211f
Fix implementation of ContainsCIDR to allow non-equal addresses 2025-03-13 09:39:16 +00:00