-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve CRD version conversion description #37267
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better: “You should not use this approach…” (or strategy).
We prefer the active voice in docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should have known the active voice was preferred ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Needs 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 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. Git tree hash: 47c470f5597ef6b64a007be18894eb1ab6445ccf
|
/cc @sftim
Fixes: #27534