Improve CRD version conversion description#37267
Improve CRD version conversion description#37267k8s-ci-robot merged 3 commits intokubernetes:mainfrom
Conversation
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
|
/sig api-machinery |
|
@kubernetes/sig-api-machinery-pr-reviews : PTAL and provide a signoff from a technical standpoint. |
liggitt
left a comment
There was a problem hiding this comment.
technical content lgtm, made one suggestion
| (depending on the configuration). Note that this is unlikely to lead to good | ||
| results if the schemas differ between the storage and requested version. |
There was a problem hiding this comment.
let's be stronger here... "This strategy should not be used if the same data is represented in different fields between versions."
There was a problem hiding this comment.
Even better: “You should not use this approach…” (or strategy).
We prefer the active voice in docs.
There was a problem hiding this comment.
I should have known the active voice was preferred ;-)
There was a problem hiding this comment.
Since "same data is represented in different fields" is strictly speaking a sub-case of "schemas differ", I added this rather than replacing the current sentence. I think it reads well. Let me know if you feel strongly about this.
68c06cd to
270c680
Compare
|
Comment applied and rebased to a bit fresher base. PTAL |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tengqm The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Looks like I have an approval but I need an LGTM as well 🤔 |
sftim
left a comment
There was a problem hiding this comment.
For changes to the live site, we typically don't have the same person LGTM and approve it (there's an exception for trivial fixes). That way, if there's a disagreement, it can happen before the publish.
#37267 (review) is a tech LGTM
/lgtm
| If you update an existing object, it is rewritten at the version that is | ||
| currently the storage version. This is the only way that objects can change from | ||
| one version to another. |
There was a problem hiding this comment.
💭 we should explain what happens if you do a no-op server-side apply change using the stored version of that API (eg stored version is v1, SSA request uses v2 (but a no-op), and the storage version for that API is v2).
Readers might want to know:
- does the no-op quality of the request mean that the stored version is unchanged?
- does the storage version change because conversion is required, and a request that causes a write has been admitted
- does something else affect the outcome here?
There was a problem hiding this comment.
The write short-circuit happens at the last minute by comparing the bytes about to be stored against the bytes already stored.
That means a "no-op" update of an object currently stored in v1 but whose CRD has since changed the storage version to v2 will persist an update in v2 format, even if nothing else changed (because the apiVersion: .../v2 bytes would be different).
|
LGTM label has been added. DetailsGit tree hash: 47c470f5597ef6b64a007be18894eb1ab6445ccf |
/cc @sftim
Fixes: #27534