-
Notifications
You must be signed in to change notification settings - Fork 421
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
✨ Support specifying VM images by ID or from Shared Image Gallery #291
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: justaugustus 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 |
46fac45
to
98ca47b
Compare
dc6260d
to
63caf3c
Compare
63caf3c
to
7c787e7
Compare
Offer string `json:"offer"` | ||
SKU string `json:"sku"` | ||
Version string `json:"version"` | ||
Publisher *string `json:"publisher,omitempty"` |
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.
are these fields optional? If not, the type should be string vs *string.
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.
@juan-lee -- They're optional-ish. Only required when specifying a published image.
Here's what I wrote for the Image
field, which I'm going to write a doc for in short order:
// Image defines information about the image to use for VM creation.
// There are three ways to specify an image: by ID, by publisher, or by Shared Image Gallery.
// If specifying an image by ID, only the ID field needs to be set.
// If specifying an image by publisher, the Publisher, Offer, SKU, and Version fields must be set.
// If specifying an image from a Shared Image Gallery, the SubscriptionID, ResourceGroup,
// Gallery, Name, and Version fields must be set.
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.
Just thinking out loud on how to make this more user friendly. This is where ObjectReference or claim style approach is nice. Each of those permutations could be expressed as a different type. Another option would be for image to have a type and use RuntimeExtension or a map.
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.
@justaugustus I filed issue #293 to track this improvement in the future.
/assign @juan-lee @CecileRobertMichon @vincepri |
} | ||
|
||
// generateImageID generates the resource ID for an image stored in an Azure Shared Image Gallery. | ||
func generateImageID(image infrav1.Image) (string, error) { |
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.
Don't need to address in this PR, but we should probably enable webhook validation so clients can get errors right away instead of at reconcile time.
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.
@juan-lee -- Would you mind opening an issue for webhook validation and linking back to this comment?
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.
done #292
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
7c787e7
to
eaf693b
Compare
There are now three ways to specify an image: - by ID - by publisher - by Shared Image Gallery. Usage: - If specifying an image by ID, only the ID field needs to be set. - If specifying an image by publisher, the Publisher, Offer, SKU, and Version fields must be set. - If specifying an image from a Shared Image Gallery, the SubscriptionID, ResourceGroup, Gallery, Name, and Version fields must be set. Signed-off-by: Stephen Augustus <saugustus@vmware.com> Co-authored-by: Cecile Robert-Michon <cerobert@microsoft.com>
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
eaf693b
to
79c3d1b
Compare
I've removed the changes to the They're in another branch, if anyone wants to see them. |
/lgtm |
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
…ency-openshift-4.15-ose-azure-cluster-api-controllers OCPBUGS-24091: Updating ose-azure-cluster-api-controllers-container image to be consistent with ART
Signed-off-by: Stephen Augustus saugustus@vmware.com
Co-authored-by: Cecile Robert-Michon cerobert@microsoft.com
What this PR does / why we need it:
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 #
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: