Skip to content

Commit

Permalink
Use correct node type for GPU test
Browse files Browse the repository at this point in the history
  • Loading branch information
flostadler committed Sep 5, 2024
1 parent 7024457 commit 4be30e4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions examples/examples_nodejs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,22 @@ func TestAccManagedNodeGroupOS(t *testing.T) {

assert.NoError(t, utils.ValidateNodePodCapacity(t, info.Outputs["kubeconfig"], 5, 100, "increased-pod-capacity"))
assert.NoError(t, utils.ValidateNodeStorage(t, info.Outputs["kubeconfig"], 4, 100*1_000_000_000, "increased-storage-capacity"))

assert.NoError(t, utils.ValidateNodes(t, info.Outputs["kubeconfig"], func(nodes *corev1.NodeList) {
require.NotNil(t, nodes)
assert.NotEmpty(t, nodes.Items)

var foundNodes = 0
for _, node := range nodes.Items {
if gpus, ok := node.Status.Capacity["nvidia.com/gpu"]; !ok {
continue
} else {
assert.True(t, gpus.CmpInt64(1) == 0)
foundNodes++
}
}
assert.Equal(t, 1, foundNodes, "Expected %s nodes with GPU")
}))
},
})

Expand Down
4 changes: 2 additions & 2 deletions examples/tests/managed-ng-os/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ const managedNodeGroupBottlerocket = eks.createManagedNodeGroup("bottlerocket-mn
nodeRole: role,
});

// Create a Bottlerocket node group with GPU support
// Create a Bottlerocket node group with GPU support (it's the cheapest GPU instance type)
const managedNodeGroupBottlerocketGpu = eks.createManagedNodeGroup("bottlerocket-mng-gpu", {
...scalingConfig,
cluster: cluster,
operatingSystem: eks.OperatingSystem.Bottlerocket,
instanceTypes: ["t3.medium"],
instanceTypes: ["g5g.xlarge"],
nodeRole: role,
gpu: true,
});
Expand Down

0 comments on commit 4be30e4

Please sign in to comment.