Commit Graph

134908 Commits

Author SHA1 Message Date
Jan Safranek
cfa65ceed2 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.
2025-12-12 11:17:54 +01:00
Jan Safranek
4999d9a9e4 selinux: add e2e test with a completed pod
Add a test that checks the SELinux controller does not report conflicts
with Succeeded pods.
2025-12-12 11:17:54 +01:00
Jan Safranek
cbcf845810 Add new unit tests 2025-12-12 11:17:54 +01:00
Jan Safranek
7609325a9a Rework unit tests to builder pattern 2025-12-12 11:17:54 +01:00
Jan Safranek
fa1847ac40 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
2025-12-12 11:17:51 +01:00
Lalit Chauhan
391045e0f3 refactor: Ensure metricIdentifier uses scheme for kind resolution
The metricIdentifier function in pkg/registry/rest/validate.go has been updated to consistently use  for determining the resource kind. This change ensures that the identifier is derived from the scheme, which is the authoritative source for API type information.

Corresponding unit tests in pkg/registry/rest/validate_test.go have been updated to align with this new behavior, explicitly passing the scheme in test cases where kind resolution is expected and verifying the correct unknown_resource fallback when the scheme or object is not sufficient to determine the kind.
2025-12-11 20:53:11 +00:00
Manuel Grandeit
aea05ad180 kubectl apply: fix --dry-run=client to show merged result
When a resource exists on the server, kubectl apply --dry-run=client
was outputting the unchanged server state instead of showing what
would result from applying the manifest.

Fix by computing the three-way merge patch (same as real apply) and
then applying it locally to the current server state.
2025-12-11 21:03:07 +01:00
Dan Winship
f2408aa83f Rearrange setup code in Netpol tests to be consistent between tests 2025-12-11 11:52:00 -05:00
Dan Winship
d8a9c58535 Rename a weirdly named field in Netpol tests 2025-12-11 11:51:58 -05:00
Maciej Szulik
365beb2398 Update allowed-thir-party-license-policy.md link
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-12-11 17:10:35 +01:00
Sascha Grunert
cb011623c8 test: Fix image credential pulls test for CRI-O digest handling
This commit fixes the image credential pulls test by ensuring GetImageRef
and PullImage return the same digest reference format for credential validation.

The test was failing because:
1. PullImage returns a digest reference (e.g., localhost:5000/pause@sha256:abc...)
2. Pull records were stored under this digest
3. GetImageRef returned Image.Id (config hash) instead of a digest reference
4. Credential validation failed due to the lookup mismatch

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2025-12-11 16:10:06 +01:00
Sergey Kanzhelev
49ecd0adeb cri-api changelog for 1.35: no changes 2025-12-10 23:39:18 +00:00
Dan Winship
a6e12205bd Drop unneeded NewWindowsModel from Netpol tests
The SCTP tests are already skipped on Windows, so we don't need any
other special handling.
2025-12-10 15:36:51 -05:00
Penghao
a9f878111e test: Add XFS filesystem support to volume expansion e2e tests
Signed-off-by: Penghao <pewang@redhat.com>
2025-12-11 02:39:24 +08:00
Antoni Zawodny
7577f84e79 Skip last victim in async preemption if any prior Pod preemption failed 2025-12-10 14:44:06 +01:00
Lubomir I. Ivanov
08a339bdd7 kubeadm: do not use deprecated etcd flags
In local.go there are a couple of flags that changed their
format for etcd > 3.6.0. kubeadm 1.36 no longer supports
deploying a k8s version that maps to etcd < 3.6.0, thus
the branching and the deprecated flags can be removed.
2025-12-10 14:33:31 +01:00
Patrick Ohly
f58f81d917 local-up-cluster.sh: support more recent containerd like 2.2
The kubekins image got updated from containerd 1.7 to 2.2, which broke
local-up-cluster.sh in the CI because more recent containerd uses single
quotation marks around strings instead of double quotation marks as before. The
search/replaced with sed no longer matched, causing containerd to fail mounting
overlayfs on the default /var/lib/containerd. We have to use the emptyDir host
mount under /docker-graph.

The fix is to relax the search term slightly so that it accepts both kinds of
quotation marks.
2025-12-10 09:17:03 +01:00
Ed Bartosh
8a573b92ff DRA: add new e2e tests for extended resources 2025-12-10 10:09:50 +02:00
yashsingh74
1618bf1357 Update CNI plugins to v1.9.0
Signed-off-by: yashsingh74 <yashsingh1774@gmail.com>
2025-12-10 10:01:39 +05:30
Kubernetes Release Robot
04d87a4b6e CHANGELOG: Update directory for v1.33.7 release 2025-12-10 01:15:24 +00:00
Kubernetes Release Robot
f887a29fe2 CHANGELOG: Update directory for v1.34.3 release 2025-12-10 01:13:50 +00:00
Kubernetes Release Robot
612122f1d7 CHANGELOG: Update directory for v1.35.0-rc.1 release 2025-12-09 13:56:23 +00:00
Damien Grisonnet
a2cf7f770d test/e2e: increase memory limits in pod resize tests
The pod resize e2e tests use memory limits as low as 20Mi for Guaranteed
QoS pods. On OpenShift/CRI-O, the container runtime (runc) runs inside
the pod's cgroup and requires ~20-22MB of memory during container
creation and restart operations. This causes intermittent OOM kills
when the pod's memory limit is at or below runc's memory footprint.

This issue does not occur on containerd-based clusters because
containerd's shim runs outside the pod's cgroup by default (ShimCgroup=""),
so runc's memory is not charged against the pod's limit.

Increase memory limits to provide sufficient headroom for runc:
- originalMem: 20Mi -> 35Mi
- reducedMem: 15Mi -> 30Mi
- increasedMem: 25Mi -> 40Mi

The test validates resize behavior, not minimal memory limits, so
larger values do not reduce test coverage.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2025-12-09 12:15:25 +01:00
Kubernetes Prow Robot
b4980b8d6e Merge pull request #135635 from ahmedtd/fix-pcr-logging-nil-panic
kubelet: Fix nil panic in podcertificatemanager
2025-12-08 17:07:33 -08:00
darshansreenivas
b1aebfcf7e fixed order of tags 2025-12-08 17:05:40 -08:00
Jaime Bohorquez
19d50f6340 Fix recording of "DRAOperationsDuration" metric by inverting "is_error" boolean. 2025-12-08 23:40:05 +00:00
Aditi Gupta
2307674798 Fixes the flaky test (Issue #132953) 2025-12-08 13:10:06 -08:00
Taahir Ahmed
8d4237fde8 kubelet: Fix nil panic in podcertificatemanager
If the the PCR that kubelet created gets deleted before it is issued, a
nil panic will be thrown while composing the error message.
2025-12-08 11:43:07 -08:00
Lubomir I. Ivanov
05c4e3febe kubeadm: revert to using a static list of etcd versions
The introduction of dynamic keys in the etcd version
map in constants.go introduced a couple of problems:

1. The size of the map could no longer be unit tested
because at UT runtime there was only one key "0".

2. Once a new k8s release branch is cut the version map
has mismatched versions. The latest k8s version mapped to the
future prerelease alpha (placeholder), the previous was the current
WIP release version and the oldest version in the map is the
current stable. This introduces a undesider shift of versions
where we are applying the wrong version to the current WIP
release unless an contrubutor PRs it.

The old static approach on the other hand is safer because
it hardcodes the versions, and the utility function
EtcdSupportedVersion() ensures that we get a relevant etcd
version even if the input k8s MINOR key is out of bonds for the map.

- Revert to using static version in the map.
- Revert the unit test TestEtcdSupportedVersionLength.
- Add additional comments over the map.
2025-12-08 13:40:11 +01:00
Jan Safranek
6666bd52b8 refactoring: use a common function to enqueue Pod
addPod and deletePod have the same implementation, merge them into
enqueuePod
2025-12-08 12:36:56 +01:00
Kubernetes Prow Robot
03e14cc943 Merge pull request #135271 from bzsuni/bz/etcd/update/v3.6.6
etcd: Update etcd to v3.6.6
2025-12-07 23:39:29 -08:00
bzsuni
2c811fdd3a etcd: Update etcd to v3.6.6
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2025-12-08 05:37:15 +00:00
darshansreenivas
ce6ea2f4b0 adding required and other test cases 2025-12-06 11:02:19 -08:00
Shivam Wayal
daa2e07f08 Fix: Use Get-Volume for Windows snapshot size verification
Implement the robust, multi-stage PowerShell Get-Volume logic to accurately
determine the filesystem size of volumes mounted in Windows E2E tests. This
solution replaces the unreliable fsutil utility and resolves persistent
failures (including in CAPZ) caused by fragile parsing and directory mounts.
2025-12-06 23:05:13 +05:30
Anthony Amador
7ce879d16f Document x-kubernetes-list-map-keys into OpenAPI extensions
This PR adds missing OpenAPI vendor extension documentation for the following:
x-kubernetes-list-map-keys

The provided documentation includes simple additions to api/openapi-spec/README.md with similar format to present documentation.
Fixes issue #131724
2025-12-05 23:37:35 -08:00
Kubernetes Prow Robot
c70011cf10 Merge pull request #135620 from cpanato/update-rules
update publishing rules
2025-12-05 12:06:55 -08:00
Patrick Ohly
b2151b1f51 DRA device taints: fix and simplify unit tests
Using `t` instead of `tCtx` is subtly wrong: the failure is attributed to the
parent test, not the sub-test. Using a separate function with tCtx as
parameter ensures that t is not in scope of the code and thus this mistake
cannot happen. The number of lines is the same, it's just a bit more code.

For TestRetry another advantage is the reduced indention.

It's worth calling out that the same cannot be done for benchmarks:
- They need methods (Loop) or fields (N) which are not exposed by TContext.
- The `for b.Loop()` pattern only works if the for loop is written exactly
  like that.
2025-12-05 19:13:55 +01:00
Kubernetes Prow Robot
ff9971ec7f Merge pull request #135586 from pohly/dra-upgrade-downgrade-skew-range
DRA upgrade/downgrade: roll over only after -alpha.0
2025-12-05 09:22:56 -08:00
Dan Winship
1e61027d75 Switch ipvs and winkernel back to more regular forced syncs 2025-12-05 11:28:32 -05:00
Jan Šafránek
eb13761338 Update test/e2e/storage/testsuites/readwriteoncepod.go
Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
2025-12-05 16:07:53 +01:00
Filip Křepinský
feffdbbcf2 mark QuotaMonitor as not running and invalidate monitors list
to prevent close of closed channel panic
2025-12-05 15:50:32 +01:00
Jan Safranek
618bec889d Fix the preemption test
It needs to run as [Serial], so it accidentally does not evict other Pods.

Consider this scenario on a busy clusters, with all nodes at their attachment limit.

1. pod1 of the preemption test runs, pod2 is created.
2. The scheduler evicts pod1. That frees the RWOP volume and it also frees the last attachment slot on the node.
3. Some other e2e tests creates a Pod and scheduler puts it on a node, taking the last attachment slot.
4. The scheduler schedules pod2 agaian and it sees there is no node with a free attachment slot -> new round of eviction, now evicting a pod of unrelated e2e tests. The unrelated test will fail.
2025-12-05 15:26:13 +01:00
Carlos Panato
dede2886a8 update publishing rules
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-12-05 13:59:29 +01:00
Kubernetes Prow Robot
4e94e70dca Merge pull request #135609 from cpanato/update-go-125
Bump images and versions to go 1.25.5 and distroless iptables
2025-12-05 04:42:59 -08:00
杨军10092085
a14f528ffe When using kubectl to delete multiple sts pods simultaneously, it gets stuck and won't exit 2025-12-05 19:42:16 +08:00
Maciej Szulik
583ddba569 Generated changes
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-12-05 11:59:55 +01:00
Maciej Szulik
e347aa994b React to removing autoscaling v2beta1 and v2beta2
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-12-05 11:59:30 +01:00
Maciej Szulik
fad6e977f7 Remove autoscaling v2beta1 and v2beta2
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-12-05 11:28:58 +01:00
Maciej Szulik
9eb57b6291 test/e2e: explicitly use new err variable inside parallelized code
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-12-05 11:17:34 +01:00
Carlos Panato
eae2a1bd5f Bump images and versions to go 1.25.5 and distroless iptables
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-12-05 10:40:45 +01:00