-
Notifications
You must be signed in to change notification settings - Fork 2
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
crd-bumper: A tool to bump a repo's CRD versions. #189
Conversation
See Kubebuilder's "Tutorial: Multi-Version API" (https://book.kubebuilder.io/multiversion-tutorial/tutorial) for a description of the mechanism. This tool implements the hub-and-spoke model of CRD versioning. See Kubebuilder's "Hubs, spokes, and other wheel metaphors" (https://book.kubebuilder.io/multiversion-tutorial/conversion-concepts) for a description of the model. Signed-off-by: Dean Roehrich <[email protected]>
Signed-off-by: Dean Roehrich <[email protected]>
98dbc83
to
07fac08
Compare
Signed-off-by: Dean Roehrich <[email protected]>
Signed-off-by: Dean Roehrich <[email protected]>
tools/crd-bumper/README.md
Outdated
```console | ||
git clone [email protected]:NearNodeFlash/lustre-fs-operator.git | ||
cd lustre-fs-operator | ||
crd-bumper.py --most-recent-spoke v1alpha1 --prev-ver v1beta1 --new-ver v1beta2 all |
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 instructions above assume you're in this directory, so do we need to add the cloned folders to .gitignore
?
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.
Now the tool does the clone for you, and clones it under workingspace/lustre-fs-operator
(in this case). That dir is already covered by .gitignore.
I'd recommend running all this python code through
|
No other changes. Signed-off-by: Dean Roehrich <[email protected]>
Done. |
Co-authored-by: Blake Devcich <[email protected]>
Co-authored-by: Blake Devcich <[email protected]>
Co-authored-by: Tony Floeder <[email protected]>
Co-authored-by: Blake Devcich <[email protected]>
Signed-off-by: Dean Roehrich <[email protected]>
Signed-off-by: Dean Roehrich <[email protected]>
How does versioned CRDs change the development process from the case where CRDs can be modified without regard version. |
In DWS and lustre-fs-operator, we created a second API version 16 months ago. Think about how you have been making changes in those repos since then. When you make a change there, you're changing the most current API version (the hub), and letting 'make test' tell you when you need to add a conversion routine to the previous version (the spoke). I think we do need to document some guidelines, some best practices. Just thinking about our experiences in writing the conversion routines, and what sorts of things add to the complexity of those routines, it seems best to not rename a field, or change the type of a field. That's just one example. |
Another example: if the field has a |
I could see this sort of thing come up when changing defaults in |
Signed-off-by: Dean Roehrich <[email protected]>
Signed-off-by: Dean Roehrich <[email protected]>
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.
Bravo! 👏
Signed-off-by: Dean Roehrich <[email protected]>
Signed-off-by: Dean Roehrich <[email protected]>
See Kubebuilder's "Tutorial: Multi-Version API"
(https://book.kubebuilder.io/multiversion-tutorial/tutorial) for a description of the mechanism.
This tool implements the hub-and-spoke model of CRD versioning. See Kubebuilder's "Hubs, spokes, and other wheel metaphors" (https://book.kubebuilder.io/multiversion-tutorial/conversion-concepts) for a description of the model.