Commit graph

50519 commits

Author SHA1 Message Date
Carlos Panato
0a10906a05
update setcap and debian-base to bookworm-v1.0.6
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-10-15 13:39:36 +02:00
Jordan Liggitt
9bd285d24d
Remove invalid SAN certificate construction 2025-10-14 09:39:18 -04:00
Prince Pereira
c2bc37355e
Fix ClusterIP load balancer disappearing when InternalTrafficPolicy: Local is set. 2025-09-16 22:32:57 +05:30
Kubernetes Prow Robot
769455ef63
Merge pull request #132987 from saschagrunert/automated-cherry-pick-of-#131018-base-release-1.31
Automated cherry pick of #131018: Mask Linux thermal interrupt info in /proc and /sys.
2025-09-03 01:01:16 -07:00
Kubernetes Prow Robot
e561c4c2a2
Merge pull request #131579 from ndbaker1/automated-cherry-pick-of-#131251-origin-release-1.31
Automated cherry pick of #131251: fix(kubelet): acquire imageRecordsLock when removing image
2025-07-21 10:40:26 -07:00
Sascha Grunert
c7b1b1f297
Mask Linux thermal interrupt info in /proc and /sys.
On Linux, mask "/proc/interrupts" and "/sys/devices/system/cpu/cpu<x>/thermal_throttle"
inside containers by default. Privileged containers or containers started
with --security-opt="systempaths=unconfined" are not affected.

Mitigates potential Thermal Side-Channel Vulnerability Exploit
(https://github.com/moby/moby/security/advisories/GHSA-6fw5-f8r9-fgfm).

Also: improve integration test TestCreateWithCustomMaskedPaths() to ensure
default masked paths don't apply to privileged containers.

Refers to https://github.com/moby/moby/pull/49560

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2025-07-16 11:07:28 +02:00
Eric Lin
a4ac2e3b63 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:58:34 +00:00
Kubernetes Prow Robot
756c2db4e8
Merge pull request #131785 from rata/automated-cherry-pick-of-#130243-upstream-release-1.31
Automated cherry pick of #130243: Revert userns kernel check
2025-06-05 06:12:40 -07:00
Kubernetes Prow Robot
b62290aaff
Merge pull request #131783 from rata/automated-cherry-pick-of-#131623-upstream-release-1.31
Automated cherry pick of #131623: kubelet: userns: Improve errors returned to the user
2025-06-04 18:48:38 -07:00
Rodrigo Campos
c9dbae7d06 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:34:54 +02:00
Rodrigo Campos
2e0622bf23 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:34:54 +02:00
Rodrigo Campos
4c652757ad pkg/kubelet/userns: Provide stub implementation for windows
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-05-15 12:34:54 +02:00
Rodrigo Campos
156c80a613 pkg/kubelet: Fix userns tests on Windows
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-05-15 12:34:54 +02:00
Rodrigo Campos
1e53e59c3a 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:27:10 +02:00
Rodrigo Campos
c88aef2d63 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:27:10 +02:00
Rodrigo Campos
e885986393 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:23:17 +02:00
Rodrigo Campos
c0eb9e3433 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:23:17 +02:00
Rodrigo Campos
e983d3f575 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:23:17 +02:00
Kubernetes Prow Robot
88e9d8fe6a
Merge pull request #131439 from gnufied/automated-cherry-pick-of-#131418-upstream-release-1.31
Automated cherry pick of #131418: Check for newer fields when deciding expansion recovery feature status
2025-05-13 22:57:16 -07:00
Nick Baker
3691b1d98d fix(kubelet): acquire imageRecordsLock when removing image 2025-05-01 21:56:29 -07:00
Prince Pereira
92e3993bc7 Manually adding fix for failing pull-kubernetes-typecheck tests which had dependency with this commit: 6186303580 2025-04-27 21:54:22 -07:00
Hemant Kumar
e4e7f313ff Mark NodeExpansion finsihed without featuregate check 2025-04-24 12:45:41 -04:00
Hemant Kumar
4370821c87 Also change final status by removing featuregate check 2025-04-24 12:38:29 -04:00
Hemant Kumar
014728e763 Check for newer fields when deciding expansion recovery feature status 2025-04-24 12:38:22 -04:00
Prince Pereira
a1bb711b85 Fix for HNS local endpoint was being deleted instead of the remote endpoint. 2025-04-23 23:09:23 -07:00
carlory
3836d58744 fix handle terminating pvc when kubelet rebuild dsw
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-03-10 18:59:59 +08:00
Kubernetes Prow Robot
002366336a
Merge pull request #130509 from cici37/automated-cherry-pick-of-#130035-upstream-release-1.31
Automated cherry pick of #130035: [KEP-5080]Ordered Namespace Deletion
2025-03-07 22:45:44 -08:00
Cici Huang
ae9dcc0a75 Update status before returning err 2025-03-06 11:00:19 -08:00
Cici Huang
f12dbc31a9 Add the feature gate OrderedNamespaceDeletion for apiserver. 2025-03-03 13:43:37 -08:00
Richa Banker
19ebee96b2 Add tests 2025-02-10 14:39:06 -08:00
Tim Allclair
4272f7016c Kubelet server handler cleanup 2025-02-06 11:04:01 -08:00
Kubernetes Prow Robot
50c9c29e09
Merge pull request #129744 from pjsharath28/automated-cherry-pick-of-#128997-upstream-release-1.31
Automated cherry pick of #128997: Replaced util.NewIOHandler() with fakeIOHandler to make UT pass on different host envs
2025-01-28 10:35:23 -08:00
Kubernetes Prow Robot
d7fc7e30cb
Merge pull request #129519 from kishen-v/automated-cherry-pick-of-#127422-upstream-release-1.31
Automated cherry pick of #127422: Fix Go vet errors for master golang
2025-01-22 11:10:37 -08:00
Abhishek Kr Srivastav
8f8cca81af Added check for multipath device mapper
Addressed review comments
2025-01-22 10:27:01 +05:30
Aravindh Puthiyaparambil
c94919d68b
kubelet: use env vars in node log query PS command
- Use environment variables to pass string arguments in the node log
  query PS command
- Split getLoggingCmd into getLoggingCmdEnv and getLoggingCmdArgs
  for better modularization
2025-01-13 14:46:05 -08:00
Kubernetes Prow Robot
6f456a1908
Merge pull request #129323 from ardaguclu/automated-cherry-pick-of-#129301-upstream-release-1.31
Automated cherry pick of #129301: Do not attempt to truncate revision history if revisionHistoryLimit is negative
2025-01-09 03:36:32 -08:00
Kubernetes Prow Robot
c8317628c1
Merge pull request #129181 from RomanBednar/automated-cherry-pick-of-#128086-upstream-release-1.31
Automated cherry pick of #128086: prevent unnecessary resolving of iscsi/fc devices to dm
2025-01-08 11:28:31 -08:00
Abhishek Kr Srivastav
9d10ddb060 Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com>
Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com>
2025-01-08 15:11:34 +05:30
Arda Güçlü
b82572f6f6 Do not attempt to truncate revision history if revisionHistoryLimit is negative 2024-12-20 10:03:38 +03:00
Roman Bednar
b8265e7853 prevent unnecessary resolving of iscsi/fc devices to dm 2024-12-12 15:59:00 +01:00
carlory
04f5b20388 kubelet: Fix the volume manager did't check the device mount state in the actual state of the world before marking the volume as detached. It may cause a pod to be stuck in the Terminating state due to the above issue when it was deleted. 2024-12-03 09:47:51 +08:00
Adrian Moisey
ea299acf97
Ensure that a node's CIDR isn't released until the node is deleted
Fixes https://github.com/kubernetes/kubernetes/issues/127792

Fixes bug where a node's PodCIDR was released when the node was given a
delete time stamp, but was hanging around due to a finalizer.
2024-11-14 20:00:41 +02:00
Kubernetes Prow Robot
11d2b4d7ed
Merge pull request #128340 from googs1025/automated-cherry-pick-of-#127834-upstream-release-1.31
Automated cherry pick of #127834: fix(leaderelection): nil check in OnStoppedLeading func
2024-11-12 10:18:46 +00:00
Kubernetes Prow Robot
f7d6fad111
Merge pull request #128431 from NoicFank/automated-cherry-pick-of-#128307-upstream-release-1.31
Automated cherry pick of #128307: bugfix(scheduler): preemption picks wrong victim node with higher priority pod on it
2024-11-12 09:13:07 +00:00
Kubernetes Prow Robot
dd898b82d0
Merge pull request #127584 from AxeZhan/automated-cherry-pick-of-#125398-upstream-release-1.31
Automated cherry pick of #125398: [scheduler] When the hostname and nodename of a node do not match, ensure that pods carrying PVs with nodeAffinity are scheduled correctly.
2024-11-12 09:12:53 +00:00
NoicFank
2d540ade5f bugfix(scheduler): preemption picks wrong victim node with higher priority pod on it.
Introducing pdb to preemption had disrupted the orderliness of pods in the victims,
which would leads picking wrong victim node with higher priority pod on it.
2024-10-30 15:36:30 +08:00
googs1025
c94baacfff fix(leaderelection): nil check in OnStoppedLeading func 2024-10-26 00:12:37 +08:00
Dan Winship
b84713348c Fix deleted UDP endpoint detection 2024-10-02 07:08:21 -04:00
AxeZhan
d8d31947dc tests for nodes with different nodeName and name 2024-09-24 06:41:05 +00:00
AxeZhan
fdca80f8dc manually revert #109877 2024-09-24 06:41:05 +00:00