Commit Graph

129838 Commits

Author SHA1 Message Date
Francesco Romani
ccc662c228 e2e: node: initial multi-container tests
rewrite tests which exercise multiple container within the
same pod. Preserve the existing testcases, add more.

Note basic coverage for mixed pods - some containers requiring
exclusive CPUs, some not, was already added with the initial batch.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-05-09 11:07:04 +02:00
Francesco Romani
2419d9ccc5 e2e: node: rewrite: multi-cpus single-container pods
We have tests which cover the case on which a pod
with a single container require multiple CPUs;
rewrite them preserving the testcases and actually
adding coverage.

Add and use stricter checks along the way.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-05-09 11:07:04 +02:00
Francesco Romani
e4726719a7 e2e: node: rewrite more compatibility tests
Complete the rewrite the policy option compatibility tests,
rewriting the tests which check compatibility
between the `full-pcpus-only` and `distribute-cpus-across-numa`.

All testcases are preserved.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-05-09 11:07:04 +02:00
Francesco Romani
74fda8c700 e2e: node: rewrite compatibility tests
Rewrite the policy option compatibility tests.
We start with the tests which check the compatibility
between the `full-pcpus-only` and `strict-cpu-reservation`
tests, because the former is the only GA option
at time of writing.

All testcases are preserved.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-05-09 11:07:04 +02:00
Francesco Romani
dd3f9b6074 e2e: node: rewrite CFS quota tests
Rewrite the e2e cpumanager tests about CFS quota management.
All testcases are preserved.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-05-09 11:07:04 +02:00
Francesco Romani
b9ce058ab6 e2e: node: rewrite strict-cpu-reservation tests
rewrite the cpumanager e2e tests for the
`strict-cpu-reservation` policy option to fit
into the new layout.

All testcases are preserved.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-05-09 11:07:04 +02:00
Francesco Romani
3eb2e65fc3 e2e: node: rewrite cpumanager tests
Rewrite the cpumanager tests to make use of the lessons
learned, more modern idioms, remove obsolete assumptions
and in gneeral remove all the legacy which was accumulating
over the years.

The goal is to have a simpler, flatter and more maintenable
code layout, de-entangle the net of dependency,
making the tests more robust and easier to extend.

In short, this is all about maintainability. All the testcases
will be preserved, and few other can be added along the way.

Comments in the code will explain the code layout decisions
and tradeoff, and provide a good guide to add more tests
in the future.

Special care was added in order to maximize the isolation between
tests, at cost, in selected cases of a controlled and planned
code duplication.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-05-09 11:07:04 +02:00
Kubernetes Prow Robot
ebb13a2ad7 Merge pull request #131678 from karlkfi/karl-api-methods
refactor: Use http method constants in apimachinery
2025-05-09 00:31:28 -07:00
Kubernetes Prow Robot
7ce0e1ca2b Merge pull request #131676 from karlkfi/karl-ioutil
refactor: Stop using ioutil in apiserver
2025-05-09 00:31:21 -07:00
Kubernetes Prow Robot
3a1157f29e Merge pull request #131681 from tallclair/backoff-key
Add container resources to crashloop backoff key
2025-05-08 16:25:20 -07:00
Kubernetes Prow Robot
f603a0ada8 Merge pull request #129472 from dims/api-server-crashes-on-concurrent-map-iteration-and-write
Fix API server crash on concurrent map iteration and write
2025-05-08 16:25:13 -07:00
Kubernetes Prow Robot
42634e39d3 Merge pull request #131673 from joshjms/etcd-fix-unit-tests
etcd: fix kubeadm unit tests
2025-05-08 14:39:22 -07:00
Kubernetes Prow Robot
79d1cf301e Merge pull request #131409 from bertinatto/fix-authz-test
e2e: set appropriate groups in SAR of kubelet authz test
2025-05-08 14:39:15 -07:00
Tim Allclair
eb4641d651 Add container Resources to the backoff key 2025-05-08 14:21:19 -07:00
Kubernetes Prow Robot
fc78cdf3a6 Merge pull request #131674 from HirazawaUi/add-approver
add HirazawaUi to kubeadm approvers
2025-05-08 13:21:21 -07:00
Kubernetes Prow Robot
8812a3dc3e Merge pull request #131672 from soltysh/kubectl_featuregate_cleanup
Kubectl FeatureGate cleanups
2025-05-08 13:21:14 -07:00
Karl Isenberg
3f188e5d86 refactor: Use http method constants in apimachinery
- Linter catches this sometimes, but this change catches a few more.
- Avoids using string literals when standard constants are available.
2025-05-08 12:54:06 -07:00
sxllwx
75afa1e0ac Fix API server crash on concurrent map iteration and write
Improve audit context handling by encapsulating event data and operations behind a structured API. Make
the Audit system more robust in concurrent environments by properly isolating mutable state. The cleaner
API simplifies interaction with audit events, improving maintainability. Encapsulation reduces bugs
by preventing direct manipulation of audit events.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Co-Authored-By: Jordan Liggitt <liggitt@google.com>
Co-Authored-By: sxllwx <scottwangsxll@gmail.com>
2025-05-08 15:31:16 -04:00
Karl Isenberg
f93e4645c1 refactor: Stop using ioutil in apiserver
- The ioutl package is deprecated. Migrate to os package functions.
2025-05-08 11:28:52 -07:00
Kubernetes Prow Robot
2342c0912a Merge pull request #131662 from mortent/FixFailToAllocateLargeNumDevices
DRA: Fix failure to allocate large number of devices
2025-05-08 10:45:14 -07:00
Maciej Szulik
9e3a1b0a90 Add comment describing the feature gate with a link to KEP
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-05-08 19:11:40 +02:00
Maciej Szulik
e3f3da5e79 Swap KUBECTL_COMMAND_HEADERS to use the proper feature gate mechanism
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-05-08 19:11:36 +02:00
Maciej Szulik
d1b5f268b4 Drop KUBECTL_ENABLE_CMD_SHADOW featgure gat entirely
https://kep.k8s.io/3638 has been promoted to stable back in 1.32 so now
is the right time to drop this feature gate entirely.

Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-05-08 19:04:58 +02:00
Morten Torkildsen
a6abd717ea DRA: Fix failure to allocate large number of devices 2025-05-08 16:37:43 +00:00
Kubernetes Prow Robot
4e30b51ebc Merge pull request #131668 from soltysh/command_creation_logging
Manually read verbosity before kubectl command construction
2025-05-08 08:53:15 -07:00
Arda Güçlü
6cca37b36f Add integration test for log verbosity 2025-05-08 16:47:35 +02:00
Maciej Szulik
69682b75e5 Manually read verbosity before kubectl command construction
kubectl command construction is slowly getting more functionality which
sometimes requires to log certain actions. Currently we parse the
verbosity only when actually running the command, so all of construction
code is not able to use -v=5. This commit adds the manual parsing and
loglevel setting berore we even start creating the kubectl command.

Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-05-08 16:47:29 +02:00
Kubernetes Prow Robot
ff74d46bf0 Merge pull request #131660 from mortent/FixPrioritizedListForAllocationModeAll
DRA: Fix incorrect behavior for AllocationMode: All in ResourceClaim when used in subrequests
2025-05-08 06:43:15 -07:00
HirazawaUi
ee4c6b90ce add HirazawaUi to kubeadm approvers list 2025-05-08 21:15:24 +08:00
joshjms
77b1236a52 fix: Kubernetes versions in unit tests
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-05-08 21:08:01 +08:00
Kubernetes Prow Robot
0f9987650c Merge pull request #131656 from karlkfi/karl-request-methods
refactor: Add request method constants
2025-05-08 03:29:15 -07:00
Kubernetes Prow Robot
7cb2bd78b2 Merge pull request #131616 from jpbetz/typeconverter-cleanup
Reorganize scheme type converter into apimachinery utils
2025-05-07 18:09:25 -07:00
Kubernetes Prow Robot
2425896910 Merge pull request #131633 from natasha41575/flakyexec
[FG:InPlacePodVerticalScaling] add retries to exec command in cgroup verification
2025-05-07 16:45:14 -07:00
Tim Allclair
8b81a3d883 Rename GetStableKey to GetBackoffKey 2025-05-07 16:42:08 -07:00
Morten Torkildsen
861682235c DRA: Fix incorrect behavior for AllocationMode: All in ResourceClaim when used in subrequests 2025-05-07 21:15:12 +00:00
Keita Mochizuki
a3097010fa Change the implementation design of matchLabelKeys in PodTopologySpread to be aligned with PodAffinity (#129874)
* Change the implementation design of matchLabelKeys in PodTopologySpread to be aligned with PodAffinity

* fix1
2025-05-07 13:01:15 -07:00
Joe Betz
ce02da8dab generate code 2025-05-07 15:42:16 -04:00
Joe Betz
4821604f83 Reorganize scheme type converter into apimachinery utils
This removes a dependency from generated applyconfigurations to a testing
package. To do this, the type converter in the testing package has been
moved out to the apimachinery package and the utilities the converter
depend on have been reorganized.
2025-05-07 15:42:09 -04:00
Karl Isenberg
e81887276c refactor: Add request method constants
This avoids linter errors from using inline strings as http request
methods.
2025-05-07 12:17:48 -07:00
Kubernetes Prow Robot
51fff4f8bd Merge pull request #131635 from thockin/kk_cleanup_codegen
Accumulated cleanups of validation-gen
2025-05-07 11:31:24 -07:00
Kubernetes Prow Robot
ae2cabc903 Merge pull request #131606 from pohly/golangci-lint@v2-fixes
golangci-lint: some fixes after migration to v2
2025-05-07 11:31:17 -07:00
Kubernetes Prow Robot
a02806d8cd Merge pull request #131647 from carsontham/ct/remove-deprecated-klog-flags
kubeadm: Remove deprecated klog flags
2025-05-07 10:05:15 -07:00
carsontham
b9cb3cb333 update klog flags 2025-05-07 23:35:28 +08:00
Kubernetes Prow Robot
b1ce2a61b5 Merge pull request #131249 from MaysaMacedo/randomize-name
Kubelet: Randomize ClusterRole name in e2e
2025-05-07 07:59:16 -07:00
Kubernetes Prow Robot
8b00a96b51 Merge pull request #131620 from ardaguclu/drop-custom-profile-feature
Drop KUBECTL_DEBUG_CUSTOM_PROFILE feature gate entirely
2025-05-07 06:19:15 -07:00
Kubernetes Prow Robot
03763fd1ab Merge pull request #131296 from rzlink/master
e2e: stabilize Windows memory pressure eviction test
2025-05-06 17:45:20 -07:00
Kubernetes Prow Robot
d790594ce1 Merge pull request #131246 from pohly/dra-resourceslice-errors
DRA: improve resource slice publishing
2025-05-06 17:45:13 -07:00
Kubernetes Prow Robot
6acc5af530 Merge pull request #131631 from danwinship/sig-network-approvers
Update sig-network-approvers/reviewers
2025-05-06 15:51:21 -07:00
Kubernetes Prow Robot
a61ab65003 Merge pull request #131618 from hwdef/remove-reviewer
remove hwdef from hack reviewer
2025-05-06 15:51:14 -07:00
Kubernetes Prow Robot
1cc003ae48 Merge pull request #131443 from jpbetz/lockfree-error-backoff
Avoid lock contention for error backoff
2025-05-06 14:01:14 -07:00