TestVersionedValidationByFuzzing swept a hand-maintained list of
group/versions that had a typo (network.k8s.io) and omitted several
groups (apps, policy, rbac, flowcontrol, scheduling). Replace it with a
sweep of the scheme for served GVKs that have declarative validation,
so new group/versions are covered automatically.
Skip extensions/v1beta1 centrally in VerifyVersionedValidationEquivalence
instead of via the per-call WithSkipGroupVersions option: it opts out of
declarative validation but shares an internal type with versions that do
not. Any other version missing declarative validation now fails the sweep
rather than being silently skipped.
The gate is GA and locked to true, so explicitly setting it in the
equivalence test harness only emits a 'setting GA feature gate' warning
without changing behavior. Rely on its locked default instead.
Address review feedback on PR #139568:
- Group all test cases by the ObjectMeta field they cover (the stray
"finalizers: name too long" case previously sat at the bottom).
- Mirror the field grouping in the update suite. The update suite keeps
only the baseline valid case; field-level boundaries are covered by
the create suite and re-checking them on update adds no signal.
- Fix three errorlint warnings flagged by pull-kubernetes-linter-hints:
switch fmt.Errorf("...: %v", err) to %w in the metadata-accessor
failure paths of rest.ValidateCreate and validateCommonFields.
- Reword the extensions/v1beta1 skip comment in
TestVersionedValidationByFuzzing: drop the stray trailing semicolon
and explain that the group is unserved and does not carry DV.
Add WithSkipGroupVersions and apply it to the NetworkPolicy and Scale tests,
whose internal types also register under the now-unvalidated extensions/v1beta1.
With DV always enforced, the "hand written validation" subtest (which
set DeclarativeValidation=off and emulated 1.35) now exercises the
same code path as "Beta disabled". Remove it along with the
MinEmulationVersion option, the WithMinEmulationVersion helper,
deDuplicateErrors, and the now-tautological imperative-vs-declarative
equivalence checks.
Variant of VerifyUpdateValidationEquivalence that accepts a validate
closure instead of a RESTUpdateStrategy, for callers that produce
handwritten and declarative validation errors directly.
VerifyValidationEquivalence's all-rules-enforced subtest now extracts
the GVK from the request context and forwards each error to
coverage.RecordObservedRules so AssertDeclarativeCoverage (in the
generated TestMain) can confirm every declared rule fired.
Introduce the ResourcePoolStatusRequest resource type in the
resource.k8s.io/v1alpha3 API group, gated behind the
DRAResourcePoolStatus feature gate. This includes external and internal
type definitions, protobuf/OpenAPI generated code, client-go typed
clients, informers, listers, apply configurations, deepcopy, defaults,
conversion, fuzzer, declarative validation tags, and API discovery
metadata.