Skip to content

Clarify API version and alpha field guidance - #9222

Open
dims wants to merge 1 commit into
kubernetes:mainfrom
dims:docs/experimental-api-versioning
Open

dims wants to merge 1 commit into
kubernetes:mainfrom
dims:docs/experimental-api-versioning

Conversation

@dims

@dims dims commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Had a chat with @kflynn who shared a doc with their experiences, trying to capture what we can from there for forward guidance to folks

AI assistance was used to review existing guidance and draft these documentation clarifications.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
@kubernetes-prow kubernetes-prow Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 15, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added area/developer-guide Issues or PRs related to the developer guide approved Indicates a PR has been approved by an approver from all required OWNERS files. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. labels Oct 15, 2026
@dims dims changed the title [WIP] Clarify API version and alpha field guidance Clarify API version and alpha field guidance Oct 16, 2026
@kubernetes-prow kubernetes-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 16, 2026
@dims

dims commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

@kflynn please review and let me know what else we can word smith for now.

@dims

dims commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

cc @kubernetes/api-reviewers


Checking whether a field is in use does not by itself handle incompatible changes
to its type or meaning. See [New field in existing API version](api_changes.md#new-field-in-existing-api-version)
for guidance on changing or removing alpha fields.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an odd place to put this comment. Was it added here because of "removing alpha fields"?

That's not what field wiping does: it's about removing fields which are currently disabled.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pohly suggest changes please?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I would simply leave out this comment. I'm not sure what it's trying to tell me besides pointing to some other doc.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @kflynn

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I replied in #9222 (comment).)

Comment on lines +382 to +384
Checking whether a field is in use does not by itself handle incompatible changes
to its type or meaning. See [New field in existing API version](api_changes.md#new-field-in-existing-api-version)
for guidance on changing or removing alpha fields.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving the file as-is seems better:

Suggested change
Checking whether a field is in use does not by itself handle incompatible changes
to its type or meaning. See [New field in existing API version](api_changes.md#new-field-in-existing-api-version)
for guidance on changing or removing alpha fields.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I disagree. The point of all of these changes is to provide better guidance around how apiVersion works and how alpha fields work, and it seems relevant to call out that knowing that an alpha field is in use is not a guarantee that it hasn't changed.

It's true that the details are in another doc, but someone reading this has not automatically read the other. Nor will they necessarily have the other doc in mind.

@pohly pohly Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kflynn: I simply don't understand what you are trying to say here.

What does "checking is in use" refer to? What does "handle incompatible changes" imply for alpha field?

Here's my interpretation:

  • "checking in use" is part of the drop-disabled-field logic during updates. It's unrelated to changing the field type.
  • "handle incompatible changes" is typically not something we do for alpha-quality fields. They can be changed from one release to another, even if that breaks version-skew scenarios, existing clusters, or out-dated consumers. That's what "alpha" means. We try to avoid it, but it's better to make such breaking changes early when a feature is still new instead of increasing technical debt or making the API more complex.

Comment on lines +227 to +230
An object may be accessed through multiple API versions. The `apiVersion` returned
by the server identifies the representation being returned, not the API version
used to create the object. For custom resources, it also does not identify the
release of the CRD that defined the schema.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At an architectural level, Kubernetes doesn't record the API version used at creation time. This new test isn't wrong; it could perhaps be even more emphatic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The apiVersion returned by the server identifies the representation being returned, not the API version used to create the object – Kubernetes does not record the apiVersion used to create the object."

??


An object may be accessed through multiple API versions. The `apiVersion` returned
by the server identifies the representation being returned, not the API version
used to create the object. For custom resources, it also does not identify the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
used to create the object. For custom resources, it also does not identify the
used to create or store the object. For custom resources, it also does not identify the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just move to store. I don't think create is correct here, create doesn't matter as soon as the create API request is complete right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having both is more clear to me.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with just "store". Otherwise we have to add "update" and "patch"...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/developer-guide Issues or PRs related to the developer guide cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants