Skip to content

Commit

Permalink
fix: comment on gen2 over gen1 preference
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryce-Soghigian committed Jan 19, 2024
1 parent 55991d9 commit 26b5717
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/providers/imagefamily/azlinux.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (u AzureLinux) Name() string {
}

func (u AzureLinux) DefaultImages() []DefaultImageOutput {
// image provider will select these images in order, first match wins. This is why we chose to put V2Gen2 first in the defaultImages
// image provider will select these images in order, first match wins. This is why we chose to put Gen2 first in the defaultImages, as we prefer gen2 over gen1
return []DefaultImageOutput{
{
CommunityImage: AzureLinuxGen2CommunityImage,
Expand Down
6 changes: 3 additions & 3 deletions pkg/providers/imagefamily/ubuntu_2204.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@ func (u Ubuntu2204) DefaultImages() []DefaultImageOutput {
return []DefaultImageOutput{
{
CommunityImage: Ubuntu2204Gen2CommunityImage,
PublicGalleryURL: v1alpha2.AKSUbuntuPublicGalleryURL,
PublicGalleryURL: AKSUbuntuPublicGalleryURL,
Requirements: scheduling.NewRequirements(
scheduling.NewRequirement(v1.LabelArchStable, v1.NodeSelectorOpIn, corev1beta1.ArchitectureAmd64),
scheduling.NewRequirement(v1alpha2.LabelSKUHyperVGeneration, v1.NodeSelectorOpIn, v1alpha2.HyperVGenerationV2),
),
},
{
CommunityImage: Ubuntu2204Gen1CommunityImage,
PublicGalleryURL: v1alpha2.AKSUbuntuPublicGalleryURL,
PublicGalleryURL: AKSUbuntuPublicGalleryURL,
Requirements: scheduling.NewRequirements(
scheduling.NewRequirement(v1.LabelArchStable, v1.NodeSelectorOpIn, corev1beta1.ArchitectureAmd64),
scheduling.NewRequirement(v1alpha2.LabelSKUHyperVGeneration, v1.NodeSelectorOpIn, v1alpha2.HyperVGenerationV1),
),
},
{
CommunityImage: Ubuntu2204Gen2ArmCommunityImage,
PublicGalleryURL: v1alpha2.AKSUbuntuPublicGalleryURL,
PublicGalleryURL: AKSUbuntuPublicGalleryURL,
Requirements: scheduling.NewRequirements(
scheduling.NewRequirement(v1.LabelArchStable, v1.NodeSelectorOpIn, corev1beta1.ArchitectureArm64),
scheduling.NewRequirement(v1alpha2.LabelSKUHyperVGeneration, v1.NodeSelectorOpIn, v1alpha2.HyperVGenerationV2),
Expand Down

0 comments on commit 26b5717

Please sign in to comment.