Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/asset/machines/azure/azuremachines.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ func capzImage(osImage aztypes.OSImage, azEnv aztypes.CloudEnvironment, confiden
case rhcosImg == "" && !confidentialVM:
// hive calls the machines function, but may pass an empty
// string for rhcos. In which case, allow MAO to choose default.
return nil
return &capz.Image{} // can't be nil or mapiImage will panic
default: // Installer-created image gallery, for OKD && confidential VMs.
// image gallery names cannot have dashes
galleryName := strings.ReplaceAll(infraID, "-", "_")
Expand Down
5 changes: 0 additions & 5 deletions pkg/asset/machines/azure/machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,6 @@ func generateSecurityProfile(mpool *azure.MachinePool) *machineapi.SecurityProfi

func mapiImage(osImage azure.OSImage, azEnv azure.CloudEnvironment, confidentialVM bool, gen, rg, sub, infraID, rhcosImg string) machineapi.Image {
mImg := machineapi.Image{}
// hive uses this package, but may pass an empty string for rhcosImg,
// in which case we want to depend on MAO default, so return empty.
if rhcosImg == "" {
return mImg
}
cImg := capzImage(osImage, azEnv, confidentialVM, gen, rg, sub, infraID, rhcosImg)

if cImg.ID != nil {
Expand Down