Commit Graph

53519 Commits

Author SHA1 Message Date
Prince Pereira
eb8f93348d Fix for preferred dualstack and required dualstack in winkernel proxier. 2026-01-21 05:40:42 +00:00
Kubernetes Prow Robot
31a3b4eb53 Merge pull request #136099 from jsafrane/automated-cherry-pick-of-#135629-upstream-release-1.34
Automated cherry pick of #135629: selinux: Fix the controller to ignore finished pods
2026-01-11 02:15:59 +05:30
Dan Winship
b57a77635a Switch ipvs and winkernel back to more regular forced syncs 2026-01-08 22:24:52 -05:00
Filip Křepinský
e24e713ab7 mark QuotaMonitor as not running and invalidate monitors list
to prevent close of closed channel panic
2026-01-08 13:44:17 +01:00
Jan Safranek
0b27e410f0 Add unit test with CSIDriver.SELinuxMount=false
Add unit test with a volume plugin that does not support SELinux. That
simulates a CSi driver whose spec.SELinuxMount is empty or false.

This requires a little refactoring, each unit test now has a flag if it
runs with a volume plugin that supports SELinux.
2026-01-08 11:16:36 +01:00
Jan Safranek
e0600b8e39 Use only enqueuePod to add pods to the controller queue
enqueuePod already creates the right key for a pod, it's better to reuse it
than copy the code around.
2026-01-08 11:16:36 +01:00
Jan Safranek
3e55c95bb0 Fix policy of Pods with unknown SELinux label
Reset SELinuxChangePolicy of Pods that have no SELinux label set to
Recursive. Kubelet cannot mount with `-o context=<label>`, if the label is
not known.

This fixes the e2e test error revealed by the previous commit - it changed the
e2e test to check for events when no events are expected and it found a
warning about a Pod with no label, but MountOption policy.
2026-01-08 11:16:36 +01:00
Jan Safranek
4410a9edc7 Add new unit tests 2026-01-08 11:16:36 +01:00
Jan Safranek
1bf9b3d261 Rework unit tests to builder pattern 2026-01-08 11:16:36 +01:00
Jan Safranek
b25300bb21 selinux: Do not report conflits with finished pods
When a Pod reaches its final state (Succeeded or Failed), its volumes are
getting unmounted and therefore their SELinux mount option will not
conflict with any other pod.

Let the SELinux controller monitor "pod updated" events to see the pod is
finished
2026-01-08 11:16:36 +01:00
Jan Safranek
4265285c64 refactoring: use a common function to enqueue Pod
addPod and deletePod have the same implementation, merge them into
enqueuePod
2026-01-08 11:16:36 +01:00
Kubernetes Prow Robot
7c5d1fcf8e Merge pull request #135064 from eltrufas/automated-cherry-pick-of-#133599-upstream-release-1.34
Automated cherry pick of #133599: Mark API server errors as transient in csi raw block driver
2025-12-05 09:00:56 -08:00
Kubernetes Prow Robot
58da6ff3c8 Merge pull request #135207 from SergeyKanzhelev/automated-cherry-pick-of-#135153-upstream-release-1.34
Automated cherry pick of #135153: mark device manager as haelthy before it started for the first time
2025-12-04 08:26:58 -08:00
Kubernetes Prow Robot
11a8eb6cb2 Merge pull request #135087 from liggitt/automated-cherry-pick-of-#135017-upstream-release-1.34
Automated cherry pick of #135017: Fix spurious statefulset rollout from 1.33 → 1.34
2025-11-07 18:13:28 -08:00
Kubernetes Prow Robot
77689858f9 Merge pull request #135023 from hoskeri/automated-cherry-pick-of-#134740-release-1.34
Automated cherry pick of #134740: remove taint values from unschedulable messages in pod status
2025-11-07 18:13:21 -08:00
Kubernetes Prow Robot
6f91cb6c3f Merge pull request #134800 from yuanwang04/automated-cherry-pick-of-#133072-upstream-release-1.34
Automated cherry pick of #133072: Fix startup probe worker termination for sidecar containers
2025-11-07 18:13:06 -08:00
Kubernetes Prow Robot
8b38073f2a Merge pull request #134533 from andyzhangx/automated-cherry-pick-of-#134144-upstream-release-1.34
Automated cherry pick of #134144: change klog to log volume name instead of entire spec in
2025-11-07 18:12:51 -08:00
Kubernetes Prow Robot
11e6caf667 Merge pull request #135191 from gohilankit/automated-cherry-pick-of-#135081-upstream-release-1.34
Automated cherry pick of #135081: Clean up event messages for errors in Portworx in-tree driver
2025-11-07 17:00:58 -08:00
Kubernetes Prow Robot
5d5a495526 Merge pull request #135170 from princepereira/automated-cherry-pick-of-#135146-upstream-release-1.34
Automated cherry pick of #135146: kube-proxy/winkernel: fix stale RemoteEndpoints due to premature clearing of terminatedEndpoints map
2025-11-07 17:00:51 -08:00
Sergey Kanzhelev
c2cd8aa1f1 mark device manager as haelthy before it started for the first time 2025-11-07 03:01:55 +00:00
Ankit Gohil
97650c1c4f Clean up event messages for errors in Portworx in-tree driver 2025-11-06 18:48:24 +00:00
Prince Pereira
f4fd1e3a62 kube-proxy/winkernel: fix stale RemoteEndpoints due to premature clearing of terminatedEndpoints map. 2025-11-06 07:53:57 +00:00
Dejan Zele Pejchev
fd812c5b05 fix: allow job startTime updates on resume from suspended state
Signed-off-by: Dejan Zele Pejchev <pejcev.dejan@gmail.com>
2025-11-05 10:00:22 +01:00
Jordan Liggitt
aade7b8e8d Fix spurious workload rollout due to null creationTimestamp in controller revisions 2025-11-03 21:18:35 -05:00
Jordan Liggitt
7c5ec38d1b Remove unused and fragile revision hash comparisons
This was broken since 666a41c2ea when the label value became non-integer encoded
The chance of one controller revision hash label being int-parsable: 7/27 ^ 8 = 0.00002041 = ~0
The chance of both being int-parsable: 0.00002041^2 = ~0

Hash comparison locks in differences in content failing EqualRevision
even when the semantic content is normalized to be equal.
2025-11-03 21:18:34 -05:00
Jordan Liggitt
d5ffe89038 Add unit test detecting spurious statefulset rollout 2025-11-03 21:18:34 -05:00
Rafael Castillo
fe9bdd1dd1 Mark API server errors as transient in csi raw block driver
Certain failures during SetupDevice and MapPodDevice are not treated as
transient in the csi raw block plugin implementation, while they are in
the file mode plugin. This can lead to certain failures causing volumes
to be marked as unmounted incorrectly.

This patch brings the block plugin up to parity with the fs one by
marking the equivalent calls as transient. This mostly covers API server
and some csi driver calls.
2025-11-03 15:47:59 +00:00
Abhijit Hoskeri
50096b40c1 Do not log untolerated taint in pod status updates.
The taint toleration plugin records taint keys and values
from non-matching nodes. Taint keys and values may be
sensitive information in some environments.

Use a generic message, and show the info in logs instead.
2025-10-31 16:56:42 -07:00
aditya
a42f81f4b2 Fix startup probe worker termination for sidecar containers
Fixes a bug where startup probe workers terminate incorrectly for sidecar
containers with restartPolicy=Always when the pod has restartPolicy=Never,
causing main containers to remain stuck in Initializing state.

Changes:
- Add container-level restart policy check for init containers only
- Extract complex boolean logic to named variable for readability
- Refactor test helper to use existing newWorker() function
- Add comprehensive unit and e2e tests for both scenarios
2025-10-22 22:46:06 +00:00
Kubernetes Prow Robot
03a5f06c26 Merge pull request #134612 from cpanato/update-go-rel-134
[release-1.34][go] Bump dependencies, images and versions used to Go 1.24.9 and distroless iptables
2025-10-17 07:28:52 -07:00
Jordan Liggitt
6ebab3f180 Include relevant dimensions in pod controller indexing 2025-10-16 13:55:04 -04:00
Carlos Panato
8cd6b631ce update setcap and debian-base to bookworm-v1.0.6
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-10-15 11:44:40 +02:00
Jordan Liggitt
f40e4ce552 Remove invalid SAN certificate construction 2025-10-14 09:35:42 -04:00
Swagat Bora
5300f7a322 change klog to log volume name instead of entire spec in GetDeviceMountPath
Signed-off-by: Swagat Bora <sbora@amazon.com>
2025-10-11 01:25:59 +00:00
Kubernetes Prow Robot
dd5246c556 Merge pull request #134133 from Peac36/automated-cherry-pick-of-#134054-upstream-release-1.34
Automated cherry pick of #134054: fix incorrect warning whenever headless service is created/updated
2025-10-08 01:53:02 -07:00
Maciej Skoczeń
61c0fb13a7 Disable SchedulerAsyncAPICalls feature gate due to a known regression 2025-10-03 13:04:19 +00:00
Kubernetes Prow Robot
e438cf2a16 Merge pull request #134247 from macsko/automated-cherry-pick-of-#134245-upstream-release-1.34
Automated cherry pick of #134245: Revert "fix: handle corner cases in the async preemption"
2025-09-26 02:52:18 -07:00
Kubernetes Prow Robot
0801367982 Merge pull request #134031 from princepereira/automated-cherry-pick-of-#133953-upstream-release-1.34
Automated cherry pick of #133953: Fix ClusterIP load balancer disappearing when InternalTrafficPolicy: Local is set.
2025-09-26 01:34:36 -07:00
Kubernetes Prow Robot
13b8daa06e Merge pull request #133934 from pohly/automated-cherry-pick-of-#133926-origin-release-1.34
Automated cherry pick of #133926: DRA kubelet: avoid deadlock when gRPC connection to driver goes idle
2025-09-26 01:34:28 -07:00
Kubernetes Prow Robot
3b28d3ba09 Merge pull request #133905 from huww98/automated-cherry-pick-of-#133890-origin-release-1.34
Automated cherry pick of #133890: kubelet/metrics: fix multiple Register call
2025-09-26 01:34:19 -07:00
Maciej Skoczeń
3f170932be Revert "Merge pull request #133213 from sanposhiho/second-trial-conor"
This reverts commit a2bf45b081, reversing
changes made to 2b2ea27250.
2025-09-24 15:01:03 +00:00
Nikola
560cc36db2 fix incorrect warning whenever headless service is created/updated
Signed-off-by: Nikola <peac36@abv.bg>
2025-09-18 18:19:44 +03:00
Jack Ma
07ac83c146 fix: use iifname for input interface name matches
add tests to cover nftables; also fix NewDetectLocalByBridgeInterface
2025-09-17 09:59:14 -07:00
Prince Pereira
7d43ddbbfb Fix ClusterIP load balancer disappearing when InternalTrafficPolicy: Local is set. 2025-09-11 21:47:13 -07:00
Patrick Ohly
b97399727e DRA kubelet: avoid deadlock when gRPC connection to driver goes idle
When gRPC notifies the kubelet that a connection ended, the kubelet tries to
reconnect because it needs to know when a DRA driver comes back. The same code
gets called when a connection goes idle, by default after 30 minutes. In that
and only that case the conn.Connect call deadlocks while calling into the gRPC
idle manager.

This can be reproduced with a new unit test which artificially shortens the
idle timeout. This fix is to move the Connect call into a goroutine because
then both HandleConn and Connect can proceed. It's sufficient that Connect
finishes at some point, it doesn't need to be immediately.
2025-09-08 20:36:06 +02:00
胡玮文
76ab5f0664 kubelet/metrics: fix multiple Register call
DRA also calls Register at pkg/kubelet/cm/container_manager_linux.go NewContainerManager(), causing volume stats collector being ignored.
Fix this by moving it out of `sync.Once()`, allowing multiple calls to `Register()` func.
2025-09-05 14:54:05 +08:00
胡玮文
04fd1ada6f kubelet/metrics: misc optimization 2025-09-05 14:54:05 +08:00
Kubernetes Prow Robot
8c0988abb6 Merge pull request #133745 from jsafrane/automated-cherry-pick-of-#133425-release-1.34
Automated cherry pick of #133425: Fix SELinux label comparison
2025-09-04 08:31:17 -07:00
xigang
a75938d9e5 Fix DaemonSet misscheduled status not updating on node taint changes
Signed-off-by: xigang <wangxigang2014@gmail.com>
2025-08-28 18:07:40 +08:00
Jan Safranek
3ebbe57311 Add a note about Conflicts return value 2025-08-28 10:29:24 +02:00