Skip to content

Commit

Permalink
Replace the hardcoded SKU
Browse files Browse the repository at this point in the history
  • Loading branch information
zylxjtu committed Feb 26, 2025
1 parent 0673000 commit 71f7efa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion e2e/aks_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func getBaseClusterModel(clusterName string) *armcontainerservice.ManagedCluster
{
Name: to.Ptr("nodepool1"),
Count: to.Ptr[int32](1),
VMSize: to.Ptr("standard_d2ds_v5"),
VMSize: to.Ptr(config.Config.DefaultVMSKU),
MaxPods: to.Ptr[int32](110),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets),
Expand Down
3 changes: 3 additions & 0 deletions e2e/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,9 @@ func nvidiaDevicePluginDaemonSet() *appsv1.DaemonSet {
},
},
Spec: corev1.PodSpec{
NodeSelector: map[string]string{
"kubernetes.io/os": "linux",
},
Tolerations: []corev1.Toleration{
{
Key: "sku",
Expand Down
4 changes: 2 additions & 2 deletions e2e/node_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func nbcToAKSNodeConfigV1(nbc *datamodel.NodeBootstrappingConfiguration) *aksnod
Version: "v0",
DisableCustomData: false,
LinuxAdminUsername: "azureuser",
VmSize: "Standard_D2ds_v5",
VmSize: config.Config.DefaultVMSKU,
ClusterConfig: &aksnodeconfigv1.ClusterConfig{
Location: nbc.ContainerService.Location,
ResourceGroup: nbc.ResourceGroupName,
Expand Down Expand Up @@ -347,7 +347,7 @@ func baseTemplateLinux(t *testing.T, location string, k8sVersion string, arch st
},
AgentPoolProfile: &datamodel.AgentPoolProfile{
Name: "nodepool2",
VMSize: "Standard_D2ds_v5",
VMSize: config.Config.DefaultVMSKU,
KubeletDiskType: "",
WorkloadRuntime: "",
DNSPrefix: "",
Expand Down
2 changes: 1 addition & 1 deletion e2e/vmss.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ func getBaseVMSSModel(s *Scenario, customData, cseCmd string) armcompute.Virtual
model := armcompute.VirtualMachineScaleSet{
Location: to.Ptr(config.Config.Location),
SKU: &armcompute.SKU{
Name: to.Ptr("Standard_D2ds_v5"),
Name: to.Ptr(config.Config.DefaultVMSKU),
Capacity: to.Ptr[int64](1),
},
Properties: &armcompute.VirtualMachineScaleSetProperties{
Expand Down

0 comments on commit 71f7efa

Please sign in to comment.