Skip to content

Move validation to be per-API-version #8550

Closed
@thockin

Description

@thockin

Validation as it exists today is pretty wrong - it tracks internal types. Once we have long-term support for v1 API and are deep into v2 rework, the validation errors that are produced for v1 will be less and less useful.

We've gone back and forth about this but have not yet come up with a good answer on how to do this generically. I propose we just move it to be per-version, same as defaulting.

Given that v1beta[12] are on the block right now and v1beta3 will be soon, this is the right time. The same day we delete v1beta3 we should move pkg/api/validation into v1 and make it use versioned types.

Yes, it will be tedious to make changes, but I think that is the cost of having multiple versioned APIs in support cycles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiserverkind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/backlogHigher priority than priority/awaiting-more-evidence.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions