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>
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>
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>
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>
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>
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>
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>
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>
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>
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.