-
Notifications
You must be signed in to change notification settings - Fork 39
Add VM Support for Marketplace Purchase Plans #242
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
Add VM Support for Marketplace Purchase Plans #242
Conversation
| if image.Publisher == "" || image.SKU == "" || image.Offer == "" { | ||
| return nil |
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.
Do we care about the version? IIRC the upstream implementation cared about versions and put those into the plan? I could be mistaken though
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 don't care about version in the plan.
https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/d2b4e8ed2313adc270a0911d9d0c64e344f34cc4/azure/services/virtualmachines/virtualmachines.go#L278
| { | ||
| name: "Non-ThirdParty Marketplace Image", | ||
| updateSpec: nil, | ||
| validate: func(g *WithT, vm *compute.VirtualMachine) { | ||
| g.Expect(vm.Plan).To(BeNil()) | ||
| }, | ||
| }, | ||
| { | ||
| name: "ThirdParty Marketplace Image", | ||
| updateSpec: func(vmSpec *Spec) { | ||
| vmSpec.Image.ThirdPartyImage = true | ||
| }, | ||
| validate: func(g *WithT, vm *compute.VirtualMachine) { | ||
| g.Expect(vm.Plan).ToNot(BeNil()) | ||
|
|
||
| }, | ||
| }, |
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 a ShareImageGallery test 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.
Just removed support for Image Galleries from the API. Apparently we are only doing marketplace images.
2657e50 to
9d81790
Compare
9d81790 to
ab86a7b
Compare
|
/hold cancel |
VMs created from images in the marketplace or shared galleries may require purchase plans. This adds logic to pass through specified plan data when appropriate.
New image type field in the machine provider spec.
ab86a7b to
456fa68
Compare
JoelSpeed
left a 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.
/approve
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JoelSpeed 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 |
alexander-demicev
left a 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.
/lgtm
VMs created from images in the marketplace or shared galleries may require purchase plans. This adds logic to pass through specified plan data when appropriate.
Simplified version of this upstream logic: https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/d2b4e8ed2313adc270a0911d9d0c64e344f34cc4/azure/services/virtualmachines/virtualmachines.go#L259-L287
/hold
Depends on openshift/api#1057