Skip to content

Return error when not all plan fields are populated in image.sharedGallery #2286

@invidian

Description

@invidian

/kind feature

Describe the solution you'd like
[A clear and concise description of what you want to happen.]

Conclusion from working on #2277. Right now code does the following while converting from sharedGallery image reference to Azure API call:

$ git grep SharedGallery.Publisher | grep nil
azure/converters/image.go:      if image.SharedGallery != nil && image.SharedGallery.Publisher != nil && image.SharedGallery.SKU != nil && image.SharedGallery.Offer != nil {
azure/services/scalesets/scalesets.go:  if image.SharedGallery != nil && image.SharedGallery.Publisher != nil && image.SharedGallery.SKU != nil && image.SharedGallery.Offer != nil {

Meaning, if one specifies only one of image.sharedGallery.publisher, image.sharedGallery.sku or image.sharedGallery.offer, it gets accepted by API but has no effect on the machine, which might be misleading.

There should be either a validation rule rejecting such configs or this should be taken into account if we introduce a new type as a replacement in #2277.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions