Skip to content

Commit

Permalink
undo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
r2k1 committed Jan 21, 2025
1 parent 0165d15 commit e3f0105
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 59 deletions.
2 changes: 1 addition & 1 deletion e2e/aks_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func getBaseClusterModel(clusterName string) *armcontainerservice.ManagedCluster
{
Name: to.Ptr("nodepool1"),
Count: to.Ptr[int32](1),
VMSize: to.Ptr("Standard_D2s_v3"),
VMSize: to.Ptr("Standard_D2ds_v5"),
MaxPods: to.Ptr[int32](110),
OSType: to.Ptr(armcontainerservice.OSTypeLinux),
Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets),
Expand Down
63 changes: 5 additions & 58 deletions e2e/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/stretchr/testify/require"
appsv1 "k8s.io/api/apps/v1"
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -302,6 +301,11 @@ func (k *Kubeclient) EnsureDebugDaemonsets(ctx context.Context, t *testing.T, is
return err
}

err = k.CreateDaemonset(ctx, t, nvidiaDevicePluginDaemonSet())
if err != nil {
return err
}

return nil
}

Expand Down Expand Up @@ -513,32 +517,6 @@ func podRunNvidiaWorkload(s *Scenario) *corev1.Pod {
}
}

func podAMDGPUWorkload(s *Scenario) *corev1.Pod {
return &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("%s-gpu-validation-pod", s.Runtime.KubeNodeName),
Namespace: defaultNamespace,
},
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "gpu-validation-container",
Image: "mcr.microsoft.com/azuredocs/samples-tf-mnist-demo:gpu",
Args: []string{
"--max-steps", "1",
},
Resources: corev1.ResourceRequirements{
Limits: corev1.ResourceList{
"amd.com/gpu": resource.MustParse("1"),
},
},
},
},
RestartPolicy: corev1.RestartPolicyNever,
},
}
}

func nvidiaDevicePluginDaemonSet() *appsv1.DaemonSet {
return &appsv1.DaemonSet{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -655,34 +633,3 @@ func podEnableAMDGPUResource(s *Scenario) *corev1.Pod {
},
}
}

func jobAMDGPUWorkload(s *Scenario) *batchv1.Job {
return &batchv1.Job{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("%s-gpu-validation-job", s.Runtime.KubeNodeName),
Namespace: defaultNamespace,
},
Spec: batchv1.JobSpec{
Template: corev1.PodTemplateSpec{
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "gpu-validation-container",
Image: "mcr.microsoft.com/azuredocs/samples-tf-mnist-demo:gpu",
Args: []string{
"--max-steps", "1",
},
Resources: corev1.ResourceRequirements{
Limits: corev1.ResourceList{
"amd.com/gpu": resource.MustParse("1"),
},
},
},
},
RestartPolicy: corev1.RestartPolicyNever,
},
},
BackoffLimit: to.Ptr(int32(0)), // No retries, fail immediately if something goes wrong
},
}
}

0 comments on commit e3f0105

Please sign in to comment.