Skip to content

Add CRD validation warning when unrecognized formats are written to schemas #132532

Open
@jpbetz

Description

@jpbetz

CRDs allow unrecognized formats to be written into OpenAPI schemas. This conforms with the JSON Schema specification, which states that unrecognized formats should be allowed, but ignored, by implementations.

This has a few consequences:

  • Typos in format names are not caught by CRD validation. Instead the format is ignored and CRs can be written that are invalid according to the format.
  • When Kubernetes introduces support for new formats (example), it is possible for Kubernetes versions that do not recognize the format, but the format is ignored and CRs can be written that are invalid according to the format.

Adding a warning when unrecognized formats are written to CRDs can help communicate this when CRDs are written.

Metadata

Metadata

Assignees

Labels

help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.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