generation test into pod_admission.go and commenting out
PodReadyToStartContainers. Conformance promotion will follow in a
separate PR once this lands green, per review feedback.
The --bounding-dirs flag and BoundingDirs field in deepcopy-gen are dead
code. The field is stored on the genDeepCopy struct but never read by
any method.
The flag was introduced in gengo commit 14ae879 (2016) to control which
types deepcopy would generate for and which nested types it could assume
had generated deepcopy functions. Over time, as deepcopy-gen was
rewritten (gengo v2, moved to code-generator), the copyableAndInBounds /
isRootedUnder usage was dropped. The field and flag survived but
g.boundingDirs is never referenced in the current code.
hack/update-codegen.sh still passed --bounding-dirs but it had no
effect.
Add conversion roundtrip testing for v1 -> api -> v1 to verify the
internal API types (which use UniqueString for efficiency) correctly
round-trip with the external v1 API.
Increase FuzzIterations to 100 for better test coverage.
Add automated fuzz testing of conversion round-tripping for the DRA API.
The test iterates over all non-list types registered in v1beta1 and v1beta2,
fuzzes each object, converts it to v1 and back, and verifies the result
matches the original using apiequality.Semantic.DeepEqual.
Test structure:
- Helper code in api/internal/test/roundtrip.go
- TestConversionRoundTrip in each version's conversion_test.go
- This ensures coverage statistics are visible per-package
Fix missing fields in the v1beta1 hand-written conversion code:
- Device: BindsToNode, BindingConditions, BindingFailureConditions,
AllowMultipleAllocations were not copied when converting between
v1beta1.BasicDevice (nested) and v1.Device (flat).
- DeviceRequest: Capacity was not copied between v1beta1.DeviceRequest
and v1.ExactDeviceRequest, and was missing from hasAnyMainRequestFieldsSet.
These fields are for alpha features added after v1beta1, so while worth
fixing, the impact in practice is limited.
These readonly packages are the same as in hack/update-codegen.sh.
Without users of kube_codegen.sh will get an error from validation-gen
if they use e.g. metav1.TypeMeta in their types.
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
* Promote MutableCSINodeAllocatableCount to GA
Signed-off-by: Eddie Torres <torredil@amazon.com>
* Lock MutableCSINodeAllocatableCount feature gate to default
Signed-off-by: Eddie Torres <torredil@amazon.com>
---------
Signed-off-by: Eddie Torres <torredil@amazon.com>
Port 0 lets the OS assign a random free port, avoiding conflicts
when running multiple etcd instances for parallel tests. Peering
is unused in single-node test setups.
In practice, TimeAdded is managed by the API server. When admins used
DeviceTaintRule to simulate eviction, then change the effect to really evict,
it is useful to calculate tolerations based on the time when that second
update happened. Therefore the TimeAdded field gets bumped automatically
when changing the effect.