-
Notifications
You must be signed in to change notification settings - Fork 82
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
⚠️ Introduce v1alpha2 API #190
Conversation
/hold |
52ecc4a
to
f023580
Compare
05d51a2
to
78ad7d2
Compare
/hold cancel |
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.
Thank you working on this, few suggestions inline:
if cSpec.Image != nil && cSpec.Image.Name != "" && cSpec.Image.Repository != "" { | ||
c.Image = imageMetaToURL(cSpec.Image) |
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.
how are these changes related to new API 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.
I guess this is the reason for the new API version. Incompatible fields
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.
Yes, @Danil-Grigorev is right. It's a result of the API change. In v1alpha1 we used ImageMeta object to provide a custom image for the provider. In v1alpha2 we decided that it's better to use the well-known /: image URL format, which is just a string.
After this change we don't have to convert ImageMeta -> ImageURL anymore, hence the change.
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.
Should we add documentation for user migration from v1alpha1 to v1alpha2 in this case? Similar to https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/book/src/developer/providers/version-migration.md?plain=1
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.
But migration doc in CAPI is formed when they release a minor release, and describe changes needed going from one minor release of CAPI 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.
Technically, you don't need to migrate anything manually. I implemented auto-conversion, which handles v1alpha1 -> v1alpha2 upgrade.
But I agree that it would be nice to have a doc describing the changes in the new 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.
Auto-conversion looks good to me. If we face a situation when autogenerated conversion will not be enough, we could look towards documenting the process. Let’s address the doc describing changes closer to the next release.
Also forgot to mention, I would consider this as a breaking change and suggest re-titling the PR (with |
2ddda48
to
f5218d3
Compare
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.
/lgtm
LGTM label has been added. Git tree hash: d31cb9e373b23600b0d8f5d5832653313b9f28c9
|
Thanks @Fedosin, looking good! |
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.
/approve
/hold
- pending clarification on: ⚠️ Introduce v1alpha2 API #190 (comment). I would prefer taking care of this with the same PR if we decide to go down that path but no strong opinions since we have an autoconversion in place.
- in case we want to have more eyes on it
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: furkatgofurov7 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 |
@furkatgofurov7 I agree with you - some documentation is necessary here. I'll write it later today and update the PR. |
docs/migrating.md
Outdated
|
||
This document describes changes that were introduced in v1alpha2 API and how to update your templates to the new version. | ||
|
||
## ImageMeta -> imageURL conversion |
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.
One more suggestion: we could have headers in the doc, similar to https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/book/src/developer/providers/migrations/v1.4-to-v1.5.md#cluster-api-v14-compared-to-v15 and for example for API changes like below it could be https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/book/src/developer/providers/migrations/v1.4-to-v1.5.md#changes-by-kind
@Fedosin thanks a lot, this version looks great to me! |
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.
/lgtm
Pending CI to pass (currently failing due to API rate limit and needs re-run after an hour)
LGTM label has been added. Git tree hash: 4dda14fbb1ad348a2cb26615b2dd40d4de0656b3
|
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.
/lgtm
/retest |
Thank you for review! /hold cancel |
What this PR does / why we need it:
This PR introduces new API version
v1alpha2
.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #167