Skip to content

Commit 4e474ed

Browse files
Merge pull request #1057 from patrickdillon/azure-machine-spec
Bug 2023434: Add Purchase Plan Name to Azure Machine Provider Spec
2 parents 20da846 + 62d90f1 commit 4e474ed

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

machine/v1beta1/types_azureprovider.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,28 @@ type Image struct {
174174
Version string `json:"version"`
175175
// ResourceID specifies an image to use by ID
176176
ResourceID string `json:"resourceID"`
177+
// Type identifies the source of the image and related information, such as purchase plans.
178+
// Valid values are "ID", "MarketplaceWithPlan", "MarketplaceNoPlan", and omitted, which
179+
// means no opinion and the platform chooses a good default which may change over time.
180+
// Currently that default is "MarketplaceNoPlan" if publisher data is supplied, or "ID" if not.
181+
// For more information about purchase plans, see:
182+
// https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cli-ps-findimage#check-the-purchase-plan-information
183+
// +optional
184+
Type AzureImageType `json:"type,omitempty"`
177185
}
178186

187+
// AzureImageType provides an enumeration for the valid image types.
188+
type AzureImageType string
189+
190+
const (
191+
// AzureImageTypeID specifies that the image should be referenced by its resource ID.
192+
AzureImageTypeID AzureImageType = "ID"
193+
// AzureImageTypeMarketplaceNoPlan are images available from the marketplace that do not require a purchase plan.
194+
AzureImageTypeMarketplaceNoPlan AzureImageType = "MarketplaceNoPlan"
195+
// AzureImageTypeMarketplaceWithPlan require a purchase plan. Upstream these images are referred to as "ThirdParty."
196+
AzureImageTypeMarketplaceWithPlan AzureImageType = "MarketplaceWithPlan"
197+
)
198+
179199
type OSDisk struct {
180200
// OSType is the operating system type of the OS disk. Possible values include "Linux" and "Windows".
181201
OSType string `json:"osType"`

machine/v1beta1/zz_generated.swagger_doc_generated.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)