Skip to content

Umbrella issue - API conventions, changes, review guidelines #3211

Open
@liggitt

Description

@liggitt

This issue is to coordinate efforts to improve and add to the API conventions and API changes documentation, based on existing issues filed, and feedback from reviewers/shadows.

Questions encountered during designs/reviews (answer or clarify in existing docs):

  • how should OS-specific fields be treated? should they be required to be empty or ignored when running on other OSes?

Issues encountered during code reviews (add guidance to relevant docs, or make more explicit if it already exists):

  • don't increment storage version of a resource in the same release that introduces the new version (breaks HA upgrade)
  • don't update callers that support version skew to older api servers (kubectl, controllers) to use new API versions in the same release where they are introduced
  • when copying an existing resource to a new API group, update roles to permit the new API group as well

Checklists for developing and reviewing different types of API changes:

  • New API group
  • New resource
  • New version of an existing resource
  • New field in an existing resource (some guidance exists in API changes doc, ensure it is up to date)
  • New allowed value in an enum field
  • New value in a union type
  • Tightening validation
  • Relaxing validation

Items in the existing docs needing explanation or rationale

  • ...

see also:

hoisted from #5842 (comment):

  • topic talking about reasons to use patch instead of read-modify-update:
    • avoid touching/dropping fields you don't know about
    • avoid precondition failures on rv if some other actor touched the object
  • topic talking about how to use rv preconditions in conjunction with patch requests
  • sweep existing "controllers" (including things like the kubelet) to see how they read from status fields of their objects to see if there are other patterns to follow or traps to avoid

Metadata

Metadata

Assignees

Labels

area/contributor-guideIssues or PRs related to the contributor guidekind/api-changeCategorizes issue or PR as related to adding, removing, or otherwise changing an APIlifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.sig/architectureCategorizes an issue or PR as relevant to SIG Architecture.

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions